badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

hide ability to click to old posts

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #86365
    the5krunner.com
    Participant

    on the home page i want to

    1. allow the user to click to see the next page of older posts
    but
    2. i want to stop them from choosing a specific page

    ie they can only click to see the next page (newer or later)
    ie to get to the first ever page would take a LONG time!

    thank you

    #86767

    Hi there,

    For to stop visitors from choosing a specific page and only click to see the next page (newer or later) just go to theme main directory/index.php on line no:67 you will find below line of code:

    <?php the_posts_pagination( array(
    	'prev_text' => __( 'Previous', 'newscard' ),
    	'next_text' => __( 'Next', 'newscard' ),
    	)
    );

    replace the above code with below one:

    <div class="navigation nc-nav">
        <p><?php posts_nav_link('',__( 'Previous', 'newscard' ),__( 'Next', 'newscard' )); ?></p>
    </div><?php

    Also paste the below custom CSS code in Appearance > Customize > Additional CSS for style for those links:

    .navigation.nc-nav a {
    	display: inline-block;
    	color: #333;
    	padding: 15px 25px;
    	margin: 0 1px 3px;
    	background-color: #ffffff;
    	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    	-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    	-moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    }
    .navigation.nc-nav a:hover {
    	color: #fff;
    	background-color: #00236e;
    	border-color: transparent;
    	text-decoration: none;
    	position: relative;
    }

    Note: We recommended you to customize the theme main code via child theme so that your code won’t lost while you update to the new version of the theme.

    Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.