WordPress.org

Ready to get started?Download WordPress

Forums

page.php (1 post)

  1. ckruse
    Member
    Posted 5 years ago #

    I have a problem with the loop. In my header file, I have a custom query which pulls a custom page called home and displays the contents. This works great, as it should. Problem is, that when you go to template pages such as search.php and page.php, rather then forming a new query automatically and running it in the loop as usual, it uses the last result from the header loop.

    So I need a way to run the queries on my own on the other pages. Is there a variable to get the page. For example:

    mysite.com/blog/about

    What variable stores "about", so that I can run the query on my own?

    Hope that makes sense.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.