• Resolved marbaque

    (@marbaque)


    I have a custom navigation function I created for a custom post type, which has its own template. When I activate the badgeOS plugin it shows the default wordpress navigation instead of my theme navigation.

    My function:
    function flexieduca_post_navigation() { the_post_navigation(array( ‘next_text’ => ‘<span class=”meta-nav” aria-hidden=”true”>’ . __(‘Next’, ‘flexieduca’) . ‘</span> ‘ . ‘<span class=”screen-reader-text”>’ . __(‘Next post:’, ‘flexieduca’) . ‘</span> ‘ . ‘<span class=”post-title”>%title</span>’, ‘prev_text’ => ‘<span class=”meta-nav” aria-hidden=”true”>’ . __(‘Previous’, ‘flexieduca’) . ‘</span> ‘ . ‘<span class=”screen-reader-text”>’ . __(‘Previous post:’, ‘flexieduca’) . ‘</span> ‘ . ‘<span class=”post-title”>%title</span>’, )); }

    I expect having this custom navigation but what I get is the default navigation. If I deactivate BadgeOS, my custom navigation function is correctly loaded.

    Any ideas of what part of BadgeOS can be causing this conflict?

    BadgeOS: 1.4.9
    WordPress: 4.9.1
    Template: Custom theme created with underscores

    • This topic was modified 7 years, 2 months ago by marbaque.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Wooninjas

    (@wooninjas)

    Hey @marbaque

    Please update the plugin to the latest version (1.4.11), See changelog here

    Add below snippet to your active theme functions.php and replace wn_android with your custom post type slug.

    add_action( 'wp_head', function() {
        if( is_singular( 'wn_android' ) ) {
            remove_filter('previous_post_link', 'badgeos_hide_previous_hidden_achievement_link');
            remove_filter('next_post_link', 'badgeos_hide_next_hidden_achievement_link');
        }
    });

    We will surely make the plugin more flexible in future updates.

    Thanks

    Thread Starter marbaque

    (@marbaque)

    Awesome, thank you. That should do! it works!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post navigation conflict’ is closed to new replies.