• Hey Guys,

    I am calling a PHP funtion output of which is only visible in the Home page but I want it to work on all the pages of the site.

    It’s a language bar function.

    <?php gltr_build_flags_bar(); ?>

    I am including this in header.php

    Header.php is sposed to be visible throughout the site, no? Thanks for any help and thanks for your precious time. ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • Are you using

    <?php get_header() ?>

    at the beginning of all your files to make sure header.php gets included?

    Try to write this in functions.php file

    Thread Starter c0mradeIndi

    (@c0mradeindi)

    Yes. Everything(every function) in the header is visible throughout the site. Except this function, I can see the language bar only in the Home Page.

    Perhaps something related global function or something? :/ Thanks for the reply.

    Use a site like pastebin.com and give the link to your header.php file so I can take a look at the code to see if I can spot the problem.

    Thread Starter c0mradeIndi

    (@c0mradeindi)

    That’s really great of you Jarret. Here’s the link my Header.php

    The particular function is in Line 102.
    https://pastebin.com/x4g0MVQf

    In case if you want to take a look at the site – https://www.blackfishmarine.com/beta

    Inner pages don;t display the lang. bar… ??

    It seems your language plugin scripts are not being included on every page, what is the plugin you are using? is there an options page?

    Thread Starter c0mradeIndi

    (@c0mradeindi)

    Yes, there is an options page for the plugin under Settings Menu.

    The plugin is Global Translator.

    Thread Starter c0mradeIndi

    (@c0mradeindi)

    Can someone help this poor toad out? ??

    I would contact the Plugin developer, it seems to be a conflict between 2 plugins or a conflict with your theme,,, either that our your permalinks (you have index.php in them, which is weird sorry if you dont find this helpful but I believe the scripts are not being included to display your dropdown in a nice manner on pages which are not your homepage,, or jquery called twice, but cant view source cos Im not on my computer :/
    I would try getting a hold of the plugin author
    best
    jeff

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Cannot call PHP Function to other pages of the site’ is closed to new replies.