Archived topic
Standard pager for *pages*
5 replies · Started by nudnavda on January 25, 2023
Hi,
unlike the inbuilt navigation for posts - and the beautiful navigation element templates - I cannot find any solution for a dynamic page-title navigation.
Does this necessarily require a plugin? The pager-plugin seems to be no qualified block: cannot use its widget in an element.
Thanks for your help.
Hi there,
can you share a link to the pager plugin so i have some reference as to what you require ?
https://nl.wordpress.org/plugins/pager-widget/
https://github.com/uhm-coe/pager-widget
I use it still on a poetry site (Dutch), for instance:
https://www.gedel.nl/vertalingen/william-bronk/
In the same way (so with title-names, but no plugin) I would like to implement this on:
https://dharmoebe.nl/visie/dharmium-boek/
Thanks!
OK, so that plugin if it requires a widget area, then you could add this PHP snippet to your site:
function db_menu_bar_items_widget_area() {
register_sidebar( array(
'name' => 'After Content Widget',
'id' => 'after_content_widget',
'before_widget' => '<div>',
'after_widget' => '</div>',
) );
}
add_action( 'widgets_init', 'db_menu_bar_items_widget_area' );
add_action('generate_after_content', function(){
if ( is_active_sidebar( 'after_content_widget' ) && is_page() ) : ?>
<div id="primary-sidebar" class="menu-sidebar widget-area" role="complementary">
<?php dynamic_sidebar( 'after_content_widget' ); ?>
</div>
<?php endif;
});
It will create a Widget Area after the Content on all pages, called: After Content Widget
Then you can try adding that plugins widget there.
Let me know.
Thanks, David - works!
Awesome - glad to hear that!