GavickPro / Meet-GavernWP

Meet GavernWP is a responsive free Wordpress theme
35 stars 23 forks source link

Shortcodes as external plugin #247

Open dziudek opened 11 years ago

ckubs commented 10 years ago

Even though everyone is doing it I don't see that a must as in the case of SEO stuff that you have to update and definetlly make a plugin, but it's ok I guess, to clean the theme a bit.

Now, I have one issue/question about shortcodes and wasn't necesary I think to open a new ticket.

This is a limitation of Wordpress itself or how shortcodes work? I'm using a charts plugin based on chart.js( this one http://wordpress.org/plugins/wp-charts/ ) and I can't put the chart shortcode inside a gavern shortcode( toggle, legend ...etc) because I only see the raw code.

Why do I want to do that? Donno if it's a plugin conflict with the theme CSS( or viceversa, the theme doesn't play nice with the plugin) but for example if I put the chart and the Gavern shortcode one next to the other( like Chart and under it a legend shortcode for eg. chart description), the Gavern shortcode overlaps the chart. :(

dziudek commented 10 years ago

The problem is connected with fact that the shortcodes are not recursive. Teoretically you can put the content of the shortcode inside the do_shortcode function, but it can lead to the infinite loop.

ckubs commented 10 years ago

Thanks for your clarification, I understand now. And about the thing from where I starded? Made a temporary wordpress Install and put inside some post a chart from that plugin and a gavern legend under it http://www.colle.ro/test2/?p=5

dziudek commented 10 years ago

In order to put the legend under the chart, please add:

clear:both;

in the .gk-legend selector - it should solve your problem.

ckubs commented 10 years ago

Ok. That solved it :)