WordPress.org

Ready to get started?Download WordPress

Forums

Home.php not showing last post (6 posts)

  1. Bliss07
    Member
    Posted 1 year ago #

    Hi there,

    I just launched my blog and I am having a little problem with the home.php page.

    Basically when I click on the "Home" button, on the top bar of the website, it doesn't show the last post created. While if I click on the logo it's showing the last post. Does anyone have any idea what this could be?

    I have already cleared all the cache but no luck.

    This is the blog: http://www.nonhotv.com/

    Thanks

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    your 'home' page seems to be using a page template 'page_blog-php';

    what is the full code of that template?

  3. Bliss07
    Member
    Posted 1 year ago #

    Hi alchymyth,

    This is a million dollar question for me.

    I don't know where to get that code, I am an inexperienced user.
    How can I find out the code? I use firebug for editing things in the CSS and the PHP but in this case I don't know where to find that code. So, at this stage, I guess the problem is the backend, right?

    Thanks

  4. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    the problem is the backend

    the problem is possibly a misconception of what template gets used for what web page; review: http://codex.wordpress.org/Template_Hierarchy

    to find out what template the 'home' page uses, goto dashboard - pages - edit 'home' page, check under 'page attributes' 'template'.

    to find the page template, goto dashboard - appearance - editor; make sure your current theme is selcted at the top; ten look for a template with the file name 'page_blog.php' or similar; check at the top of the template code if the name after 'Template Name:' is the same as you have found under 'page attributes' 'template'.

    then post the code of that template here.

  5. Bliss07
    Member
    Posted 1 year ago #

    Hi alchymyth,

    I just went through all the instructions that you have written in your last post:

    1.

    to find out what template the 'home' page uses, goto dashboard - pages - edit 'home' page, check under 'page attributes' 'template'.

    My Current Page Attribute (Home):
    - Parent: (No Parent)
    - Template: Blog

    I just noticed that the other three pages have a different option selected (Default Template). So, I have tried to change the Template for 'Home' from 'Blog' to 'Default Template', just like the other three pages of the website, but the whole content (posts) it disappear.
    The other thing I have noticed is that the only posts to disappear when you clicking on 'Home' are the ones containing videos, while the latest posts that have pictures they are displayed fine.

    2.

    to find the page template, goto dashboard - appearance - editor; make sure your current theme is selcted at the top;

    I have checked the current theme that was selcted at the top, and it is the theme name that I am currently using (Organic structure),

    ten look for a template with the file name 'page_blog.php' or similar; check at the top of the template code if the name after 'Template Name:' is the same as you have found under 'page attributes' 'template'.

    Then I opened the file name Blog Page Template(page_blog.php) and the 'Template Name:' is 'Blog' just like the 'Home' page.

    Here is the code of page_blog.php.

    Thank you for replying to me

  6. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    line 17 of the pastebin:

    <?php $wp_query = new WP_Query(array('cat'=>of_get_option('category_blog'), 'posts_per_page'=>of_get_option('postnumber_blog'), 'paged'=>$paged)); ?>

    actually shows that the template uses a theme option to get which category you want to show with the template;

    chek your theme's options, and see if there is a possiblity to set the 'blog' page to use all categories.

    if you are stuck, contact organicthemes for support with your problem.
    the theme's developers should know best if there are theme options and where to find them.

    commercial themes are not supported by this forum (apart from general help with troubleshooting)

Topic Closed

This topic has been closed to new replies.

About this Topic