Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #835575

    Hello,

    I have a fixed top bar in my website (www.linchen.com.br), with my email.

    But, I would like to have a different email in different pages within the website, (for different products).

    How can I do this?

    Regards from Brazil.

    Newton

    #835634

    Hey newtonlinchen,

    Try adding this js code at the bottom of functions.php:

    function add_custom_script(){
    ?>
    <script type="text/javascript">
    (function($){
    	function change_topinfo() {
    		$(".page-id-111 .phone-info span").text('123456');
    		$(".page-id-112 .phone-info span").text('234567');
    		$(".page-id-113 .phone-info span").text('345678');
    	}
    
    	change_topinfo();
    })(jQuery);
    </script>
    <?php 
    }
    add_action('wp_footer', 'add_custom_script');

    Just replace .page-id-xxx with the right page id number and the number within .text() to be the new content. HOpe this helps :)

    Best regards,
    Nikko

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.