Depending on the shortcode (some only work in the loop) you can use this basic example:
<?php echo do_shortcode('[shortcode]'); ?>
Thread Starter
moxyma
(@moxyma)
Hi Swanson,
Thank you! I’ll try this and see if it works and post back, okay? π
But if the plugin I’m using does require that my custom page be in the loop is there anything I can do?
You would just add the shortcode to a page or post (in html view). Check the documentation with the plugin or shortcode…
Thread Starter
moxyma
(@moxyma)
Hmm, I’m not sure what you mean by html view. I don’t have that option on my custom page. I built it using Dreamweaver.
The PHP code needs to be added to code – not in a visual editor.
Thread Starter
moxyma
(@moxyma)
Oh I see. Okay, I put in the code you provided using the admin section of WordPress (Appearance –> WordPress –> Custom page). Doesn’t look to be working :(.
Custom Page must be a theme option…
Thread Starter
moxyma
(@moxyma)
Oh wait Swanson, oh my gosh oh my gosh wait it is working!!! I misunderstood your your code.
You gave this which is perfect – <?php echo do_shortcode(‘[shortcode]’); ?>
So then I have this now –
<?php echo do_shortcode(‘[MY SHORTCODE FROM THE PLUGIN]’); ?>
I was trying to put that in just like you typed it. But then I realized that you have to put in the actual shortcode for the plugin inside of the php code where it says ‘shortcode’. LOL
Oh my gosh thank you so much!!!
Thread Starter
moxyma
(@moxyma)
I hope this helps someone else who may be having the same issue. I’m surprised I didn’t see more people asking it. LOL Oh well.
Thanks again Swanson! Greatly and much appreciated π
Please mark this post resolved and again your are welcome.