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)

1
vote
1answer
263 views

Buddypress shortcode for tabs [closed]

I want to add some more tabs like photos, videos on the user profiles of my buddypress site. Is there any shortcodes or functions to add the tabs?
1
vote
1answer
376 views

Shortcode Not displayed at the Right Place [duplicate]

Possible Duplicate: Shortcode always displaying at the top of the page I am using custom shortcode to show some message at the end of the post. I am finding it hard to do so because it ...
0
votes
3answers
2k views

Make a Shortcode load after Post/Page Content?

I created a shortcode for time.ly's "all in one event calendar app" that makes a paginated list of upcoming events with out all the java script and user options. I posted about it here. (Its still a ...
0
votes
1answer
1k views

How do you use do_shortcode via AJAX call?

I'm attempting to call a Contact Form 7 form using AJAX in a Wordpress theme. I'd ideally like to use the Contact Form 7 shortcode to do this, however it doesn't seem as though do_shortcode is an ...
0
votes
1answer
148 views

How to check if this is the nth instance of a given shortcode in a post

Suppose I have a shortcode called [item], which I have used 20 times in a particular post. Is it possible, from within the shortcode handler function, to know what the numerical index of the given ...
0
votes
1answer
58 views

My plugin won't return anything [closed]

I am trying to write a simple plugin to insert some post links in a post at the right place. The query part works okay in a template, but my attempt at a displaying via plugin just returns a blank ...
0
votes
2answers
1k views

WPTouch - how to remove shortcodes or make shortcodes function

So as the title states - using WPTouch Mobile plugin (NOT Pro) I either want to make the shortcodes work as they should or remove them altoghether. Currently they render on the page as [shortcode] ...
3
votes
1answer
1k views

Using action hooks inside of a shortcode

I am trying to create a modular plugin that includes action hooks for developers to add content before and after the main shortcode content. I'm having some trouble because anything I do in the ...
0
votes
3answers
804 views

shortcode using multiple WP_Query's with multiple category names not fully functional

we're working on a bilingual site, Larry A. Downs all the posts are categorized into two categories, english or spanish, along with other categories. so every post has multiple categories, i've ...
0
votes
1answer
652 views

Form submit from modal window to parent window

Trying to submit a field value from a popup modal window to my WordPress parent window meta-box. On my add post page I have a metabox with a field type 'text'. The id of my 'text' field type input ...
1
vote
1answer
617 views

Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it

I'm trying to output a custom post type archive using a shortcode. Everything works fine except for the get_next_posts_link part. The weird part is that it's right next to a get_previous_posts_link ...
2
votes
1answer
5k views

Shortcode Displaying Custom Post Types

I have a problem with a shortcode that I'm creating. I have 5-10 different custom post types, and rather than creating a template for every individual post type, Id rather use a normal page and ...
0
votes
2answers
142 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
130 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
183 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
777 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
2answers
479 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 ...
3
votes
1answer
581 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
92 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
62 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 ...
1
vote
2answers
255 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
191 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
3k 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
140 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
88 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
121 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 ...
4
votes
1answer
333 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
2answers
2k 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
399 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 ...
1
vote
1answer
787 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 ...
3
votes
1answer
823 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) { ...
2
votes
2answers
2k 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
217 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
871 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
282 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
189 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
412 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
190 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
150 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
499 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
304 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
991 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
973 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
303 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
352 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
4k 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'); ...