WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Francesco Canovi
    Member
    Posted 1 year 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 1 year 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 4 months 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 months ago #

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

  5. v3r50r
    Member
    Posted 4 months 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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.