• I have been banging my head with a list of pages that only worked in one place but not the other, being THE SAME include (same code).

    So I started moving it up and down to see what tag was breaking it, and it’s the wp_head() tag!

    The one on the header.php file works, and the one on index.php doesn’t.

    I would assume wp_list_pages was mostly designed to list pages in the content section, which is always out the wp_head().

    Any idea what is breaking it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • what plugins do you have which might hook their code into ‘wp_head’?

    i.e. if you deactivate all plugins, does the ‘wp_list_pages()’ work in index.php?

    you have tag this topic with ‘excerpt’, ‘recent’, ‘sidebar’, etc – what has that to do with your problem?

    what theme are you using?

    it could help if you paste the code of header.php and index.php into a https://pastebin.com/ each and post the links to these here.

    Thread Starter SocialBlogsite

    (@socialblogsite)

    You’re right. I’ll test my plugins. I know wp_head() does more than just calling the header, but I honestly though that all the plugins are loaded even before wp_head(), so I disregarded it.

    Believe me. It has nothing to do with the theme. I made it myself from scratch, as well as the functions, and yet I’ve removed partial and whole code, switched templates, created a page for the home, used the same code in different template_types and the ONLY thing that worked was moving the line just below the wp_head().

    I just un-installed all the ones I can live without, but the following are a MUST and I’m afraid to un-install them ( except the domain mapper and broadcaster, I have used the rest in the past, no problems )

    All in One SEO Pack
    cforms
    Missing Data All in One SEO Pack
    Post Snippets
    ThreeWP Broadcast
    WordPress MU Domain Mapping

    I’ll install this same theme in another blog and I’ll update tonight.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HELP! wp_list_pages() only works before wp_head()’ is closed to new replies.