WordPress.org

Support

Support » How-To and Troubleshooting » List of older Posts ony showing on one page

List of older Posts ony showing on one page

  • cesbloggan
    Member

    @cesbloggan

    Hi,
    I am making a site which is mainly a website with static pages. Only the front page holds the blogging posts. How do I keep a widget including only older posts on that page only?
    Tha is, I dont want any widgets relating to posts on any other page than the first (blog) page.
    Hoping for help!

Viewing 10 replies - 1 through 10 (of 10 total)
  • esmi
    Forum Moderator

    @esmi

    Are you sure you mean “widgets”? If so, you could create a custom sidebar and load that into index.php using something like <?php get_sidebar('home');?> (assuming your new sidebar was called sidebar-home.php).

    cesbloggan
    Member

    @cesbloggan

    Well, it is easy to use a widget with for example categories in. Which is why I wrote that. And I am not sure how to code a custom sidebar to hold older posts…
    It doesn’t have to be a widget but the person who updates the site definitely shouldn’t have to bother about putting the older posts there.

    Somehow I thought this would be a fairly common wish :-). And that I just couldn’t find it..

    cesbloggan
    Member

    @cesbloggan

    Hm, how would I tweak the code of the sidebar to actually show the posts as opposed to the “regular” sidebar?

    At the moment I am working with only a custom widget plugin called Side Content as I have different sub-menu systems for different pages. (http://figure-w.co.uk/wordpress-side-content-plugin)
    Since that plug-in only shows the code inserted on the pages I want them to show on (but don’t take php) I still have all the code for calling the regular blog widgets in my sidebar. I haven’t needed to remove them. They are just deactivated.

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar_right') ) : ?>
    I guess this is the main “call” for widgets.. How would I tweak that to call the Older posts? And what do I remove on the regular sidebar.php to avoid calling it on the other pages?

    esmi
    Forum Moderator

    @esmi

    If you want to display older posts in a sidebar, you’ll need to read up on multiple Loops.

    cesbloggan
    Member

    @cesbloggan

    OK, thanks!
    Another question, I would like to have my posts page (index-page of the site) have three lower level pages, that is static pages, not other posts or categories or something. Is that possible?

    And while I am writing, is it possible to make topmenu first level items not clickable? So that they act only as rollovers for the actual menu items?

    Sort of like this:

    <ul>
    <li><a href="#">About</a></li>
    <li class="sub level item"><a href="theteam.php">The Team</a>
    </ul>
    esmi
    Forum Moderator

    @esmi

    If you want to include static pages as well as posts on your front page, you’re looking at multiple Loops again.

    And while I am writing, is it possible to make topmenu first level items not clickable?

    Not if you’re using something like wp_list_pages.

    cesbloggan
    Member

    @cesbloggan

    OK I’ll have a thourough look at it.

    Although I don’t want the entire posts in a sidebar, only a list of the latest posts.

    esmi
    Forum Moderator

    @esmi

    Have a look at the Recent Posts widget in Admin/Appearance/Widgets.

    cesbloggan
    Member

    @cesbloggan

    I know that one.. 🙂 the problem i I only want it on the one blog page and not on the other ones. And since I need to call the sidebar for other widgets (Side Content) it will appear evrywhere. I have the Flexi Pages Widget but as far as I remember it displays all pages.

    esmi
    Forum Moderator

    @esmi

    You could set up a second widget capable area in your sidebar that is only displayed on the Blog page.:

    <?php
    if( is_home() ) :
    if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Blog Only') ) : ?>
    <?php endif; endif;?>
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘List of older Posts ony showing on one page’ is closed to new replies.