• rusticated

    (@rusticated)


    One of my page templates features two loops, one of which outputs the content of the page itself, and one which uses query_posts to pull in the children of that page. The page can be seen here:

    http://is.quotebox.org/sports/football/

    For some reason, the existence of this second loop makes the ‘Edit Page’ button disappear from the admin menu bar at the top of the page. Is there any reason for this, and anything I can do to get the Edit link back?

    The first loop, which outputs the contents of the page, can be seen here:

    http://pastebin.com/tUKbUA5Z

    And the second, which outputs a list of the children, can be seen here:

    http://pastebin.com/FkRfTKCK

Viewing 1 replies (of 1 total)
  • Chip Bennett

    (@chipbennett)

    Probably because you’re using query_posts() incorrectly. From the Codex:

    It is meant for altering the main loop. For creating secondary loops, you should make a new instance of WP_Query and use that instead…

    You’re invoking all manner of unintended consequences, one of which is probably that the conditional tags get screwed up, which then screws up the output of the edit_post_link() function.

    I would recommend using get_posts() for your secondary query, so that you don’t stomp on your primary Loop.

Viewing 1 replies (of 1 total)
  • The topic ‘Unable to Edit Pages’ is closed to new replies.