-2

I'd like to build the breadcrumbs for a one-page.

I would like to know if there is some way to change title in the header by scrolling site.

When screen 1 is active, display screen 1 title.

When screen 2 is active, display screen 2 title.

Please advise any plugin or case. (Word press)

Screen Shot

Sham Dhiman
  • 1,348
  • 1
  • 21
  • 59
  • 1
    Please go read [ask]. You are expected to do a little more here than just present us with your requirement. And asking for plugin recommendations is explicitly considered off-topic here, https://stackoverflow.com/help/on-topic – 04FS Apr 17 '19 at 11:32

1 Answers1

0

If you are using a custom theme, you can enqueue a Java Script file to do that functionality with jQuery. Your theme > functions.php

add_action('wp_enqueue_scripts', 'my_dynamic_breadcrumb');`function my_dynamic_breadcrumb() {
$target_pages = array(
    'my-landing-page',
);
if ( is_page($target_pages) ) {
wp_register_script(
        'handle_dynamic_breadcrumb',
        get_stylesheet_directory_uri().'/inc/assets/js/handle_dynamic_breadcrumb.js',
        array( 'jquery', ),
        '1.0.0',
        true
    );
    wp_enqueue_script('handle_dynamic_breadcrumb');

} `

Substitute my-landing-page with your page slug and the jQuery file name. Then inspect the HTML tags in the header to insert the dynamic subtitle. The jQuery code should bind a function into the scroll event and detect the part of the page, then change the subtitle.

A. B.
  • 1