• Resolved Nic727

    (@nic727)


    Hi,

    I created an option for my site customization

    $wp_customize->add_setting( 'sub_title', array(
            'type' => 'theme_mod',
            'default' => __( 'Laissez-vous guider par la soif d\'aventures et la découverte du monde', 'aurora' ),
            'sanitize_callback' => $pgwp_sanitize
        ));

    And on my page I have

    <div class="page-title home-title"> 
            <h1><?php bloginfo( 'description' ); ?></h1> 
            <h2><?php echo get_theme_mod( 'sub_title' ); ?></h2> 
        </div>   

    However, I really don’t understand, because when editing in the live editor, I can see the change of the sub_title, but when publishing and viewing from the main website, I can’t see it…

    https://i.postimg.cc/Y0gHSpkJ/Capture-d-cran-2021-05-09-160028.png
    https://i.postimg.cc/kX3Cptv9/Capture-d-cran-2021-05-09-160053.png

    What’s wrong?

Viewing 1 replies (of 1 total)
  • Thread Starter Nic727

    (@nic727)

    Nevermind… In fact the default text is just not showing, so I needed to cut and paste the text already there… Go figure.

Viewing 1 replies (of 1 total)
  • The topic ‘echo get_theme_mod not showing on live website’ is closed to new replies.