• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Plugin shortcode not working in text widget

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Plugin shortcode not working in text widget

This topic is: not resolved
  • This topic has 2 replies, 3 voices, and was last updated 10 years, 12 months ago by upthink.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 8, 2015 at 9:18 am #155376
    spamis
    Member

    I am using a Genesis theme with the Daniel child. I have looked at another Daniel website that used WordPress FAQ Manager to create a nice accordion FAQ in the sidebar and I want to do something similar for the site I am developing so I uploaded WordPress-FAQ-Manager. When I use the WordPress FAQ Manager shortcode in the text widget, the questions and answers appear in the sidebar but the accordion doesn't work - they are expanded and not collapsed. If the content area and the widget both have the shortcode inserted, then the expand/collapse feature works, but on both sides at the same time. Click on the sidebar faqs question and it expands along with the question and answer in the content area. Click on the question again and they both collapse. When I remove the shortcode from the content area, the sidebar faq reverts to expanded (will not collapse). The "Include jQuery collapse/expand" box is checked in the faq manager settings which explains why the shortcode works in the content area. When the FAQ works (expands/collapses) in the content area I see that the script (faq.init.js) and the css (faq-style.css) that make the accordion work are loaded but the script and css are not loading when only the text widget contains the shortcode. As I mentioned, the faqs accordion works properly on another website using the Daniel theme with the shortcode in the text widget. BTW, I placed the code //* enable shortcodes in widget area add_filter('widget_text', 'do_shortcode'); in the function.php file but it did not fix the problem. The site is password protected while it's being developed. Any suggestions will be appreciated.

    June 10, 2015 at 11:58 am #155747
    Marcy
    Participant

    I don't have access to Daniel, so can't tell you the exact code to use.
    You could ask on the web-savvy-marketing.com forums.

    But in general you need to enqueue the js/css files for the site, so that they are on every page for the sidebars.
    This WPBeginner post has a good explanation under the heading "How to Properly Enqueue Scripts in WordPress"
    http://www.wpbeginner.com/wp-tutorials/how-to-properly-add-javascripts-and-styles-in-wordpress/

    You need to add that code to your functions.php and then make sure that you edit it for all the files you need to enqueue for the FAQ Manager


    Marcy | Amethyst Website Design | Twitter

    June 10, 2015 at 12:00 pm #155749
    upthink
    Participant

    Putting this line in your theme functions.php file should help:
    add_filter('widget_text', 'do_shortcode');

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble