WordPress.org

Ready to get started?Download WordPress

Forums

Leaf
Hide "More Articles" (7 posts)

  1. eddie1227
    Member
    Posted 1 year ago #

    Hello,

    I would like to know how to hide the "More Articles" section. Please kindly advise!

    Thank you very much!

  2. lupi73
    Member
    Posted 1 year ago #

    hi,

    not possible.

  3. eddie1227
    Member
    Posted 1 year ago #

    http://www.mikeweitzner.com/

    this site has no "More Articles" I would like to hide them because it keep loading up my very old posts, or perhaps there is a way to show only the recent post? (descending from the newest)

    Thank you!

  4. lupi73
    Member
    Posted 1 year ago #

    he had to take all the code from home.php, I can not say origin, after you create a child theme and remove these codes

    <!-- Begin articles. -->
    
    					<h3 class="divider-title"><span><?php _e( 'More Articles', 'leaf' ); ?></span></h3>
    
    					<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
    
    						<div class="home-articles horizontal-divider row">
    
    							<div class="four columns">
    
    								<a href="<?php the_permalink(); ?>">
    									<img src="<?php echo leaf_get_post_image( null,null,true,null, 'medium' ); ?>" alt="<?php the_title(); ?>" class="attachment-post-thumbnail wp-post-image">
    								</a>
    
    							</div><!-- .four .columns -->
    
    							<div class="eight columns">
    
    								<h2 class="entry-title">
    									<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>
    								</h2>
    
    								<div class="entry-summary">
    									<?php echo '<p>' . wp_trim_words( get_the_excerpt(), 45, null ) . '</p>';?>
    								</div><!-- .entry-summary -->
    
    								<p class="read-more-link"><a href="<?php the_permalink(); ?>"><?php _e( 'Full Article', 'leaf'  ); ?> &rarr;</a></p>
    
    							</div><!-- .eight .columns -->
    
    						</div><!-- .home-articles .horizontal-divider .row -->
    
    					<?php endwhile; ?>
    
    					<!-- End articles. -->
  5. eddie1227
    Member
    Posted 1 year ago #

    Thank you! It works! By any chance you know how to modify the order of the "More Articles" descending from the most recent ones? I think it is set as random order as default. I tried to search on the forum but I didn't seem to find it.

    Thank you once again!

  6. lupi73
    Member
    Posted 1 year ago #

    Hello,
    WordPress sort items from newest to oldest.
    quite normal, more interesting to see the latest items first that the ancients.
    otherwise see the codex
    http://codex.wordpress.org/Function_Reference/query_posts

    maybe
    `$args=array(
    'order' => 'ASC',
    );

    query_posts($args); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

  7. Minoskov
    Member
    Posted 9 months ago #

    Using Leaf theme also, needed to hide the "more articles" section. Modified my child theme - it works.

    Great solution - thanks.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.