WordPress.org

Ready to get started?Download WordPress

Forums

Cannot call PHP Function to other pages of the site (10 posts)

  1. c0mradeIndi
    Member
    Posted 2 years ago #

    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. :)

  2. JarretC
    Member
    Posted 2 years ago #

    Are you using

    <?php get_header() ?>

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

  3. Pavan
    Member
    Posted 2 years ago #

    Try to write this in functions.php file

  4. c0mradeIndi
    Member
    Posted 2 years ago #

    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.

  5. JarretC
    Member
    Posted 2 years ago #

    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.

  6. c0mradeIndi
    Member
    Posted 2 years ago #

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

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

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

    Inner pages don;t display the lang. bar... :(

  7. jghazally
    Member
    Posted 2 years ago #

    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?

  8. c0mradeIndi
    Member
    Posted 2 years ago #

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

    The plugin is Global Translator.

  9. c0mradeIndi
    Member
    Posted 2 years ago #

    Can someone help this poor toad out? :(

  10. jghazally
    Member
    Posted 2 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic