Short Code Conflict
-
Hello! I need some help running two short codes. I’m using a purchased template that includes a shortcode for a three column layout. That short codes is:
[one_third]
Your content here…
[/one_third]
[one_third_last]
Your content here…
[/one_third_last]
I’m also using the list category posts plugin to add posts from three categories where the “Your content here…” is located. I do this using the shortcode [catname=categoryname].
The posts are generated but not in three columns and only the first two “one-third” shortcodes is hidden, the rest appear in the text of the page.
Any suggestions on how to correct this problem?
-
As this is a commercial theme, we cannot really help. You need to seek support from the theme vendors.
There should be a general principle that applies though right? I could just as easily use a plug-in that generates a similar short code and experience the same conflict. I appreciate any support that is available!
The general principle would be that the theme developer created the shortcodes correctly, tested them and where possible, tried to ensure that they worked with other plugins. Since this is obviously not the case, you need to contact the theme developer.
I appreciate your answer. I thought when I came to wordpress I would find more support and less attitude. It appears I was wrong.
Make sure the theme’s shortcode handler function is calling do_shortcode on the content, ie:
add_shortcode('test','test_shortcode'); function test_shortcode( $atts, $content = null ) { return( '<div>'.do_shortcode( $content ).'</div>'); }http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes
esmi is right though, you are better off contacting the theme author since we have no idea what code is behind that shortcode.
Shot in the dark… but, try implicitly closing the shortcode. Instead of
[catname=categoryname]Try
[catname=categoryname/]Or
[catname=categoryname][/catname]Also it’s worth noting that your shortcode looks odd.
Normally:
[tag attribute=value]Jackson – Thanks for the tip. I’ve shot an e-mail out to the developer. Until then I will try cloding the shortcode. I thought the shortcode for the category was off, but that is the one recommended by the plugin developer.
Thanks again!
The topic ‘Short Code Conflict’ is closed to new replies.