Forgot to add, i want to run loops on sidebar with it (like recent posts, comments..etc..) , and i placed a shortcode in function.php
Entering the html directly instead of using the shortcodes won’t work as the shortcodes also enqueue the required scripts. You might be able to inspect the plugin’s code and figure out what also needs to be added, however this is outside of the scope of the free support I can provide as it is not how the plugin was designed to be used and you would need a customised version of the plugin or some custom code in your child theme’s functions.php.
If you want to add the shortcodes to a text widget, you can to enable shortcodes in widgets by adding the following in a functionality plugin or in the functions.php of your child theme:
add_filter( 'widget_text', 'shortcode_unautop');
add_filter( 'widget_text', 'do_shortcode');
To use a shortcode in a template file, you can use the do_shortcode function eg:
<?php
do_shortcode('[tabbyending]');
?>
Yea i gave up on this, i’v made a simple html for sidebar and i am using yours like a built in for my theme.
Another question : inside php i see this
if ( $icon ) {
$addtabicon = ‘<span class=”fa fa-‘ . $icon . ‘”></span>’;
}
So inside post how we can add icon for the tab title ?
[tabby title=”<span class=”fa-thumbs-o-up”></span> First Tab”] wont work ?
[‘<span class=”fa fa-comments-o”></span>’ tabby title=” Second Tab” ] shows icon but breaks tab..etc..
I tried targeting css as well.
How to use the icon shortcode parameter in the tabby shortcode is described on the plugin page and the readme.txt file.
example:
[tabby title="My Tab" icon="cog"]
This adds the span with the classes required for displaying a font awesome icon. This feature was added for users of the ‘Tabby Responsive Tabs Customiser’ add-on which adds the Font awesome support required, but it uses the standard font awesome classes so a standalone plugin to add font awesome support can be used or you can target the classes to use your own custom icon font.
Hi, thanks for quick reply.I am using fontawesome, unlucky 😀
So what is a proper approach with this ?
1. [tabby title=”My Tab” icon=”any name here and then target in css”]
2.[tabby title=”My Tab” icon=”<i class=”fa fa-comments-o”></i>”]
3. [tabby title=”My Tab” icon=”fa-comments-o”]
4. some other ?
Ok , i figure it out. I was confused. In case that anyone is looking on how to add icon
Default example of one fontawesome icons usage are
<i class=”fa fa-comments-o”></i> or class=”fa fa-comments-o”
from here we just rip out this part comments-o
and add inside icon so like this [tabby title=”My Tab” icon=”here to insert”]
Like this [tabby title=”TAB3″ icon=”comments-o”]
Regards,