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
2answers
114 views

Which is a better practice when writing shortcodes: pack lots of configuration parameters or just give an id?

I am writing my first wordpress plugin which inserts a visualization widget inside a post. I am planning to use a shortcode for my plugin. I followed an excellent tutorial about writing shortcodes. ...
1
vote
1answer
95 views

How to get rid of shortcodes in post content once and for all

I changed theme/plugin now the post content still display shortcodes. There are some tips around on hiding them, but everytime I use some content functions, the shortcodes shows up again. Also, my ...
1
vote
1answer
111 views

Shortcode with custom content attribute?

I am creating a shortcode for a client site that should display an image and a saying (mainly at the bottom of the page, but basically wherever the client wants to insert said image/saying). The ...
0
votes
1answer
337 views

PHP Widget and do_shortcode

I'm using PHP Widget which allows PHP code to execute from a widget. I tried using this code to execute do_shortcode but it's not rendering <?php $lat = get_field('woo_maps_lat'); $long = ...
1
vote
1answer
182 views

Google Map Shortcode for Custom Taxonomy/Post Types

Calling all WP Stack Exchangers! I am currently using Alain Gonzales' Google Map Shortcode plug-in on a site I'm developing, and it's worked just fine: Google Map Shortcode plug-in on wordpress.org ...
1
vote
1answer
149 views

Get shortcode name from within it's callback function? [duplicate]

Possible Duplicate: current_shortcode() - detect currently used shortcode I'm dynamically generating shortcodes with my plugin like this: foreach ($options['grids'] as $grid) { ...
1
vote
0answers
61 views

Using shortcode to display array in array

I am using a widget, U more recent posts. Seems to work with custom taxonomies when you input the correct data into it in a widget form, but the suggested shortcode doesn't work (and I am trying to ...
3
votes
1answer
44 views

When to use which plugin output method?

I'm a Drupal dev, getting into Wordpress. So far as I can tell there are a few different methods by which a plugin can output content on to a Wordpress site: Shortcode Rewrite API Widget API ...
0
votes
0answers
14 views

How do keep caption from displaying on gallery short code? [duplicate]

Possible Duplicate: How to manually fix the WordPress gallery code using PHP in functions.php? I'm using the gallery shortcode and I put in display=none thinking that would keep the ...
0
votes
2answers
156 views

How to load shortcode sooner

I am trying to add a shortcode to my menu, the menu item shows up but not the shortcode output. I think the problem is that the shortcode runs after the menu has run and therefore the shortcode ...
0
votes
1answer
99 views

Shortcode Strategy

I'm looking to insert data from another database into my posts, and thought of using shortcodes. An example post: [imdb id="123" name] was born [imdb id="123" birthday] in [imdb id="123" ...
0
votes
1answer
872 views

plugin shortcodes not working on custom theme- unsure how to fix

Live site. I've got a custom theme that is giving me slight issues with shortcodes- they don't work. When I switched back to the default theme, the shortcodes worked fine. What do I need to look for ...
0
votes
2answers
90 views

Custom shortcode breaks my page

Okay so I'm trying to create a wordpress shortcode called chapter, i.e. [chapter]text[/chapter]. What this does is it first checks if the content entered is already in the database, if it's not it ...
3
votes
2answers
76 views

How do I make specific plugin functionality apply to different sites in a network?

I have a site specific plugin that I've written for the main site in my multisite network. Now I realize that the shortcodes that are in the plugin are also useful on the sub-sites, however the ...
0
votes
1answer
90 views

If else with shortcodes

I only want one of these shortcodes to display if the custom field value is true. I'm not understanding the logic to do this. So basically, if there is a twitch video and a own3d video I only want the ...
0
votes
0answers
27 views

Unwanted p tags in shortcode [duplicate]

Possible Duplicate: Automatically added brs and paragraphs? Im reasonably new to wordpress but have written a shortcode that is putting in p tags in a really weird way that given my reading ...
4
votes
1answer
178 views

How to return loop contents

At times, I need to return the output of a loop (usually with WP_Query like in this example) for use in a shortcode or with a filter on the_content. The following code that uses object buffering ...
1
vote
1answer
1k views

How do I get the attributes of a short code from a post?

I am trying to preview a NextGen gallery on my main page (and category pages) to show a single image from the gallery on the main page next to the text from the post that normally shows up. I have ...
2
votes
1answer
200 views

Table of Contents with a shortcode

I have this Table of Contents class below that will find all <h2> <h3> and <h4> tags in a wordpress post and it will create a Table of Contents out of them, it adds an ID to each ...
0
votes
1answer
368 views

shortcode outputs first before the page content [duplicate]

Possible Duplicate: Shortcode always displaying at the top of the page I have a wordpress site with wp e-commerce plugin and gold cart plugin. I have created a worpdress page with ...
2
votes
1answer
168 views

How to display html in a shortcode

How do you display or process HTML in a wrapped shortcode ? [myshortcode]<div class="map"></div>[/myshortcode] my shortcode code is function myshortcode_sc($atts, $content = null) { ...
1
vote
2answers
940 views

Creating a Slider Shortcode Based on Nivo Slider

I´m new with wordpress and I need to create a slider based on Nivo library. There I would like to create the shortcode using this syntax: [slider] [image]http: //www .domain.com/images/1.jpg[/image] ...
0
votes
1answer
84 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 ...
-1
votes
2answers
162 views

theme doesnt load plugin script from shortcode [closed]

I`ll try to make this as informative and clear as possible. Im using a combination of two themes on my site, grid-a-licious and normal for different view modes. the two themes get their files from ...
2
votes
1answer
1k 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
390 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
971 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
107 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
116 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
305 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
472 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
135 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
95 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
191 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
135 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
33 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 ...
3
votes
1answer
444 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
455 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
128 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
203 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?
3
votes
2answers
1k 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'); ...
2
votes
2answers
141 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
179 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
130 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
1answer
129 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
341 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
84 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
147 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
548 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
51 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 ...

1 5 6 7 8 9 13