• Resolved moxyma

    (@moxyma)


    Can someone please tell me how I can go about being able to using WordPress plugins and shortcodes in a custom page I created? I need to add shortcodes for audio and pagination for a custom page. Do I need to put it in The Loop or something? Sorry if that is a really dumb question but as you can probably tell I am not an expert but I have done some reading.. so any help would be greatly appreciated. ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • 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!!!

    you are quite welcome

    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.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Using shortcodes and plugins in a custom page’ is closed to new replies.