Pagination on Posts Page

Posted in: Newspaper
Post count: 263

Hey, for each of my posts I have about 15 photos going down the post. Is there a possible way I can create that into separate pages so there can be 3 pages (5 on each page). Basically a pagination for the posts. Thanks in advance!

Post count: 3343

Hi,
You can use in post this <!--nextpage--> and brake the post in multiple pages.

Post count: 263

Thanks, that worked! Any way of changing the text ‘Next’ to ‘View More’?

Post count: 3343

Hi,
Translate it from Theme panel -> Translations

Post count: 263

@Marius, what is the .php page for the photo attachment page? Also, is there a PHP code for the Previous/Next so I can insert it in there?

Post count: 3343
Post count: 263

Hey guys,

How do I add the pagination shortcode above the below post ad?
http://screencast.com/t/gkeheKhGxx

Also, where do I go to customize those pagination buttons?

Post count: 263

For example, using the shortcode
[vc_button title="Button" target="_self" color="default" size="size_large2" href="#"] style as the buttons or styling the next shortcode myself?

Post count: 6600

Hi,

You can try adding it using the do_shortcode function for custom ad box and add it like this in the loop-single.php file: http://screencast.com/t/QexjAdJiBuVZ

Here is the code you need:

<?php echo do_shortcode('[td_ad_box spot_id="custom_ad_3"]'); ?>

Also add your ad code inside the Custom ad 3 like this: http://screencast.com/t/IdQeUAdg

This way you have to remove the article bottom ad and the custom ad will remain under the pagination and above the prev/next post.

Use this css to arange it:

.single .td-a-rec-id-custom_ad_3 {
margin-top: -20px !important;
margin-bottom: 20px !important;
}  

Use this class to style the post pagination:

.page-nav-post {
padding: 0px;
margin-bottom: 42px;
}

like this: http://screencast.com/t/OZmQAGbb

Hope this helps!
Thanks

Post count: 263

I will give this a try, thank you.

And to style the <!–nextpage–> so the buttons are larger, is there a way? I also am looking to add these above the photos too.

Also, can we remove the numbers and just have the [Previous] 1 of 20 [Next] so a user can’t click the numbers but will have to go through all 20?

  • This reply was modified 12 years by sbo.
Post count: 263

What is the article_bottom_ad? I tried the below and no luck.
<?php echo do_shortcode(‘[td_ad_box spot_id=”article_bottom_ad”]’); ?>

This right here is basically what im trying to accomplish:
http://screencast.com/t/r9hhfebNt7d

Moving the 728×90 below <!–nextpage–> shortcode, center pagination, removing the numbers in between the first and last page but keeping the amount there and create the buttons larger. And inserting the pagination above the image.

I would have imagined the ad code would be in loop-single, or if there is a php echo code that can be placed inside there.

*For the time being, I manually placed the ad code in loop-single.php and removed the article_bottom_ad.*

  • This reply was modified 12 years by sbo.
  • This reply was modified 12 years by sbo.
Post count: 263

Found the shortcode for article_bottom_ad = content_bottom* as for the pagination, let me know when you can. Thanks.

Post count: 6600

Hi,

You can try this css to style post pagination:

.single .page-nav-post {
text-align: center;
}
.single .page-nav span {
min-width: 50px;
}

This will center the post pagination and make it wider, you can change the values as you want. Removing the numbers in between the first and last page it’s not an easy task and need custom work, you can try it yourself if you want.

About the pagination above the image, I gave you the solution to add the ad box, and place it after the content in the loop-single.php file like this: http://screencast.com/t/uEBPCkfawmC

Make sure you have remove the article bottom ad from theme panel also.
Should get this result: http://screencast.com/t/BOVvHX5K

Thanks

Post count: 263

@Lucian, this is in regards to removing the numbers in between the Previous and Next pagination. Does the theme have a content-single.php? I see the content-single-topic, forum and user.php in the Editor.

I found this help http://codex.wordpress.org/Function_Reference/wp_link_pages so I am trying to find the code:

wp_link_pages() {
}

Any extra help that you find from that link is welcome 🙂

Thanks in advance!

Post count: 6600

Hi,

You can find the post pagination function here http://screencast.com/t/jYNpLWVYp
This is the function that adds prev and next links to a numbered link list http://screencast.com/t/AmX2jgQGGn

Hope this helps!
Thanks

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