-2

Can anyone help me see the error in this code? I'm trying to implement a function via shortcode which I found here:

<?php if (function_exists(‘wooslider’)) echo do_shortcode(‘[wooslider slider_type="posts" limit="3" link_title="true" layout="text-bottom" overlay="full" category="homepage-feature-post"]‘); ?>

closed as off-topic by Pieter Goosen, Mark Kaplun, birgire, fuxia Sep 27 '14 at 2:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Pieter Goosen, Mark Kaplun, birgire, fuxia
If this question can be reworded to fit the rules in the help center, please edit the question.

0

You are not using proper syntax, so you are likely getting a syntax error. You are using some strange sign in your code where you should be using a single quote ('). Also, use curly brackets to enclose a condition. It is easier to debug

<?php 
    if(function_exists('wooslider')){ 

echo do_shortcode('[wooslider slider_type="posts" limit="3" link_title="true" layout="text-bottom" overlay="full" category="homepage-feature-post"]'); 
}
?>
  • 1
    Thanks a stack Pieter. I couldn't see the wood for the trees - the original had some weird quotes I didn't notice. – RexTheRunt Sep 25 '14 at 11:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.