echo do_shortcode is not working on theme’s template

According to the developer of the jwPlayer it was necessary to implement the plugin as a filter to be able to support ‘.’ in tag attributes. Hence do_shortcode(..) does not work but jwplayer_tag_callback(..) will return the desired result. Matching your example simply execute: echo jwplayer_tag_callback(‘[jwplayer config=”Out-of-the-Box” file=”‘ . $urlbox[0] . ‘” image=”http://www.mywebsite.com/myimage.jpg”]’);

Frontend editing, Frontend user dashboard

I have Something that i use from time to time when i need something like that: <?php /* Plugin Name: List User Posts Plugin URI: http://en.bainternet.info Description: lists user posts on the front end Version: 0.1 Author: Bainternet Author URI: http://en.bainternet.info */ if (!class_exists(‘list_user_posts’)){ /** * list_user_posts * @author Ohad Raz */ class list_user_posts { … Read more

Numbering Image List in Gallery

Set a custom function between the gallery shortcode handler and the output. Catch the img elements and add a static counter. Then return the gallery output to WordPress. Sample code: add_action( ‘after_setup_theme’, ‘wpse_74492_replace_gallery_shortcode’ ); /** * Replace the default shortcode handlers. * * @return void */ function wpse_74492_replace_gallery_shortcode() { remove_shortcode( ‘gallery’ ); add_shortcode( ‘gallery’, ‘wpse_74492_gallery_shortcode’ … Read more

How to use shortcode attribute in separate function

To be able to use a variable that is essentially being created within the shortcode function, you’ll need to store it somewhere and then retrieve the value. WordPress does use global variables internally to store and carry across values, but I wouldn’t advise you do the same though. Read about the options API here. Pretty … Read more

How do i get (unique) page name?

The WP global variable $pagename should be available for you, I have just tried with the same setup you specified. $pagename is defined in the file wp-includes/theme.php, inside the function get_page_template(), which is of course called before your page theme files are parsed, so it is available at any point inside your templates for pages. … Read more

Audio and video shortcodes not working properly

Okay, there are two things going on. First, since you are running WordPress 3.6, you don’t need to run any other media player plugins. Deactivate Widgetkit and use the following shortcode to add your audio player: The reason you aren’t seeing the play button on your players is that your web server is not serving … Read more

Convert shortcode into html form [closed]

First off, your shortcodes are not formatted correctly for WordPress. You need to have a tag for your shortcode and then define the attributes separately. Instead of [list-style=”one”][/list-style] it needs to be something like [list class=”one”][/list] The following code will add two shortcodes to your WordPress install. [list] and [li] // shortcode for the list … Read more