Shortcode in Bottom Bar or Top Bar

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4816
    Ciri
    Guest

    Hi Ron
    great job !

    I would like insert shortcode in “Bottom Bar” or “Top Bar”, but don’t work. By example, I have created a function “year” and don’t see the shortcode in “Bottom Bar” [year]

    any solution?

    Thanks and regards.

    #4817
    Ron
    Keymaster

    Shortcodes do not work on the “Footer Text” option. It only accepts Text & HTML. However, you have 4 action hooks to choose from that you can use to execute PHP on the Top and Bottom bar.

    frontier_before_top_bar
    frontier_after_top_bar
    frontier_before_bottom_bar
    frontier_after_bottom_bar

    You can use them like this (added on functions.php):

    function top_bar_extra() {
       // Add your code here
    }
    add_action( 'frontier_before_top_bar', 'top_bar_extra' );
    function bottom_bar_extra() {
       // Add your code here
    }
    add_action( 'frontier_before_bottom_bar', 'bottom_bar_extra' );
    #4886
    Ciri
    Guest

    Hi Ron,
    I added to function.php this function of probe:

    function shortcode_thanks() {
    return ‘ THANKS!
    ‘;
    }
    add_shortcode(‘thanks’, ‘shortcode_thanks’);

    and I put in the Frontier Options- Display- Footer Text this shortcode: [thanks]

    but don’t work,
    can you help me, please ? I’m not a “Guru” of PHP.
    Thanks and regards..

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Frontier’ is closed to new topics and replies.