WordPress.org

Ready to get started?Download WordPress

Forums

Modified 2011 theme all fine except pages showing no content (13 posts)

  1. Hix
    Member
    Posted 1 year ago #

    Hi There,

    I'm just starting out with modifying themes. I've created a site Here fora friend.
    She wanted it to look like a psd i was given.
    I've changed the css and the templates for twentyeleven to reflect the layout i was given. It all seems to work pretty well apart from the static pages aren't showing any content i.e like this
    Posts are fine and the actual pages are rendering with no errors [debug on, on local version]
    I just cant figure this out.
    I did change functions.php but only to reflect my nav menu.
    Could anyone advise as I've hit a wall I cant climb over.

    Many thanks for taking the time to look at this.

    Hix

  2. alchymyth
    Forum Moderator
    Posted 1 year ago #

    all menu links are pointing to /category/ archives;

    what is your permalink structure - http://codex.wordpress.org/Using_Permalinks

    what pages would you expect to see?
    is there any content in the pages?

  3. Hix
    Member
    Posted 1 year ago #

    Hi alchymyth,

    Currently the links are pointing to post categories. the second link Here
    is representative of the page I am referring to . I have no problems with the link structure as I can set this to be post categories or pages. My issue is the actual page in this link.

    Everything renders apart from the content of the page [which is visible in the database]

    Regards
    Hix

  4. alchymyth
    Forum Moderator
    Posted 1 year ago #

    what is the code of page.php and (possibly) content-page.php?

  5. Hix
    Member
    Posted 1 year ago #

    I've copied my page.php into pastebin page.php
    It may give someone an insight into what is happening.

  6. Hix
    Member
    Posted 1 year ago #

    ha, that was spookily timed :)

  7. Hix
    Member
    Posted 1 year ago #

  8. Hix
    Member
    Posted 1 year ago #

    and for good measure here is functions.php the change I made is line 381 to display and class my own menu

  9. alchymyth
    Forum Moderator
    Posted 1 year ago #

    both templates look ok; it just seems that the loop is not triggered.

    temporarily add this to page.php:

    <?php var_dump( $wp_query ); ?>

    and see what the output is.

    what about plugins?

    try to deactivate all plugins, to see if that changes the empty pages.
    you can then reactivate one plugin after the other...

    also, try to activate DEBUG to possibly see some error messages:

    http://codex.wordpress.org/Debugging_in_WordPress

    also weird, if I add /?page_id=1 after the url, which should get me to the first page, it actually redirects to the first post /?p=1

  10. Hix
    Member
    Posted 1 year ago #

    added the following to wp-config.php

    also changed page.php so the loop now reads like
    this

    page renders fine, with no errors shown.

    Interestingly enough, there is no error log in wp-content.
    Though i suppose if it's not throwing any why would it log

    Cheers for all your help btw, appreciated

  11. Hix
    Member
    Posted 1 year ago #

    forgot to add, virgin install so no activated plugins

  12. Hix
    Member
    Posted 1 year ago #

    anyone got any ideas on this? Debugging shows nothing wrong, the page template uses the same loop as twentyeleven, yet I still get static
    pages rendered with everything except the main content

  13. Hix
    Member
    Posted 1 year ago #

    not sure what was wrong, but changing themes, then deleting page.php and content-page.php and redoing them seems to have done the trick.
    If you can see any errors at Claireabell Creations Please let me know. For now - I'm going to the pub :)

    Thanks for your help and guidance alchymyth

Topic Closed

This topic has been closed to new replies.

About this Topic