Support » Themes and Templates » [Arras theme] Hide Recent Posts from homepage

  • Resolved ryan76nz


    I’m trying to show the Recent Posts only on pages other than the homepage (ie. hide from the homepage). Using Arras theme.

    I’ve experimented with the sidebar-single.php file but nothing I do to this file seems to make any difference.

    Can anyone help please?

Viewing 4 replies - 1 through 4 (of 4 total)
  • In sidebar.php delete this:

    <li class="widgetcontainer clearfix">
    				<h5 class="widgettitle"><?php _e('Recent Posts', 'arras') ?></h5>
    				<div class="widgetcontent">
    				$r = new WP_Query(array('showposts' => $number, 'what_to_show' => 'posts', 'nopaging' => 0, 'post_status' => 'publish', 'caller_get_posts' => 1));
    				if ($r->have_posts()) :
    				<?php while ($r->have_posts()) : $r->the_post(); ?>
    				<li><a href="<?php the_permalink() ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?> </a></li>
    				<?php endwhile ?>

    Remember changes to themes like this could be blown away with future ‘automatic’ upgrades so backup your theme files when you make customizations. See WordPress Backups

    Hi, thanks for the reply. I’ve done that but it doesn’t seem to help – if Recent Posts is added through the Widget interface it appears on all pages and if it isn’t, it doesn’t appear anywhere.

    Have I missed something?

    Ah, if you are using widgets then look at

    Awesome, that’s perfect. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Arras theme] Hide Recent Posts from homepage’ is closed to new replies.