Support » Plugin: Global Content Blocks » I can't get the content block to work in a widget

  • Resolved jvknight

    (@jvknight)


    I’m quite sure I’m doing something wrong (since I have NO php experience) and I can’t seem to get the right combination of things put together to get the shortcode to work in a widget. I have added the code lines I found to functions.php and am still not getting things right.

    Help! Please. Thank you!

    Many blessings

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author benz1

    (@benz1)

    Hi jvknight, I’m not sure why you would need to do anything in functions.php to get this to work? All you need to do is wrap the shortcode in a in the PHP function, see http://wpxpert.com/using-content-blocks-in-themes-widgets.

    Plugin Author benz1

    (@benz1)

    removed

    I thought I had tried that, tho with my inexperience with php code, maybe I put things together incorrectly. When you say “wrap the shortcode in the PHP function”, what I did in the sample was replace the “x” with the shortcode # (in this case a “4′) … is that incorrect? I know shortcodes work in the widget out of the box for the theme (I tested that).

    Plugin Author benz1

    (@benz1)

    Yes, that is correct but you’ll have to install a plugin such as http://wordpress.org/extend/plugins/enhanced-text-widget/ that will let you use php in a widget.

    Hi Benz1…I’m using the ultimate tinymce widget and per it’s write up I can use it to add php to the sidebar widgets. I’m going to try this again and see if I guoobered it up (yup, that’s a techie term…smile)

    OK, it worked this time. Who knows what the heck I was doing…I was on a test site, so maybe one of the other things were causing an issue!+

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I can't get the content block to work in a widget’ is closed to new replies.