• 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

How To: Plugin Shortcode in Custom Page Template

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 › How To: Plugin Shortcode in Custom Page Template

This topic is: not resolved

Tagged: s2member, short code

  • This topic has 3 replies, 3 voices, and was last updated 10 years, 2 months ago by surajtamka.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • August 30, 2015 at 11:01 pm #164088
    kutu62
    Member

    I've worked on this for longer than I'd rather admit, please help.

    How do I output a plugins shortcode into genesis page template?

    I've tried echo do_shortcode and lots of other ideas, and the output of the shortcode isn't as if the shortcode was placed directly in a post or page.

    Here's the shortcode from S2MEMBER

    
    <?php
    /*
    Template Name: Make it work
    */
    // Force full width content
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    
    echo do_shortcode("[s2Member-Pro-PayPal-Form level="4" ccaps="" desc="$5.00" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="fantasyknuckleheads.com" ta="0" tp="0" tt="D" ra="75.00" rp="1" rt="M" rr="1" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]"); 
    
    genesis(); ?>
    

    What Im I doing wrong?

    August 31, 2015 at 12:02 am #164090
    coralseait
    Member

    You might try single quote around the shortcode itself so:

    echo do_shortcode('[s2Member-Pro-PayPal-Form level="4" ccaps="" desc="$5.00" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="fantasyknuckleheads.com" ta="0" tp="0" tt="D" ra="75.00" rp="1" rt="M" rr="1" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]');

    But, are these real shortcodes by the plugin or is it doing something like a regular expression check and then replacing things? Sometimes plugins don't actually register real shortcodes, you'd have to check the plugin code to be sure.


    Coral Sea IT

    August 31, 2015 at 8:31 am #164121
    kutu62
    Member

    no the single quote kills it even worse..

    I think it has something to do about all the variables in short code..

    April 12, 2016 at 11:28 pm #183499
    surajtamka
    Member

    Shortcodes are reusable piece of code snippets which acts as shortcuts to provide complex functionalities and display options.
    Generally, shortcode design templates are placed inside the page editor and you can add or modify with necessary data to generate custom designs.
    The following image shows a shortcode used for creating a design with tabs.

    Each of the above approaches has its own pluses and minuses in different situations. Choosing the right one for the right occasion is the challenge as a WordPress developer.
    Inexperienced developers tend to misuse both of these techniques, so here we will be looking at the things to consider before choosing shortcodes or page templates to provide custom designs.
    We enhanced these plugin in our collectoffers blogs, it’s working fine.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 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

© 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