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
0answers
3 views

Sanitize or treatment of string in editor via shortcode

I have a string of data that's getting passed to the page via shortcode, but the original developer of the shortcode did not account for how I'm necessarily planning on using the data on the page, ...
1
vote
2answers
8 views

Creating a shortcode based on users preferences? (A bit hard to word)

Background: Creating a dynamic shortcode based on user inputs. This shortcode should change the output of do_shortcode based on the fields the user selects. Example: On a page, a user selects ...
0
votes
0answers
6 views

How to add an image uploader to shortcode generator?

Creating a quote shortcode which requires an image. I managed to find shortcode generator tutorials which inserts simple stuff like tabs, columns or just quotes without images. How do I add and use ...
0
votes
2answers
22 views

Add variable in between do_shortcode

I'm using redux frmaework for my theme option panel. & I'm using meta slider for my homepage. I used this shortcode in my frontpage template to show the slider: <?php echo ...
1
vote
1answer
274 views

wp_specialchars and wp_specialchars_decode in a shortcode plugin

I have written my first plugin, a shortcode plugin. I have read about wp_specialchars and wp_specialchars_decode but I'm not sure how to use them. The plugin read a shortcode allowing some parameters ...
0
votes
1answer
22 views

Creating custom shortcode

I'm trying to create some custom shortcode - I want to be able to have names and numbers of people I want to display on my website, but as a shortcode, so it doesn't have to be typed in again and ...
0
votes
1answer
356 views

Wpautop stops working after get_the_excerpt

function pre_process_shortcode($content){ global $shortcode_tags, $shortcodes; // Backup current registered shortcodes and clear them all out ...
0
votes
0answers
139 views

Str_replace using shortcode with multiple changes

I am using a feed importer plugin which gives the option to use a short code in case I need to change data (in this case data for a custom field) on import, using for example: ...
0
votes
0answers
19 views

Wordpress gallery shortcode - include author's images

I'm using the built-in wordpress gallery shortcode to display all images of a category -- documentation found here: Wordpress Gallery Shortcode Codex --- By using [gallery category="1"] How could ...
1
vote
1answer
886 views

Audio and video shortcodes not working properly

I'm having some trouble with Wordpress's built-in shortcodes for audio and video. When I embed a video, it basically gives me a black box and has a link to download the file at the top; when I embed ...
4
votes
4answers
224 views

Native “playlist” shortcode random playing… How?

I'm using the beautiful shortcode "playlist" in my site but I want the random playing of my audio files. What I use is this: [playlist tracklist="false" images="false" artists="false" ...
-1
votes
0answers
18 views

How can I add shortcode to banner spaces [closed]

I use (KADS) Kento Ads Rotator on my wordpress websites. But before it was in accordance with the theme and I could ad shortcodes on banner spaces. but on the current themes I use I cant do it any ...
5
votes
3answers
1k views

Split Content and Gallery

Is there a way to split up the post content and the gallery short code. I want to display the gallery outside my normal content no matter how or where it is placed. I can use this to get the shortcode ...
0
votes
1answer
287 views

Custom Fields - Boolean Display of True/False to Yes/No

I am importing fields from a Real Estate site. The Import of one Custom Field looks like this... Field Name after Import ---> assistedLiving Field Value ---> false to output the display in ...
0
votes
1answer
576 views

Custom wysiwyg editor doesn't execute shortcodes?

I encounter this weird problem.. I'm trying to create a simple & easy website for a client. He wants to embed video's into the page. I use different customfields assigned to specific elements in ...
0
votes
0answers
10 views

Modifying Search to Exclude results from within short code or HTML

I've been struggling with this one for some time and I was wondering if anyone has any ideas on how to fix this. I'm not asking about stripping out short codes or HTML from the excerpt, that's fairly ...
-1
votes
1answer
70 views

How I make a shortcode for this code?

I wrote a script to display recent posts from a specific category in wordPress. <?php $catquery = new WP_Query( 'cat=3&posts_per_page=10' ); while($catquery->have_posts()) : ...
0
votes
1answer
12 views

What is short code for following?

Here is my code and I want to know what is shortcode of this? Is it [login_form] or do we need to add something more? With [login_form] there is no output as result function pippin_login_form() { ...
0
votes
1answer
18 views

Input with spaces in Shortcode attributes overwritten by defaults

question seems to be similar to the one asked here but the answer went down a different path. Pretty much if a user enters a shortcode attribute with a space it will get overwritten by the default ...
1
vote
3answers
75 views

Wordpress plugin shortcode not working

I have a shortcode defined in a plugin as follows: // [tag1] -> Some Longer Text function shortcode_example1() { return 'Some Longer Text'; } add_shortcode('tag1', 'shortcode_example1'); Now ...
0
votes
1answer
18 views

PHP “Inception” - PHP within string [closed]

Posting this in Wordpress as my limited PHP knowledge leaves me thinking this might be WP-specific. I'm using WP's do_shortcode to call a shortcode into a post echo do_shortcode('[mycred_video ...
2
votes
1answer
327 views

Get multiple shortcode attribute values

I'm trying to get several values from a shortcode. I tried several things without success. The shortcode looks like this: [myshortcode metakey="<field_key:key1, title:Title ...
0
votes
0answers
19 views

Gallery shortcode menu order fix no longer working on Wordpress 4.0

I currently use the pmc_gallery_menu_order_fix for setting the menu order for image attachments in galleries as seen here: Wordpress 3.5 Gallery Menu Order not set? With Wordpress 4.0, I am now ...
0
votes
0answers
21 views

Separating Custom Template logic

Our site displays athletic race results, and each runner has a specific wordpress user account. We have custom plugin to handle building the html elements. A specific runners page can be seen via this ...
0
votes
0answers
13 views

positioning disqus comment box in a specific location using function.php file

I need to display disqus comment box just after the post end (there are some other related post plugins which also load after post content so i want to post the disqus above them. Earlier when i was ...
0
votes
1answer
291 views

How to put a form with php code into a variable or shortcode?

I'm trying to put my frontend form into a variable or a shortcode so I can wrap another shortcode around it (specifically Bainternet Post Creation Limits). My form has PHP code in it so I'm not ...
0
votes
1answer
370 views

WP_Editor Shortcode Issue

I have created a front-end editor using wp_editor that functions as it should. Upon testing I have noticed that it is stripping out any shortcodes that have been inserted in the content. I have ...
1
vote
1answer
17 views

Allow shortcode for custom widget

The following code allows shortcode parsing for 'text' widget: add_filter('widget_text', 'do_shortcode'); How to make a similar one for a custom widget? I tried the following one but it didn't ...
0
votes
2answers
118 views

Using “excerpt_more” filter for a specific post type

I have used excerpt_more filter in a theme's functions.php and in a plugin's functions.php. Here is the code for the theme function theme_excerpt_more( $more ) { return '...'; } ...
0
votes
1answer
87 views

WP_Query in a shortcode

I am trying to put several queries in a shortcode so that I can call them in a page instead of using custom templates. I got my query going but I only see some of the content on the page. The image ...
0
votes
1answer
335 views

Last post ordered by publish date using WP_Query on front page

I'm joining together few websites into one and I created appropriate posts and changed their post_date (publish date) to the original time of post. However (even if I list more than 1 post) the ...
0
votes
0answers
19 views

Using shortcodes that wrap around code

I'm using a membership plug in that requires me to wrap protected pages in a short code [private]content[/private] I want to use this code in my template so my client doesn't have to manually insert ...
0
votes
1answer
401 views

Custom registration form in shortcode getting internal server error 500

I created a custom registration form which works fine when used as a custom page template. I needed it as a shortcode so I created a shortcode using the function below /* Custom shortcode */ function ...
1
vote
1answer
318 views

How to use shortcode attribute in separate function

I'm working on a WordPress site and have installed a slider plugin that registers a slider on the backend (or multiple sliders) and then displays it on the front end with a couple of simple php ...
0
votes
1answer
19 views

Add category attribute to custom recent post shortcode

I have a recent post shortcode to display a custom post. Everything works fine so far. However, I would like to add a category attribute so I can specify which category to display. My working code is ...
0
votes
2answers
27 views

Having Trouble Running Query From Shortcode Using Tribe's Events Plugin

I am not getting any results back using this code, even though I am passing in correct values. Can someone please take a look? function webinar_list_shortcode($atts) { global $post; // Defaults ...
0
votes
1answer
63 views

Shortcode Display From Wordpress Dashboard Page Without Using post_id

I have this code for showing recent posts on my home page custom theme and it works well. functions.php code: function my_recent_posts_shortcode($atts){ $q = new WP_Query( array( ...
0
votes
1answer
53 views

echo do_shortcode for Contact Form 7 from within dynamically loaded php file

I am loading a php file containing echo do_shortcode('[contact-form-7 id="568"]'); using jQuery .load() but the shortcode returns nothing. I have seen this question and answer and understand that ...
0
votes
1answer
15 views

Children Shortcodes?

I started creating WordPress plugins a few weeks ago, and I would like to know if it's possible to somehow "embed" shortcodes in some others. Basically what I want to do is create a table or a list, ...
2
votes
1answer
749 views

Convert shortcode into html form

I want to convert this shortcode. [list-style="one"] a b c d [/list-style] To ouput like this one (html form) <ul class="one"> <li>a</li> <li>b</li> ...
3
votes
1answer
626 views

TinyMCE popup windows using WP functions

In my editor I would like to use a TinyMCE generated popup to insert in the textarea some complex shortcodes. I use the TinyMCE API to show the popup (bottom of this question). The popup is a PHP file ...
0
votes
2answers
578 views

Insert wp gallery shortcode into custom textarea

Is there a way to insert wp gallery shortcode into custom metabox textarea ? I would like to have something like this: New metabox in post/page with textarea and below textarea there are a button to ...
1
vote
3answers
890 views

Execute shortcode within shortcode

I am using this plugin: http://wordpress.org/extend/plugins/worldcurrency/ Shortcode syntax: [worldcurrency cur="EUR" value="25"] However, I'm using Advanced custom fields and the shortcode for ...
0
votes
1answer
318 views

Create Short code dynamically

I want to generate short code for my gallery dynamically. For a single gallery, it is easy to create a short code for my gallery using add_shortcode( 'image-gallery', 'gallery' ) Now my question is ...
1
vote
0answers
190 views

do_shortcode via ajax

I try to call contact-form-7 via ajax with do_shortcode. But it shows just "shortcode code". function example_ajax_request() { // The $_REQUEST contains all the data sent via ajax if ( ...
1
vote
1answer
402 views

Shortcode in AJAX popup

I am trying to use a shortcode from Ultimate Facebook plugin to display a FB connect button in an AJAX popup and can't seem to get it work properly. I searched and used the solution given by djb in ...
3
votes
1answer
46 views

Autogenerate wordpress shortcodes using array?

I was create a shortcode which automatically generate shortcodes with given array key and value. Function names does not generate dynamically. Note: Array KEY = ShortcodeName and Value = Wordpress ...
1
vote
2answers
321 views

Call Shortcode inside another Shortcodes callback

I'm using a plugin that shows content only to specific user roles. This content is surrounded by a shortcode tag to make it invisible to other other user roles. Now I'd like to call other shortcodes ...
0
votes
1answer
256 views

Unable to add TAB character to post?

I am using the CodeColorer plugin to display source code in my WordPress. I am trying to have my code indented so that it displays properly on the website. However, when I try to add the following ...
0
votes
1answer
1k views

Wordpress removing <p> tags?

I'd already come across a case where Wordpress added <p> tags. However now I'm dealing with the opposite situation. When I add [] shortcodes inside <p> tags WordPress automatically removes ...