NameSilo

How can I have a page 1-5 instead of next page?

NamecheapNamecheap
Watch
Status
Not open for further replies.

stel

Established Member
Impact
7
Hi all! Thanks for reading my query, my website is http://funnycat.pics and at the end of the page, I have just got "next page".
I would love for it to be like show 1-5 (1, 2, 3, 4, 5..End.. Something like that) or 1-10, any help on this would be very much appreciated!

Stel
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
just put 1 > 10 instead of "next page", in the code


as the links says > funnycat.pics/page/2 if you want, you can change the page titles to funnycat.pics/page_2/ funnycat.pics/page_3/ etc. etc.
 
2
•••
Last edited:
0
•••
Thanks @biggie! I tried to change next page to 1 > 10, however it just said 1 > 10, not the actually showed it.


Code:
    <div class="oldernewer">
            <p class="older"><?php next_posts_link(' Next Page &raquo;') ?></p>
            <p class="newer"><?php previous_posts_link('&laquo; Go Back') ?></p>
        </div><!--.oldernewer-->
             </div><!--content_inner ends-->

This is where I changed it


@IceDude, thanks for the plugin! I will use it if I fail to sort it out with code, good to know there is a backup easy route.
 
0
•••
0
•••
What do you mean @biggie ? change the whole thing to 1> 10? or add <pclass="older"><ahref="http://funnycat.pics/page/2/"> Next Page &raquo;</a></p> instead of the next posts link?

do i literally change the whole thing to

1> 10



I'm new at this so please have patience :P
 
0
•••
I've tried two things:

Changed
<p class="older"><?php next_posts_link(' Next Page &raquo;') ?></p>

to

1> 10

and also changed

<p class="older"><?php next_posts_link(' Next Page &raquo;') ?></p>

to

<p class="older"><?php next_posts_link('1> 10') ?></p>

Neither worked out, did you mean something else?
 
0
•••
I also tried <p class="older"><?php 1> 10 ?></p> with no success
 
0
•••
1
•••
I also tried <p class="older"><?php 1> 10 ?></p> with no success

And, this code is wrong anyway. You are asking PHP is 1 > 10 which would return a Boolean value of false.... But, you will get a syntax error, because you forgot to terminate the statement anyway...
 
2
•••
Look's like you're using WordPress. Just download the plugin from the following link and set the options.

https://wordpress.org/plugins/simple-pagination/
I haven't used this plugin before so can't speak that it's using best practices or not. Ensure you're doing it right by viewing the source and focusing on the paginated link tags it creates within the head. Look for newer pages (the one before) containing the attribute of rel="prev", rel="next" for older and rel="canonical" for the page you're currently on (i.e. page 2). Additionally, if you're going to come up with your own solution as you're limited to only so much you can do with prefab plugins, study what canonical links are so you don't mess up your entire pagination tinkering with it.

From Google: http://googlewebmastercentral.blogspot.jp/2011/09/pagination-with-relnext-and-relprev.html
Explains it quite well why the use for all 3. (replace .jp with .com if it doesn't work, it's not letting me go to the English only site, but it only says Login in Japanese, the rest of the content is in English. As these are two similar pages, there may be a canonical link between the .jp/.com).

I believe Yoast SEO does pagination and a lot more. However, I'm unsure if the free version comes with it, and if it does, is it limited to certain styles. Nonetheless, it's loaded with a ton of features and in my opinion, a must have for any site running WordPress if you're unfamiliar in certain aspects and a keeper just in case you want to throw up a good quality site within minutes.
 
1
•••
There are many wordpress plugins that hook into the website without needing to edit code. Some require pasting in a function call within the code, which you would need to modify on the theme. Not all will work automatically if you have a non-standard theme.
 
0
•••
Thank you for the responses! I would prefer to try it organically before using any plugins, When I wake up i will read through the resources and try it.
 
0
•••
Status
Not open for further replies.
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Zero Commission
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back