Help with adding pagination to posts
-
My theme (Soledad) does not support pagination and page break in posts. The result when I break the pages is this ugly thing. No blocks, no nothing.
http://i.imgur.com/9ZB4gah.png
Because of this I can’t find the function that I need to change in order to use the plugin’s pagination style. I imagine the file I need to add the strings is “single.php”, isn’t it?
Can you help me?
-
Hi,
In order to add pagination, it is necessary to add the appropriate function in your theme (http://i.prntscr.com/fb04a4a36d9a4ea194f0ed0aeefafaf3.png). As a rule, it is “single.php”. To hide the current pagination, please add
.penci-paginationclass on the plugin settings page and save changes (http://i.prntscr.com/b2fedda869f8461a881a127253a07e07.png).Sincerely,
BestWebSoft Support TeamPlease forgive my stupidity in programming. I was able to make the pagination show up, just not in the right place. Also, adding .penci-pagination on settings didn’t remove the ugly standard pagination.
If it isn’t any trobule, here are a few screenshots:
My single.php file: http://i.imgur.com/aoDtdrq.png
Settings page (Checking hide standard pagination also does no good): http://i.imgur.com/31vmGAX.png
Result: http://i.imgur.com/iNeIu3x.pngBest regards,
CaioHi,
If you want to hide the standard pagination, it is necessary to add a full point before “penci-pagination”. You’ve added the code correctly to “single.php” and pagination appeared (result screenshot). Now you can configure its appearance on the plugin settings page (Pagination by Bestwebsoft -> Appearance tab).
Sincerely,
BestWebSoft Support TeamIt’s still a no-go. Adding a point before penci-pagination didn’t remove the standard one and the pagination blocks won’t appear below the main content when I change it in options. Actually, Above and Below won’t work as well.
Anyhow, aren’t the blocks supposed to show below the title instead of above it?
Hi,
Please provide a link to your site where the pagination shows up.
Sincerely,
BestWebSoft Support TeamAs the page I intended to use pagination isn’t published yet, I added it to another post. Here’s how it looks:
http://cinegrandiose.com/2014/07/01/michael-kohlhaas-analise-e-impressoes/
Hi,
1) Pagination shows up at the top because the code has been added to the wrong file. Delete the code added earlier
<?php if ( function_exists( 'pgntn_display_pagination' ) ) pgntn_display_pagination( 'multipage' ); ?>from the “single.php” file and add it to “content-single.php” file where necessary.2) If you want to hide the standard pagination, please go to the plugin settings page, “Custom Code” tab, check off “Activate” checkbox for “Editing bws-custom-code.css” field, and add the following CSS code:
.post-entry .inner-post-entry>p:last-of-type { display: none; }Save changes and check results.
Sincerely,
BestWebSoft Support TeamWorked like a charm! Thank you very much!
Sorry to bother again. Actually, adding the CSS code to “bws-custom-code.css” removes the last paragraph in all of my other posts as well.
When the post has that standard pagination it goes away, for all the posts that aren’t paginated the last paragraph disappears. (In “Lists” the text vanishes, in other posts it’s the score I gave the movie/tv show)
Hi,
At the moment, we haven’t found any signs of Pagination work on your site.
The reason, why we decided to recommend you these styles, was that you’d like to hide pagination block generated in the last paragraph of your main content (see http://prntscr.com/c0zmpy). Since this block doesn’t have own CSS classes or ID so that just it could be hidden, we’ve added the style for the whole paragraph.
Now we can find pagination block generated by your theme on the main page (see http://prntscr.com/c0ztno). As you can see, this block has
penci-paginationclass. Because of this, we recommended to add.penci-paginationline into “Hide custom pagination” field on the plugin settings page.If we understand correctly, you’ve deleted
<!--nextpage-->tags from the content of your pages.Please let us know if you still need our help.
Sincerely,
BestWebSoft Support TeamSorry about that, I had removed the <!–nextpage–> because I thought the issue was solved. Just forgot to put it back.
So, if the block doesn’t have its own CSS class or ID, then there’s no way to hide it without hiding the last paragraph as well?
If not, then I guess I’ll keep both the standard pagination and the one you provide.
Cheers
Hi,
Unfortunately, if the paragraph has no id or class attribute, CSS style won’t be applied to all last paragraphs, and no matter if there is pagination or not.
Sincerely,
BestWebSoft Support Team
The topic ‘Help with adding pagination to posts’ is closed to new replies.