• Resolved jinsenkaredath

    (@jinsenkaredath)


    Hi I am using pixeled theme. Now when you come to my index page (www.j-k.in, at the bottom you will find ‘Next Page’ & ‘Previous Entries’, but the link for both is same (https://j-k.in/blog/page/2/) if you click on ‘next page’ you will get 4 links at bottom, I want to remove the ‘next page’ link from my index page. Could anyone help me to do it.
    Thanks in advance
    Jinsen Karedath

Viewing 15 replies - 1 through 15 (of 21 total)
  • In the admin area of your blog go to “Appearance – Editor” and open the file index.php. Search for a call to next_posts_link and use conditional tags so that the link doesn’t appear on the home page.

    Example:

    <?php if (is_home()) next_posts_link(); ?>

    I think it should be !is_home() instead of is_home()

    <?php if (!is_home()):
     next_posts_link();
      endif;
    ?>

    He wants to remove the link on index page.

    Sure! Thanks for the code review ??

    Might be more cautious to check if it’s the front page at the same time to…
    <?php if (!is_home() || !is_front_page()) next_posts_link(); ?>

    There’s no need to span such a simple piece of code over 4 lines either imranexpt… nor a requirement for : and endif… (just preferential coding practices)..

    Thread Starter jinsenkaredath

    (@jinsenkaredath)

    Thanks every one for the reply, but I could not find ‘next_posts_link’. this is the code:

    <div id=”nextprevious”>
    <div class=”alignleft”><?php posts_nav_link(”,”,’« PREVIOUS ENTRIES’) ?></div>
    <div class=”alignright”><?php posts_nav_link(”,’NEXT ENTRIES »’,”) ?></div>
    <div class=”cleared”></div>

    and if you go to my second page it is mentioned
    ‘Previous page’ ‘previous entries’ ‘next entries’ ‘next page’
    I need only ‘Previous Page’ in the index page and ‘previous page’ and ‘next page’ link in the inner pages according to number of pages.

    Please Can someone visit my site and give me a solution: https://www.j-k.in
    Thanks

    Thread Starter jinsenkaredath

    (@jinsenkaredath)

    forgot to mention: I have recenlty upgraded wordpress to 2.8 whether it has some missmatch with the earlier version of pixeled?

    OT, but… @t31os:

    You can link to your site in your profile

    I don’t really bother but I’ve done that and my site isn’t showing up just like on imranexpt‘s profile page. Nor is my name – on this page – turned into a link. Must have to do with a user’s activity, right? No posts, no love?

    Try replacing the two lines from the code above with the following:

    <div class=”alignleft”><?php previous_posts_link(); ?></div>
    <div class=”alignright”><?php next_posts_link(); ?></div>

    You can read more about the functions here and there if you want to.

    https://codex.www.ads-software.com/Template_Tags/posts_nav_link#Examples

    Look for something like this in your file (your’s may look slightly different of course).

    <?php next_posts_link('&laquo; Previous posts');echo ' ';previous_posts_link('Newer posts &raquo;');?>

    Those functions create the Next/Previous post links… as oppose to the page next/prev links…

    To add chschenk, i think you got it the wrong way round, that’s the one’s he wants to remove… ??

    Regarding profile linkage, i posted a test thread in the misc forum from a fresh account, and yes it does appear new accounts don’t link…

    Strange, you’ve been here longer then me, yet i have active links on 2 profiles… :-s

    Thread Starter jinsenkaredath

    (@jinsenkaredath)

    chschenk:
    Thanks, its working, the problem is for previous page it says next page and aligned at the right side

    Thread Starter jinsenkaredath

    (@jinsenkaredath)

    t31os_
    Thanks, is there any way to correct it?

    Can you elaborate on what you want to do a bit more?

    If you currently have…

    <div id="nextprevious">
    <div class="alignleft"><?php posts_nav_link('','','? PREVIOUS ENTRIES') ?></div>
    <div class="alignright"><?php posts_nav_link('','NEXT ENTRIES ?','') ?></div>
    <div class="cleared"></div>

    You will naturally get 2 links, 1 left and 1 to the right…

    class=”alignleft” , floats elements to the left..
    class=”alignright” , floats elements to the right..

    Please clarify exactly how you want it to behave…

    NOTE: if you want to get rid of the single/per post Prev/Next links, then remove the next_posts_link() and previous_posts_link() calls.

    Thread Starter jinsenkaredath

    (@jinsenkaredath)

    Thanks all:

    I got it… just changed the code and it is working…

    thanks for your time ??

    Jinsen Karedath

    Thread Starter jinsenkaredath

    (@jinsenkaredath)

    t31os_:

    thanks I made it

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Showing previous page and next page with same link’ is closed to new replies.