Community Forums › Forums › Archived Forums › Design Tips and Tricks › How To: Plugin Shortcode in Custom Page Template
Tagged: s2member, short code
- This topic has 3 replies, 3 voices, and was last updated 10 years, 2 months ago by
surajtamka.
-
AuthorPosts
-
August 30, 2015 at 11:01 pm #164088
kutu62
MemberI'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 #164090coralseait
MemberYou 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.
August 31, 2015 at 8:31 am #164121kutu62
Memberno 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 #183499surajtamka
MemberShortcodes 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. -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.