Viewing 2 replies - 1 through 2 (of 2 total)
  • if you are referring to a static page, try to use a conditional statement based on is_page() https://codex.www.ads-software.com/Function_Reference/is_page

    if the telephone number is coded into header.php, try to replace if for example with some code like:

    <?php if( is_page( 'test1' ) ) { echo 'new number'; ) else { echo 'existing number'; }; ?>

    Thread Starter twinkleclean12

    (@twinkleclean12)

    Thanks

    So the piece of code in the header I want to change is

    <div class=”social-wrapper”>
    <?php
    $gdl_social_wrapper_text = get_option(THEME_SHORT_NAME.’_social_wrapper_text’);
    if( !empty($gdl_social_wrapper_text) ){
    echo ‘<div class=”social-wrapper-text”>’ . $gdl_social_wrapper_text . ‘</div>

    It pulls ‘ . $gdl_social_wrapper_text . ‘from a number which I enter into the template admin control panel.

    How would your example work here so that if it was page x it would show a new number otherwise apply code above?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘help with making a phone number in my header dynamic for one page only’ is closed to new replies.