Jump to content

Php Execution (Nextbox for Platform 5)

Recommended Posts


In the past I would use nextbox for this task. However, Platform 5 does not have nextbox. I will do my best to describe what I am trying to do.

I am creating a template for coaches, each product has its own link but they all share a common coach id. I want to set up the templates with the links for each product with a variable for the coach id so that I can change the coach id for all the links on the site by just changing the value of the variable $coachId. To do this I'll need to do something like the following...

<a href="salesite.com/productcodes/referringRepId=<?= $coachId ?>" target="_blank">Product Purchase Link</a>

Is it possible to do this with Platform 5?

Share this post

Link to post
Share on other sites

Hi Simon,

Thank you for getting back to me. I did play with the pagelines shortcodes but of course they aren't set up to do what I am trying to since its probably not a really common need. To be honest I have never messed with shortcodes much other than pre-made ones and that is me being lazy and refusing to step outside my comfort zone. I am looking into the article you referenced to learn how to create them. 

Thank You! 


Share this post

Link to post
Share on other sites


So, a little research and experimenting and I found that a custom shortcode is exactly what I needed for what I want to do. Thank you very much for the article. The following is what I used to make this work and now all I will have to do is change the id and its ready to go for a new coach :) 

Shortcode Function 

//Create function for shortcode to create global Referring Coach Id links.
add_shortcode ('coachId', function($atts) {
	$atts = shortcode_atts(
			'src' => '',
			'target' => '_blank',
			'class' => '',
			'cta' => 'Order Now'
 		), $atts);
	return '
	<a href="' . $atts['src'] . 'referringRepId=212594" target="' . $atts['target'] . '" class="' . $atts['class'] . '">' . $atts['cta'] . '</a>

Shortcode in Wordpress Content

[coachId src="https://salesite.com/signup/" cta="Become a Coach"]


Hope this helps someone out! I'm off to see what else I can learn!

Thanks Again Simon!!

Share this post

Link to post
Share on other sites

I told you it was easy ;)

  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • KathleenAspenns
      By KathleenAspenns+
      I would like to upgrade my site to PHP 7, but there is an error warning in the PL Framework theme. I should think this should be fixed asap, I cannot be the only person trying to be up to date.
      1976 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
    • Dan Haddock
      By Dan Haddock
      DMS: Latest Version
      Running a Child Theme
      Wordpress: 4.8.3
      Akismet Anti-Spam 
      Coming Soon Page & Maintenance Mode by SeedProd
      Contact Form 7
      Cookie Law Info
      DMS Professional Tools    
      Enhanced Media Library
      Google Analytics for WordPress by MonsterInsights
      Google XML Sitemap    
      Jetpack by WordPress.com
      MailChimp for WordPress
      PageLines Updater
      Really Simple SSL
      Schema App Structured Data
      Sucuri Security - Auditing, Malware Scanner and Hardening  
      Uber reCaptcha
      Yoast SEO
      Problem Below
      Hi Team,
      I am looking to style the Continue Reading Button with the PHP you provided in an earlier ticket here: 
      I put the PHP code into my site, however I do not get my Icon back, I just get back Read More >>
      I have attached a screenshot of the code in place on my site along with the output.
      Interested to know what I may be doing wrong? - I am very new to PHP so a bit apprehensive on this.
      The Images: https://drive.google.com/open?id=0B0i4JJXa2jdQN2xoakZNRUdmaU0
      Let me know if you need any more information from me.
    • Jared Smith
      By Jared Smith+
      I'm using the Impulse section for a screen wide image. I'm seeing a funny thing though, whenever I turn off the page editor, all the impulse section pictures disappear.  It has been saved.  Any ideas.  I can send you login links if need be.
      With Editor ON (note, no save button)
      you can see the waterfall image
      When I turn editor off, it goes away
      Any suggestions?

    • oseehys
      By oseehys+
      Hello There,
      So i want to use platform 5 and DMS sections on a single page, i am using a child theme with pinspro as my main theme and i activated platform 5, the only problem am having so far is the fixed option, my navbars are not aligning to their default size, and it will be great if platform 5 header and footer section will function, has anyone used this option, how can i make the best use of platform 5 and DMS on a site
    • thirdstonemedia
      By thirdstonemedia+
      I've been fighting with a resolution issue ? Want to use Flick Slider, the site looks great on my monitor but client says she can't see bottom of homes. I believe she's on an old PC using outdated browser/s ... but, she's important to me and I'd like to make this work, on her system. Without asking her adjust her own set-up. 
      I put the Flick Slider inside a container, here ::
      Set the Height of Flick Slider to 50 Base ... I don't know how this works exactly ... there is a Base then a Min ... but, haven't adjusted the Min ::
      Tried using Splash Up, which presents the same issue (she can only see top of home) and she wants several images to rotate on Home page, so not sure this would work anyway ::
      I have tried going into Layout and making the width narrower, and that does make the site narrower, but the homes still don't display in full, on her system. Help ?

      Here are her screen grabs, both desktop and iPad  (dumped the chalkboard background).

      FInally, she said these look great ::
      What am I doing wrong ?? Is there a better way to accomplish making the site look great on any resolution at any size ?
      (Longtime Pagelines-lover.)