• I was handed this site to fix. It was delivered without a functioning blog page, in fact, the links in the header were hard coded in the header.php file and they left a # where links should go, including the blog.

    I noticed in reading settings, static home page was set to a particular page, in which the html and divs were entered into the edit box. But, when I look at index.php, I noticed that the same exact html is hard coded within it. I am assuming they had it set to the default, home as showing the latest posts, then hard coded in what is now the static home page content.

    Anyway, I created a Blog page within WP, changed the posts page to the brand new Blog page and … nothing.

    Now, one of the critical underlying issues here is that this theme should be a child of twentyeleven but it was not set up that way. It appears that someone just copied all of the files of twentyeleven then modified them, named it the new website name and there you have it. If that plays into the reason why I can’t get the blog page to work, I don’t know.

    But, here is what I have done, with some progress:

    1) I made a copy of index.html, renamed it blog-template.php and added the
    /* Template Name: Blog Template */ at the top.

    2) went to my new blog page and selected Blog Template from the dropdown.

    3) I cleaned out unnecessary html code from the blog-template.php and pasted in the loop code, which was missing from the original hacked up index file.

    4) Now here is where the child theme plays in. The page was blank, up until I changed the loop code from <?php twentyeleven_content_nav( ‘nav-above’ ); ?>
    to <?php theinnrosehall_content_nav( ‘nav-above’ ); ?> as well as the <?php theinnrosehall_content_nav( ‘nav-below’ ); ?>

    The sidebar widget content is now filling the whole page, yet still no posts. I was happy to have made some progress, but this site is really way more messed up than I had thought.

    Here is the link to the blog page: http://innatrosehall.com/our-blog/

    Thank you to anyone who can help with this!

Viewing 13 replies - 1 through 13 (of 13 total)
  • It’s difficult to tell without seeing the code. Can you post the template over at http://pastebin.com/ and then put the link in here.

    Thread Starter treenut

    (@treenut)

    Sure, thank you WPRanger for replying to my long post. And I am also stoked to learn about pastebin.

    Here is the link to the blog template code

    http://pastebin.com/MMZwGyx0

    No clues there that I can see. What’s the content of content.php?

    Thread Starter treenut

    (@treenut)

    Hello WPRanger, here is the link to the content.php I was able to get the sidebar to show up but not the individual posts.

    content.php: http://pastebin.com/VhsLu5Nc

    Blog page: http://innatrosehall.com/our-blog/

    From your pastebin… there is this line of code in your loop:

    <?php get_template_part( 'content', get_post_format() ); ?>

    That get_template_part() is a function inside your theme, most likely the functions.php file.

    You will need to see what is running in that function.. and how it is pulling posts.

    Please feel free to post it in another pastebin and share the link here.

    Thread Starter treenut

    (@treenut)

    This theme is really messed up. I think they just copied the entire theme of twentyeleven and renamed the folder, rather than creating a child theme.

    Here is the functions.php but I am not finding that post format
    http://pastebin.com/dJNbCpCD

    If the database is intact it might be easier to just set up a new site instance and hook up the site to it.

    Thread Starter treenut

    (@treenut)

    If you don’t mind me asking, what would be the best way of setting up a new site instance?

    Normally I’d say switch to another theme but it sounds like you don’t know the history of the site or whether core files have been messed up. Sorting all that out could be a nightmare with no guarantee you won’t have problems down the road. I’d make a local back up of what’s there now and reinstall WordPress. Connect that to the existing database – hopefully that hasn’t been messed with.

    Thread Starter treenut

    (@treenut)

    How do I connect the existing database to the new WP install? Do you think there is possible an alternative workaround?

    Once you’ve installed WP, you just need to identify the right database and give it permission to access it by editing 4 lines in the wp-config file.
    http://codex.wordpress.org/Editing_wp-config.php
    The info you need you can get from your hosting account (in cpanel if you have it).

    Thread Starter treenut

    (@treenut)

    Thank you, so will I be replacing the old WP install? After a backup.

    Thread Starter treenut

    (@treenut)

    I don’t think it has anything to do with the database, it is def a theme issue. When I switch to twentyeleven for example, the blog works perfectly.

    What is it that I need to do within this theme to get that blog working? In reading, I have set the home page to static and the blog to a page I created. I tried making a template file from the original twentyeleven index.php and renaming it ‘blog-template.php’ then setting the new blog page to that template, but it is still referencing the highly customized index.php file within this theme.

    I did not set this site up, so I really have no clue how to fix this.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Posts not showing on Posts page – Messed up site handed to me’ is closed to new replies.