BB-Code-like mechanism by which strings enclosed in square brackets can serve as shorthand for longer and more complicated strings. These strings are processed by callback handlers, usually on page load, which replace the bracket enclosed string with the output from the callback handler.

learn more… | top users | synonyms (2)

0
votes
1answer
211 views

Enclosing Shortcode is acting like self-closing

I'm sure I'm missing something simple, as I rarely use shortcodes, but I can't seem to get the following shortcode to work. I want it to be an "enclosing" short tag vs. a "self-closing", but its ...
3
votes
1answer
3k views

Remove wpautop from shortcode content / remove whitespace in buffering

I am using the Mailchimp plugin ( http://wordpress.org/extend/plugins/mailchimp/ )and it has a shortcode that uses output buffering to grab it's widget's code and spit it out in the content. however, ...
0
votes
1answer
850 views

show all the posts thumbnails

I want to display all the posts by the featured image of each post. Is there a shortcode or can you give me some tips on how to achieve this ? Thanks!
1
vote
2answers
2k views

How to prevent tinymce macro from inserting nbsp;?

I've got the following macro button defined to wrap a selection in a shortcode in the wp_editor visual editor: (function() { tinymce.create('tinymce.plugins.ingredient_name', { init : ...
0
votes
1answer
269 views

Display MP3 as media using an URL from a custom field

I created custom field and placed this inside the loop: <?php echo get_post_meta($post->ID, 'ses', true); ?> But now the link is all text. I would like it to be like my theme does when I ...
0
votes
1answer
187 views

Forcing WP to embedd a video when using a shortcode

With the following shortcode for YouTube videos, how can I make it such that WordPress still automatically embeds the video for me? <? /** YouTube shortcode, usage: [youtube align="alignleft" ...
0
votes
1answer
411 views

gallery shortcode exclude not working

I'm using this bit of code on single.php: $params='[gallery link="file" size="my_thumbnail_small" exclude="'.$featuredId.'"]'; $gallery = do_shortcode($params); echo $gallery; But nomatter what I ...
1
vote
1answer
1k views

How to put JQuery/Ajax inside shortcode?

The purpose of this plugin is to create a list that users can modify with up or down votes. The shortcode is supposed to display the list on a page and use JQuery to fadeIn and fadeOut while updating ...
0
votes
1answer
187 views

Content in WP Editor displayed below CPT shortcode [duplicate]

Possible Duplicate: Shortcode always displaying at the top of the page I've developed a couple plugins which grab CPT items through a shortcode (via WP_Query). The problem I'm having is ...
0
votes
1answer
147 views

Is there a way to show attachment IDs on the attachment info screen?

I want to use attachment IDs for shortcodes, but if the image is published with a permalink, it's harder to find the ID. I've found some functions online that can turn the attachment url into its ID, ...
0
votes
1answer
491 views

Shortcode adding plugin output before post, instead of inline [duplicate]

Possible Duplicate: Shortcode always displaying at the top of the page I have a quick and dirty shortcode which outputs a form in my wordpress pages. However, it adds the shortcode output ...
0
votes
1answer
290 views

Unexpanded shortcodes in search engine results

I have some shortcodes on pages e.g. [fb_like] [twg_gpo_button] [ratings]. If I visit page they expand correctly but on search engine results page, they do not expand on some pages. I have installed ...
0
votes
1answer
39 views

Something is filtering my shortcodes… Can't figure out what

Something seems to be filtering out my shortcodes. I'm not sure what or where, and I've looked just about everywhere trying to find it. Is there anything I can do to find out what filters are being ...
5
votes
1answer
965 views

Using preg_replace to separate gallery from the_content?

In a Wordpress theme, I need to separate a gallery from the rest of the_content. I think one could do that with get_the_content and preg_replace but it's a little beyond my skill level how to actually ...
0
votes
2answers
955 views

get_posts displaying wrong permalink for “continue reading” link

I lifted the "continue reading" link functions from the Twenty Eleven theme and for the most part, it is working (works in RSS feeds). I created a shortcode to display the latest post on the front ...
0
votes
1answer
294 views

Shortcodes in Options Panel textareas

I am using an Options Panel to create my themes, and I would like to make the textareas from this OP to support my shortcodes too. The code for that creates the textarea fields: case 'textarea': ...
3
votes
1answer
345 views

How do i link gallery thumbnails to different url's using the wp native gallery?

Is it possible to link each gallery thumbnail if i use the built in WordPress native gallery?
4
votes
2answers
3k views

Why might a plugin's 'do_shortcode' not work in an AJAX request?

tl;dr: Contact Form 7's shortcode doesn't work in an AJAX request when called with do_shortcode functions.php add_action('wp_ajax_ps_get_survey_form', 'ps_get_survey_form'); ...
3
votes
2answers
430 views

What characters are allowed as a shortcode tag and how should they be sanitized?

I am working on a plugin where the user can define shortcode tags himself. What would you suggest to allow in there? My thought is only allow ascii characters. So how do I sanitize? strip_tags and ...
1
vote
1answer
244 views

Displaying terms based on loop posts?

I have a shortcode that shows a loop for a custom post type: while ( $loop->have_posts() ) : $loop->the_post(); // do something endwhile; Some of the posts are in categories ...
0
votes
1answer
229 views

Shortcode for output of wp_get_archives displays at top of post

Why does the output of this function // One Recent Post function most_recent_post_shortcode() { return wp_get_archives( 'type=postbypost&limit=1&format=custom'); } add_shortcode( ...
0
votes
2answers
641 views

page url in shortcode

I have a problem. I'm using a custom shortcode to try to get the url. If the shortcode is inside a post then it gets the post url. When I open the post on a category list, this post shortcode works ...
0
votes
3answers
796 views

Using thumbnail functions inside a shortcode

I'm trying to figure out why WP doesn't seem to recognize functions like get_the_post_thumbnail() inside a shortcode loop. For example, tried adding it to a fresh theme / plugin-less installation. ...
2
votes
2answers
168 views

Shortcode perfomance solution

I have a site that is performance critical. Doing shortcodes I thought about the time the server needs to parse and return the content, instead to allow some HTML (<div class="redletter">) to go ...
0
votes
1answer
189 views

Creating a WordPress shortcode

I'm coding my first WP shortcode and am having trouble turning my working PHP into a working shortcode. I have successfully created a basic shortcode that returns text in the spot I'd like so that ...
0
votes
2answers
2k views

How to get ID of the page included with get_page()?

I'm rewriting the question, including exemplary code, I hope it will be easier to understand now. 1. My shortcode: function testid_shortcode( ) { global $post; return ...
0
votes
1answer
55 views

Using shortcodes to communicate my page design

I came across this page http://flare.bringthepixel.com/pages/services/ and on it there is this message: "The entire code of this sample page is available in the Shortcode Generator". Lets say i gave ...
-2
votes
2answers
2k views

How can I make all gallery images to open in a new window?

How can I make all gallery images to open the high resolution image in a new window?
4
votes
1answer
1k views

Update all posts automatically when using post_meta

I recently created a new site using wordpress but I'm a rookie - everything I know is trial and error with no formal training. So please, please, please keep your answers as simple as possible. Thanks ...
1
vote
1answer
573 views

How to handle shortcodes when using the JSON API

I'm wrangling a little logic problem: I'm making a single page WP theme which uses the JSON API for the content and Mustache style templates for the presentation... However, shortcodes? What would be ...
0
votes
1answer
47 views

convert more tag to shortcode

is there is a way to convert <!-- more --> to shortcode
1
vote
1answer
461 views

Possible to display posts containing a short code ?

i have some posts with a certain shortcode in them. unfortunately these posts are in different categories and contain different tags so i am not able to query them. is it possible that i run a query ...
1
vote
3answers
8k views

Include PHP file in Content using [shortcode]

Here is what I have I am not having any lucking finding how to simply include a file in the content editor using a shortcode. For Example if I wanted to include form.php inside my Contact Page how ...
1
vote
1answer
264 views

shortcodes displaying outside of content area with echo statement, not what I wanted [duplicate]

Possible Duplicate: Shortcode always displaying at the top of the page I have my shortcode system set up fairly normally, like so: //[carouselle] function carouselle_func( $atts ){ ...
1
vote
3answers
4k views

How to Insert Shortcodes into Theme?

I have content locker plugin. For locking contents, im using this shortcode: [wp-like-locker] Your locked content here... [/wp-like-locker] and I need lock every post on my blog. How could I ...
2
votes
3answers
2k views

Shortcode from a widget is wrapped in unwanted <p> element

I'm using Black Studio TinyMCE Widget as a rich text editor widget. In a sidebar I inserted the TinyMCE widget with a [testimonial] shortcode and some content after it. For example: [testimonial] ...
0
votes
3answers
2k views

How can I execute shortcode outside the loop?

I'm using Contact Form 7 and can display the form by putting the following in the content text field [contact-form-7 id="453" title="Contact form 1"]. Now I need to display the form outside the loop. ...
1
vote
2answers
2k views

Shortcode always displaying at the top of the page

I'm using a shortcode to pull in different loops via the loops-name.php. For some reason it is always at the top of the page. I googled it and using echo instead of return causes that problem but with ...
0
votes
1answer
102 views

post/page content

i am trying to insert a post/page into one of my themes files and it wont display shortcodes or php i have created a page called home in the wordpress admin-paned and inserted into my code the ...
0
votes
1answer
932 views

Is it possible to create a shortcode that will query a post based on taxonomies?

I am working on a site that will be listing a few hundred products and we wanted to be able to quickly/easily show specific products on a page based on taxonomies. I have been doing some research and ...
1
vote
4answers
284 views

Remove action from shortcode

There is add_action() function inside function which is callback for add_shortcode(). Any idea how to remove this action with the help of custom plugin? Should I hook to any action which is called ...
1
vote
1answer
250 views

Is there any inherent difference between add_filter() and add_shortcode() for modifying [caption]?

The context is the [caption] shortcode found in media.php which contains img_caption_shortcode img_caption_shortcode also includes these lines: $output = apply_filters('img_caption_shortcode', '', ...
0
votes
1answer
987 views

Twitter bootstrap tabs

Does some know how to do shortcode for Twitter bootstrap tabs or any other tabs? I found this tutorial http://michaelwender.com/blog/2010/11/01/creating-wordpress-shortcodes-for-jquery-tools-tabs/ but ...
1
vote
1answer
45 views

Shortcode help: If no image entered take default

I have a shortcode that creates an "opinion box". The user should insert 4 parts the title the images the opinion side of the image in relationship with text i want to check if no image was ...
1
vote
1answer
1k views

get_the_content(“more…”) returns full text

I'm creating shortcode [latest_post] and want to show post date, title and short content. (content has "more" separator). Here is code: function shortcode_latest_post() { global $post, $more; ...
5
votes
1answer
536 views

Change behavior of “Insert into Post” based on attachment metadata

For a custom plugin I'm working on, I have added a checkbox element to the attachments editor in a manner like the answer provided here: How to add a checkbox element to attachments editor with ...
1
vote
1answer
261 views

short code output too early

I'm trying to create a shortcode base on the following code: <ul class="filter"> <li>Filter:</li> <li class="link-store"><a href="<?php echo get_permalink( 23 ); ...
0
votes
1answer
104 views

filter title from shortcode

Just wondering how to filter to change the current page title from a shortcode, Since shortocodes are rendering after $post. any idea to archieve something like : ...
0
votes
1answer
326 views

Plugin renders in preview but shortcode shows when published

I was attempting to add this Flash Count Down plugin. The shortcode works fine in preview: But when published the shortcode is rendered as text: Is there a general solution to this problem or ...
1
vote
1answer
3k views

Stop auto formatting in shortcodes

Is there a way I can stop Wordpress auto formatting everything I enter inside a shortcode tag? A the moment I want to include a h2, a paragraph and another shortcode, but everytime I do Wordpress ...