Delete view previous messages

Mauer Themes Support Storyteller Delete view previous messages

This topic contains 5 replies, has 2 voices, and was last updated by  Paul 2 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #346

    selwyn
    Participant

    At our homepage we have several message which you can read by clicking on ‘Read more’. When I do that, it is possible for me to see the whole message. In the buttom you will see the previous messages. I want to delete that, but I don’t know if it is possible and where I can find it.

    Kind Regards

    #351

    Paul
    Keymaster

    Here are two ways in which the ‘More posts’ section can be removed from the single post template:

    1. The HTML/PHP way. Looking at http://geertdebruijn.com/harrys-eclectic-collection I can see that you have modified the theme pretty heavily. You could add another modification in the same manner to remove the ‘More posts’ section. For that you need to remove the code that is on lines 61-104 of the original single.php file (not modified). Here is the code to remove:

    <?php 
    $args = array(
    	'post_type' => 'post',
    	'post__not_in' => array(get_the_ID()),
    	'posts_per_page' => 2,
    );
    
    $more_query = new WP_Query( $args ); 
    ?>
    
    <?php if ( $more_query->have_posts() ) : ?>
    
    	<h5 class="more-posts-heading text-center"><?php echo esc_html_x( 'More posts: ', 'More posts heading', 'mauer-storyteller' ) ?></h5>
    
    	<?php  while ( $more_query->have_posts() ) : $more_query->the_post(); ?>
    
    		<?php $current_post_index = $more_query->current_post + 1; ?>
    
    		<?php if ($current_post_index <= 2): ?>
    
    			<?php if ( ($current_post_index % 2) !=0 ): ?><div class="row posts-row"><?php endif ?>
    
    				<div class="col-xs-12 col-md-6">
    					<div <?php post_class('post-card'); ?>>	
    						<a href="<?php the_permalink(); ?>" class="entry-thumb-link">
    							<div class="entry-thumb" <?php echo mauer_get_post_card_background(get_the_ID(),'mauer_thumb_1'); ?>><div class="entry-thumb-overlay"></div></div>
    						</a>
    						<div class="entry-meta">
    							<span class="entry-date"><a href="<?php the_permalink(); ?>"><?php echo get_the_date(); ?></a></span><span class="entry-cats"><?php echo get_the_category_list( esc_html_x( ', ', 'blog entry categories separator', 'mauer-storyteller' ) ); ?></span>
    						</div>
    						<h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
    						<div class="entry-excerpt"><?php the_content(); ?></div>
    					</div><!-- /.post-card -->
    				</div>
    
    			<?php if ( ($current_post_index % 2) == 0 ): ?></div><!-- /.posts-row --><?php endif ?>
    
    		<?php endif ?>
    		
    	<?php endwhile; ?>
    
    <?php endif; ?>
    
    <?php wp_reset_postdata(); ?>

    2. The CSS way. Going this way you will just hide the ‘More posts’ section in your stylesheet.
    To do that you would need to add the following code to your CSS: .single .posts-row {display:none;}
    You can add this code via a plugin: e.g. Simple Custom CSS by John Regan.
    You can install the plugin by going to your Admin Panel -> Plugins -> Add New. There you can just type the name of the plugin in the search field.

    • This reply was modified 2 years, 3 months ago by  Paul.
    #368

    selwyn
    Participant

    I choose for option two. I still see one ‘more posts’ in the end. It used to be several, so this is better. But I would like to remove the one as well. Is there an option for that?

    #372

    Paul
    Keymaster

    Excuse me, I did not realize you modified the template so that only one of the posts is now inside the .posts-row container (unlike in the original version of the template).

    To hide the second of the ‘more posts’ please add the following CSS code:

    .single .posts-row+.col-xs-12.col-md-6 {display:none;}

    If you like the theme (or the quality of support) please don’t hesitate to rate it on ThemeForest.
    Thank you.

    #375

    selwyn
    Participant

    Thank you very much! This answer was very helpfull. Offcourse I want to rate it, because I like the support and the quality of it. Perhaps a silly question. Where on the website of ThemeForest is it possible to rate? English is not my native language and I have trouble finding it.

    #378

    Paul
    Keymaster

    You’re welcome. I’m glad the answer helped you.

    To rate the theme on ThemeForest, please go to https://themeforest.net/downloads and then click a star under the ‘Download button’. See screenshot:

    Have a great day!

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Delete view previous messages’ is closed to new replies.