WordPress.org

Ready to get started?Download WordPress

Forums

Global Content Blocks
[resolved] Block in widget (5 posts)

  1. Francesco Canovi
    Member
    Posted 9 months ago #

    Is it possible to put the content block shortcode in a widget?
    Thank you and best regards!

    http://wordpress.org/extend/plugins/global-content-blocks/

  2. benz1
    Member
    Plugin Author

    Posted 9 months ago #

    Sure, in a text widget just wrap the shortcode in the PHP function
    <?php echo gcb(x);?>
    where x is the content block ID.

    You may need to install a plugin that allows you to use php in widgets.

  3. Bike
    Member
    Posted 1 month ago #

    Could you add a widget with the plugin that accepts short codes? So no PHP-accepting widgets are needed?
    Thanks!

  4. benz1
    Member
    Plugin Author

    Posted 4 weeks ago #

    Not exactly sure what you mean but you could try it and see if it works?

  5. v3r50r
    Member
    Posted 3 weeks ago #

    this could also be done by just using the shortcode itself in the text.
    Eg: [contentblock id=xx] inside a text widget. The text widget evaluates shortcodes. If you have another widget, then you need to make sure it evaluates shortcodes in its content processing function.

    If you provide an example, I could assist you further

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.