I am attempting to add a shortcode for a 3rd Party Plug-in and not sure if it’s possible, or how to do it if it is.
I do have an independent version of VC, and it seems on their support pages they have a shortcode mapper for such a use, navigating to Settings/Visual Composer/My Shortcodes:
http://screencast.com/t/c2Stjksg
http://screencast.com/t/r9t9xLkIo
Can’t seem to find the same with the bundled version.
is it possible, if so how?
Here is what I’m doing… but it is only giving me text:
<div id=”timer”>[dsrc id=’2945’ ui_div_id=’test’]</div>
and it is only simply spitting out the same text for me when I am attempting to insert a timer:
“[dsrc id=’2945′ ui_div_id=’test’]” (with no quotes)
Hi,
Please try to use the do_shortcode() function, make sure that [dsrc id='2945' ui_div_id='test'] is the right shortcode to add your timer then use the function like this:
<?php echo do_shortcode('[dsrc id='2945' ui_div_id='test']'); ?>
Add the line on your template.
Thanks
-
This reply was modified 11 years by
Lucian.
I also own VC, and submitted a ticket with them.
Their official stance is: “shortcodes are not meant for Raw HTML widget”. They also stated that it shouldn’t be possible.
I was also in contact with the developer of the plugin. He modified the js which was able to be added to the Raw HTML for the result I was looking for. Great support for WP Responsive Countdown from developer chrisdean at http://codecanyon.net/item/wordpress-responsive-countdown/8720734
Result: http://screencast.com/t/piX03zC9BSsZ
Code:
<div class=”imagecontainer” style=”position:relative;”>
<h2>ARTICLE1</h2></div>
<div id=”timer” style=”position: absolute; bottom: 0; width: 70%;left: 15%”></div>
<script type=’text/javascript’>
/* <![CDATA[ */
jQuery( window ).resize(function() {
jQuery( “.primeimg” ).each(function() {
jQuery(this).width(jQuery(this).parents(“.imagecontainer”).width());
jQuery(this).parents(“.imagecontainer”).height(jQuery(this).height());
});
});
function create_counter(){
jQuery( “.primeimg” ).each(function() {
jQuery(this).width(jQuery(this).parents(“.imagecontainer”).width());
jQuery(this).parents(“.imagecontainer”).height(jQuery(this).height());
});
target_date = new Date();target_date = new Date(target_date.getTime() + 110000);time_zone = target_date.getTimezoneOffset()/(-60);target_date = target_date.toDateString()+’ ‘+target_date.toTimeString();
timer = jQuery(“#timer”).ResponsiveCountdown({
use_custom_update:false,new_custom_state: “”,
target_date:”2015/1/1 0:0:0″,server_now_date: “”,
time_zone:0,target_future:1,
set_id:1,pan_id:2,day_digits:2,
fillStyleSymbol1:”rgba(255, 241, 0, 1)”,
fillStyleSymbol2:”rgba(255, 241, 0, 1)”,
fillStylesPanel_g1_1:”rgba(5, 79, 230, 1)”,
fillStylesPanel_g1_2:”rgba(3, 188, 255, 1)”,
fillStylesPanel_g2_1:”rgba(5, 79, 230, 1)”,
fillStylesPanel_g2_2:”rgba(3, 188, 255, 1)”,
text_color:”rgba(255, 255, 255, 1)”,
text_glow:”rgba(255, 255, 255, 1)”,
show_ss:1,show_mm:1,
show_hh:1,show_dd:1,
f_family:”Verdana”,show_labels:1,
type3d:”single”,max_height:150,
days_long:”DAYS”,days_short:”DD”,
hours_long:”HOURS”,hours_short:”HH”,
mins_long:”MINUTES”,mins_short:”MM”,
secs_long:”SECONDS”,secs_short:”SS”,
min_f_size:9,max_f_size:30,
spacer:”circles”,groups_spacing:3,text_blur:2,
font_to_digit_ratio:0.2,labels_space:1.2,complete:function(){alert(‘Ready!’)}
});
}
/* ]]> */
</script>
</div>
</div>
`
-
This reply was modified 11 years by
xochipelli.
-
This reply was modified 11 years by
xochipelli.
-
This reply was modified 11 years by
xochipelli.
-
This reply was modified 11 years by
xochipelli. Reason: can't seem to get the to just show as is