category_name actually taking slug and not category name itself? (2 posts)

  1. Chandra M
    Posted 7 years ago #

    Hi all,

    I have a query that should have pulled posts from the category name


    something like this and $categoryname is pulled via theme options. It was working okay until I changed the slug to something other than default (which is usually same as the name).

    So, I believe, its actually refering from slug and not name. How do I pull it from the category name ?

  2. esmi
    Forum Moderator
    Posted 7 years ago #

    The parameter category_name is the correct one to use - which suggests that perhaps it's your variable $categoryname that might the problem. What exactly is being returned to this variable from the theme options?


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.