Support » Plugin: Notibar - Notification Bar for WordPress » I can’t use Shortcode to replace the Content Text

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Bruce

    (@ninjateamwp)

    Hi @shoboysnr ,

    Thanks for using Notibar!
    I am sorry but that text area does not support shortcode and that is why it is not responding to your shortcode.

    Kind regards,
    -Bruce-

    multisite2masochist

    (@multisite2masochist)

    If you look in plugins/notibar/views/pages/home/home-notification-bar.php around line 33 you’ll see
    echo wp_kses_post($textContent)
    and that’s where they show the content from the text field in the customizer. You can replace that with another line of code. For example, I went to mysiteurl.org/wp-admin/edit.php?post_type=wp_block and made a reusable block, got it’s id (it was 12216), and used it to replace the notibar content
    echo get_post_field( 'post_content', 12216 )
    so you could do something similar to put content from a shortcode or other plugin into notibar. There’s probably an elegant way to hook your shortcodes right in there but this is just a quick 5 minute look into, you can hack together a real solution starting there.

    Plugin Support Bruce

    (@ninjateamwp)

    Hi @multisite2masochist ,

    Thank you so much for the contribution!

    Also, @shoboysnr , please note that our developers have acknowledged your request and so we will add this feature in upcoming updates.

    Cheers,
    -Bruce-

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I can’t use Shortcode to replace the Content Text’ is closed to new replies.