shortcode

why is there different syntax same outcome?

Why is there different syntax same outcome? For example # Example 1 if($myCondition == true) : #my code here endif; if($myCondition == true) { #my code here } # Example 2 foreach($films as $film) : #my code here endforeach; foreach($films as $film) { #my code here } Also I have been using <?= for ages now and I n...

Wordpress / PHP - Do a single shortcode

Hi In WP you can filter shortcodes from a string and execute their hooked functions with do_shortcode($string). Is it possible to filter a single shortcode, instead of all registered shortcodes? for example I need a few shortcodes to be available for comment posters as well, but not all for obvious reasons :) ...

Change wordpress gallery shortcode slug to filename

Is it possible to change the attachment page slug to the referring filename? In short... i use the Gallery Shortcode to build a simple page based gallery. I change the orignal filename (like DSC1223.jpg) during the upload process (to 3b1871561aab.jpg) but it does not appery as slug within the url. It uses only DSC1223. Is there anyway ...

Shortcode is not working in wordpress 3.0

Is there anything need to enable for shortcode to work in Wordpress 3.0? I have tried some short codes and none of them working as expected. regards - dj ...

Dynamic shortcodes and functions in WordPress

I am having a bit of an issue with autogenerating shortcodes, based on database entries. I am able to get a normal shortcode working i.e: function route_sc5() { return "<div>Route 5</div>"; } add_shortcode('route 5','route_sc'); and the following shortcode to activate it would be [route 5] This works. But what I need...

Allowing For Custom Images Sizes with WordPress's Gallery Shortcode

Hi, In WordPress 2.5 and up, there's a built in Gallery feature that allows the option to add an image gallery to a Post or Page on your WordPress blog. (Ref: http://codex.wordpress.org/Gallery_Shortcode) You can use a size option to specify the thumbnail size you would like displayed. Valid values include "thumbnail", "medium", "larg...