• 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

Premise and Product Description in the Sidebar (just like StudioPress)

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 › Design Tips and Tricks › Premise and Product Description in the Sidebar (just like StudioPress)

This topic is: not resolved

Tagged: premise, product description, shortcode, Sidebar

  • This topic has 2 replies, 2 voices, and was last updated 11 years, 12 months ago by hich.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • December 9, 2013 at 8:06 am #77826
    hich
    Member

    Need to use a custom code to add and process the product_description short code so it appears in the "sidebar" of the
    page. I need to add the code using the echo do_shortcode() method so it appears in my sidebar area on the checkout page. Can anybody help me with the code I shall insert?

    December 9, 2013 at 10:20 am #77842
    nutsandbolts
    Member

    Apologies if I'm missing the point or if this isn't helpful, but you can use shortcodes in widgets by adding the following to functions.php:

    // Enable shortcodes in widgets
    add_filter('widget_text', 'do_shortcode');

    And you can allow PHP in widgets with this function:

    // Enable PHP in widgets
    add_filter('widget_text','execute_php',100);
    function execute_php($html){
         if(strpos($html,"<"."?php")!==false){
              ob_start();
              eval("?".">".$html);
              $html=ob_get_contents();
              ob_end_clean();
         }
         return $html;
    }

    Hopefully that helps.


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    December 9, 2013 at 10:33 am #77844
    hich
    Member

    Hi!

    Many thanks for your fast reply. In fact, I will have to add the code in the template not the widget area. The reason for that is simple; There's only one checkout page and several products. We can modify the widget area in the sidebar for one product only, but each time a user click on the checkout link he must get the full product description. Just like StudioPress when you checkout to buy a theme, you have in the sidebar right "your order summary" for each of the themes. It's a different sidebar per product.

    Let me know 🙂 and many thanks!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ 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

© 2025 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