WordPress.org

Support

Support » How-To and Troubleshooting » query a category within a page that has the same name as the page

query a category within a page that has the same name as the page

  • Gnashrakk
    Member

    @gnashrakk

    we all know that <?php query_posts(‘category_name=NAMEOFCAT‘); ?> only shows the post of that special category you entered. But what if i want the same name as the pagename? that means, it changes when i enter another page.

    Is there an easy solution to this problem, like using the_title or something similar? Have’nt been playing around for that long in WordPress so any help is appreciated.

    Thanks
    Daniel

  • The topic ‘query a category within a page that has the same name as the page’ is closed to new replies.