• Resolved voicetoons

    (@voicetoons)


    Can’t see how to add shortcode to all pages. Does not appear unless we add shortcode to pages. We have far to many to add them manually. Help? We have unchecked show on home page only.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Iftekhar Alam

    (@ikialam)

    Hi @voicetoons,

    Thanks for your question! Yes, the [shortcode] needs to be added manually to the pages where you want the ticker to appear – that’s how it’s designed to work by default.

    If you have many pages and want the ticker to appear site-wide, instead of manually inserting the [shortcode] on each one, you can:

    ✅ Use a widget or template injection:

    • Add the [t4b-ticker] shortcode in a widget area (like a header, footer, or sidebar) using the [shortcode] block or a [shortcode] widget.
    • Or, if your theme supports it, insert it into a template file using PHP:
      echo do_shortcode('[t4b-ticker]');

    This way, it will automatically show on all pages without editing each one.

    Let me know how you’d like it displayed, and I’ll guide you accordingly!

    Best regards,
    Iftekhar

    Thread Starter voicetoons

    (@voicetoons)

    Thank you. Tried a html, text, and header widget no luck. Tried code snippets no luck. Open to further help as offered. Thx.

    Plugin Support Iftekhar Alam

    (@ikialam)

    Hi @voicetoons,

    Thanks for trying and for following up!

    In WordPress, [shortcodes] are designed to display content only on the pages or posts where you place them. So this isn’t something specific to the T4B News Ticker plugin – it’s actually how all WordPress [shortcodes] work by default.

    If you want the ticker to appear automatically across all pages, instead of adding the [shortcode] manually everywhere, you can place it directly inside your theme – such as in header.php or footer.php. That way, it loads globally without needing to insert it on each individual page and this is a clean and reliable approach.

    Option 1: Add to a Template File (Recommended)

    If you’re using a child theme (recommended to avoid overwriting during updates), you can:

    1. Go to your WordPress theme files via Appearance → Theme File Editor (or access your site via FTP or File Manager).
    2. Open a template file where you’d like the ticker to appear globally – such as:
      • header.php → for showing the ticker right under the top bar.
      • footer.php → for placing it at the bottom.
      • page.php, index.php, or a custom template part.
    3. Paste this line where you want the ticker:
      <?php echo do_shortcode('[t4b-ticker]'); ?>
    4. Save the file.

    This method works well and ensures the ticker shows up without affecting page editors or requiring content changes.

    Option 2: Add via functions.php (Alternative)

    If you prefer not to touch template files, you can insert the [shortcode] programmatically using your theme’s functions.php:

    add_action('wp_footer', function() {
    echo do_shortcode('[t4b-ticker]');
    });

    This will display the ticker at the bottom of every page automatically.

    Hope this clears it up and helps others too!If you’re not familiar with editing WordPress theme template files, I’d recommend asking help from someone experienced with WordPress development – or searching online for step-by-step guides on how to insert a [shortcode] into a theme file. There are plenty of tutorials available that cover this in detail.

    Best Regards,
    Iftekhar

    Thread Starter voicetoons

    (@voicetoons)

    Thank you again. Can we use a snippet in code snippet plugin? If so can you share what the code would be? We do not use a child thee. This code alone does not work…

    add_action(‘wp_footer’, function() {
    echo do_shortcode(‘[t4b-ticker]’);
    });

    Plugin Support Iftekhar Alam

    (@ikialam)

    Hi @voicetoons,

    Yes, you can use the Code Snippets plugin for that. Here’s the code you can add:

    add_action('wp_footer', function() {
    echo do_shortcode('[t4b-ticker]');
    });

    How to Use:

    1. Go to Snippets → Add New.
    2. Name it something like “Display Ticker Sitewide”.
    3. Paste the code above.
    4. Choose “Run snippet everywhere“.
    5. Save and activate.

    This will display the ticker at the bottom of every page.

    If you want the ticker to appear at the top of the page or just after the menu, you’d need to place the [shortcode] manually inside your theme’s header.php or another suitable template file.

    We’ve already shared the procedure for this earlier in the thread, in case you’d like to follow that approach.

    Best Regards,
    Iftekhar

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘How to Add Ticker Shortcode on All Pages’ is closed to new replies.