- This topic has 14 replies, 3 voices, and was last updated 6 years, 2 months ago by Tom.
-
AuthorPosts
-
February 2, 2018 at 4:28 am #486304Damiaan van Vliet
Hi great support team,
I try to implement a plug-in like WP Paginate or BWS Pagination because wp-pagenavi is not supported anymore.
I tried several options to get one of these plug-ins to work but no luck.E.g. adding the codes to the functions.php or single.php or in wp hooks.
Do you have tips or ideas for this?
I can give more details but maybe there is something general to tell about implementing those plug-ins because they globally work on the same way.Thanks!
February 2, 2018 at 4:36 am #486308Damiaan van VlietOh with wp-pagenavi I normally have this:
PHP
add_action(‘generate_paging_navigation’,’generate_pagenavi_integration’);
function generate_pagenavi_integration()
{
wp_pagenavi();
}CSS
.page-numbers {
display: none;
}February 2, 2018 at 8:39 am #486502LeoStaffCustomer SupportHi there,
Can you provide the installation instruction from the plugin you are trying to implement?
Thanks!
February 5, 2018 at 1:42 am #488178Damiaan van VlietOf course Leo. For example the plug-in WP-paginate.
I have to replace code within index.php (child theme) but the code they suggest I don’t see.
Code with the_posts_pagination; for more info see:
wp paginate infoThanks!
February 5, 2018 at 9:37 am #488593TomLead DeveloperLead DeveloperYou can use this hook:
add_action( 'generate_paging_navigation', 'tu_add_wp_paginate' ); function tu_add_wp_pagination() { if ( function_exists( 'wp_paginate' ) ) { wp_paginate(); } }
Then add this CSS:
.nav-previous + .nav-links { display: none; }
February 7, 2018 at 12:42 am #490170Damiaan van VlietThanks Tom for reply. I tried it but it is not working, or I am blind (which is sometimes possible) π
I thought it is visible for example on the News page or the seperate blog posts.
February 7, 2018 at 10:07 am #490595TomLead DeveloperLead DeveloperIs there a specific page on your site I can check out to see why it’s not showing up?
February 8, 2018 at 12:21 am #491046Damiaan van VlietHi Tom,
I noticed I had too little posts so now it is visible on the blog page π
test site news page
But the pagination is not on the right position.
Also, I thought it should be visible on a single news page like this one:
test site blogpostBut maybe I have to ask the developer of the plug-in?
Thanks!
February 8, 2018 at 11:19 am #491535TomLead DeveloperLead DeveloperYou used this hook?:
generate_paging_navigation
The HTML seems to be appearing outside of that element.
February 12, 2018 at 7:20 am #494451Damiaan van VlietHi Tom,
I placed the following code on GP Hooks, Before Header (did not know exactly which hook I need to choose)<script> add_action( 'generate_paging_navigation', 'tu_add_wp_paginate' ); function tu_add_wp_pagination() { if ( function_exists( 'wp_paginate' ) ) { wp_paginate(); } } </script>
February 12, 2018 at 9:45 am #494563TomLead DeveloperLead DeveloperInstead of using hooks, use one of these methods: https://docs.generatepress.com/article/adding-php/
February 12, 2018 at 10:33 pm #494950Damiaan van VlietHi Tom,
Tried that also. Added the following to functions.php on my child theme:add_action( 'generate_paging_navigation', 'tu_add_wp_paginate' ); function tu_add_wp_pagination() { if ( function_exists( 'wp_paginate' ) ) { wp_paginate(); } }
Also disabled all plug-ins except GP Premium and WP Pagination and still the same.
Odd.
February 13, 2018 at 8:37 pm #495816TomLead DeveloperLead DeveloperStrange.. Let’s do this then:
.generate-columns-container article + .navigation { -webkit-box-flex: 1; -webkit-flex: 1 1 100%; -ms-flex: 1 1 100%; flex: 1 1 100%; clear: both; text-align: center; }
February 14, 2018 at 11:40 pm #496914Damiaan van VlietYes, working!! You’re the man π
I also addded:
.generate-columns-container .paging-navigation { display: none; }
Because the old navigation also was visible.
But solved, thanks Tom!
February 15, 2018 at 10:26 am #497467TomLead DeveloperLead DeveloperGlad I could help! π
-
AuthorPosts
- You must be logged in to reply to this topic.