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?
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
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.
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.*
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
@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!
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
