shortcode

PHP using a variable inside do_shortcode() – WordPress Page Template

The format for the shortcode that I wish to do is: [product id=”id#”] The format for do_shortcode is: do_shortcode(‘[shortcode’); My question is how can I insert a PHP variable as the id#? I have a variable $itemid that I would like to use like this: echo do_shortcode(‘[product id=”$itemid”]) But I cannot for the life of me get it to work….
Read more

Using a php statement within a echo do_shortcode() function (WordPress)

I’ve been looking for a solution to this, but can’t see to the right way to implement this. Here is the page I am working on: http://indiaelder.sites.uofmhosting.net/health-topics/alzheimers-disease/ As you can see, this is a placeholder for a very early medical page. I have a tabbed menu that list (with some filler text) a bunch of information about Alzheimer’s disease, organized…
Read more

WordPress issue with shortcodes

Asking for some help with setting the shortcode. I’m trying to figure out how to make my own plugin and add shortcode for fast use. So might be something wrong here. What i’ve got so far. I have working database table, which i can edit from the admin page from the plugin. Now i want to refresh the data on…
Read more

Serializing URL via wp add_shortcode to auto select from option list onload

Scope: Use of the wordpress add_shortcode method to use url string to automatically select options in a scraped table on this page (may require couple of refreshes): http://tenhealthandfitness.com/proto/personal-training-timetable/ Aim is to pass in something like this to the url to auto select an option onLoad: http://tenhealthandfitness.com/proto/personal-training-timetable/?action=go&staff[]=Adam%20Cooper Background: The tech is a scraped appointment widget from Healcode, and in the wp…
Read more

WordPress Shortcode displaying as text

I originally posted this on the WordPress site on StackExchange on they told me to move it here. I’m new to PHP and WordPress so this is probably an easy fix, but I have taken the shortcode provided by the plugin I’m using and placed it in numerous locations in the code, and it always displays the shortcode in plain…
Read more

Enable shortcodes in WordPress Emails

Scenario When a user registers on my site, they are sent the usual email. I’m using Pie Register to show a custom registration form and send customised emails. What do I have The plugin I’m writing, needs to add a QR code to the email. I register the shortcode with the usual: add_shortcode(‘channel_qr’,’generate_qr_code’); And then in the template of the…
Read more