Reputation: 1
im a php noob trying to use a plugin called featured item slider for wordpress
-when i use shortcode to place it to pages or posts it works fine. -problem is when i try to place it to my template via php include i get this error
(Fatal error: Cannot redeclare featured_options_page() (previously declared in /home/infostar/public_html/wp-content/plugins/featured-item-slider/featured-item-slider.php:36) in /home/infostar/public_html/wp-content/plugins/featured-item-slider/featured-item-slider.php on line 37)
i ve tryed so far include_once when i use it i get no errors but nothing showing require_once again no erros but i plugin not showing get_included_files still no error but nothing showing
i dont think probably including the file functions.php more than once because it works fine when i call it with shortcode
can someone expert help me???
Upvotes: 0
Views: 6005
Reputation: 329
How are you posting the shortcode in the template?
Here is the correct format according to a wordpress support thread. http://wordpress.org/support/topic/short-code-outside-page-or-post
<?php echo do_shortcode('[catlist id=1 numberposts=5)]'); ?>
The actual shortcode goes in with the square brackets.
Upvotes: 2