Site logo

[Support request] Standard pager for *pages*

Home Forums Support [Support request] Standard pager for *pages*

Home Forums Support Standard pager for *pages*

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2508353
    nudnavda

    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.

    #2508378
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to the pager plugin so i have some reference as to what you require ?

    #2508398
    nudnavda

    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!

    #2508431
    David
    Staff
    Customer Support

    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.

    #2508477
    nudnavda

    Thanks, David – works!

    #2508525
    David
    Staff
    Customer Support

    Awesome – glad to hear that!

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