• Hi

    How can I remove “post” on the top page?
    I tried commenting out all the codes on single.php file, but I guess that’s not how to do so. Please tell me the right way.

    thx in advance.

    —–detail:I want to remove the following phrase from my top page—–
    Nothing Found
    Ready to publish your first post? Get started here.

Viewing 1 replies (of 1 total)
  • Hey there.

    I don’t use the theme but it sounds like this will disappear once you publish your first post.

    Looking at the code it only appears if you can make a post and non yet exist, you can find it here:

    /arcade-basic/front-page.php

    If you’re planning to start posting then I’d just leave it, if you really want rid then change this:

    <?php
    	if ( have_posts() ) {
    		while ( have_posts() ) : the_post();
    			get_template_part( 'content', get_post_format() );
    		endwhile;
    	bavotasan_pagination();
    	} else {
    		if ( current_user_can( 'edit_posts' ) ) {
    		// Show a different message to a logged-in user who can add posts.
    ?>
    <article id="post-0" class="post no-results not-found">
    	<h1 class="entry-title"><?php _e( 'Nothing Found', 'arcade' ); ?></h1>
    <div class="entry-content description clearfix">
    <p><?php printf( __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'arcade' ), admin_url( 'post-new.php' ) ); ?></p>
    </div><!-- .entry-content -->
    </article>
    <?php
    	} else {
    		get_template_part( 'content', 'none' );
    	} // end current_user_can() check
    }
    ?>

    To this:

    <?php
    	if ( have_posts() ) {
    		while ( have_posts() ) : the_post();
    			get_template_part( 'content', get_post_format() );
    		endwhile;
    	bavotasan_pagination();
    	} else {
    		get_template_part( 'content', 'none' );
    		 // end current_user_can() check
    	}
    ?>

    This will still show the nothing found message if you have no posts, to remove that you’ll want to take this off too:

    else {
    		get_template_part( 'content', 'none' );
    		 // end current_user_can() check
    }

    It’s best to do this in a child theme, if you’re not sure what that is then please read here:

    https://codex.www.ads-software.com/Child_Themes
    https://premium.wpmudev.org/blog/create-wordpress-child-theme

    As I said, if you’re going to post then I wouldn’t worry about all this though. ??

    Hope this helps.

Viewing 1 replies (of 1 total)
  • The topic ‘remove post on top page’ is closed to new replies.