Home Forums General Issues Using unique ID/Slug in template Reply To: Using unique ID/Slug in template

  • Going back to your original code I see that you are doing a custom query inside of a function.

    I’m pretty sure that you need to declare the global $post. Also, you may be in an nested loop already and if this is they case, using a standard have_post() loop in this function will not product the desired results. At this point I’m going to suggest starting your own topic. I have a feeling that this is about the function and the loops that get your here rather then then loops inside of the function.