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
355 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
14 views

Video Shortcode Only Returning a Link

I am trying to dynamically load a video in the media library using the built in MediaElement player. To do this, I am using the do_shortcode() function to run the [video] shortcode and build up the ...
0
votes
1answer
20 views

Shortcode and whitespace formatting problem

I'm having a problem with shortcodes on a website, currently you enter a shortcode in the post edit screen like the following: [tab name=Itinerary] This will output a tab such as: However as ...
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 ...
-1
votes
3answers
897 views

How to use 'Event Manager Shortcodes' plugin via the php code? [on hold]

I am using Event Manager plugin. I want to use many of the shortcodes via php code. e.g [events_calendar]
1
vote
1answer
1k 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 ...
1
vote
1answer
364 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
286 views

How to create a custom shortcode for custom login form?

I am trying to create a shortcode for the login form to use on a page. I have manage to get a simple form, but am looking to add the "forgot password link" Here is what I have so far ... any way to ...
0
votes
1answer
425 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 ...
0
votes
0answers
12 views

Create a random list of html items within a shortcode in the functions file.

I'm trying to create a function that randomly pulls lines of code for a list of HTML items. Basically, I'm going to have a list of 50 or 100 images with hyperlinks associated with them. I'd like a ...
0
votes
1answer
29 views

Extract attribute values from every shortcode in post

I have multiple shortcodes in the post: [section title="first"] [section title="second"] [section title="third"] I want to extract all title values (i.e first, second, third) from external ...
0
votes
2answers
27 views

Shortcodes in custom post fields without the_content()

I have created a custom post type which doesn't use the_content() to display anything in the front-end, just using echo's. The user enters data into a text-area field in the plugin admin back-end, ...
1
vote
3answers
2k 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 ...
1
vote
2answers
294 views

Custom Shortcode and Button not Working after 3.9 update

I have added a new button that creates a short code but it seems that after the newest WordPress update, the button is not working any more. The button is visible but when someone clicks it, nothing ...
0
votes
2answers
650 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 ...
0
votes
2answers
7 views

How do I add an article to specific page?

Regardless of it being WooCommerce or WordPress, I want to add a couple articles to specific pages, so they show there instead of the images that are there now. Homepage I know, I'm supposed to use ...
0
votes
1answer
281 views

Change font-size within a shortcode

I have a simple shortcode like this.... function myshortcode( $attributes, $content = null ) { extract( shortcode_atts( array( 'class' => '' ), $attributes ) ); return ...
1
vote
1answer
8 views

Forcing max-width for image captions

I've implemented a filter to my image captions based on this question I asked a few days ago. How can I slip into the caption the css style of max-width as well? I think it can be done with ...
0
votes
1answer
18 views

Correct way to pass information between seperate shortcode functions

I contain all my short-codes in (the equivalent of) functions.php. I want to have one short-code function share information in an object, and another able to access that object. The shortcodes may or ...
0
votes
2answers
181 views

Add shortcode within the_content()

I'm trying to add a shortcode within the text of the_content(). It is possible to add it to the beginning or the end however I cannot figure out how I would get it to show after say 200 characters. ...
0
votes
1answer
21 views

Nested shortCode functions in the functions.php file

I'm trying to get a shortcode function (newStuff) to display inside of another function (oldStuff), but I'm running into trouble. Both shortCode functions are listed below, as well as what I've tried. ...
0
votes
1answer
30 views

the_content() shows shortcode instead of parsing it

I'm loading a given post data via Ajax. The problem is that a plugin's shortcode is not parsed. The plugin is "Ninja Forms". It outputs [ninja_forms_display_form id=5] Instead of rendering the ...
0
votes
1answer
34 views

How to create a shortcode for embedding pdf in iframe?

General information I am creating a site with WordPress. For the content I want that the PDF files can be embedded inside an iframe. So I first created a WordPress function to hook in ...
0
votes
1answer
411 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 ...
0
votes
1answer
20 views

Multiple level shortcodes

I am working on a plugin and stopped in a situation, I hopesomeone can help me with a solution. I want to have a shortcode structure like : [shortcode_1] [shortcode_2] [shortcode_3] ...
0
votes
1answer
22 views

Class variables in shortcodes

Don't know what I'm doing wrong but, I have the following code: class the_shortcode { //Define Class Variables private $var; public function __construct() { ...
2
votes
1answer
63 views

How best to apply do_shortcode in media.php for captions

I wanted to be able to put shortcodes in an image caption. I've successfully done this by modifying the media.php file with the following just prior to return. $atts['caption']= ...
0
votes
1answer
17 views

Visual Composer integration

I've installed Visual Composer on my own template. The thing is that is not rendering all it's shortcodes. <?php $post = get_post( $post->ID ); echo $post->post_content; ?> Is that ...
3
votes
1answer
796 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
176 views

Hide Selection of Text From Archive, but Show on Single Posts

I'm looking for a shortcode similar to this: [hidetext]some text to hide[/hidetext] Then what will happen is that the the tag will hide the text from any page that isn't the Single Post page. Only ...
1
vote
2answers
610 views

How to add shortcode tags in single.php

In my theme has one shortcode tags to display tags of post and function to load content post. But in function doesn't include shortcode tag. Now I want to add it to function but i don't know how to do ...
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
1answer
55 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
1answer
26 views

shorthand syntax for custom fields

I'm trying to write a shortcode and am sorely out of practice with this stuff. It's for a plugin Full Width Audio Player and I'm trying to query all tracks within a certain playlist so it will output ...
0
votes
0answers
20 views

Shortcode display CPT Query only showing 1 post?

Ive seen similar questions on here but I am already using WP_Query and wp_reset_postdata. In short I wrote a shortcode that queries our Custom Post Type to display posts specific to a category. ...
-2
votes
0answers
15 views

Shortcode Has Stopped Grabbing Content [closed]

I am not too php savvy, and I'm also not to savvy with the development of shortcodes. I've been using the ironbull restaurant theme for a client. The other day I added button to the main nav menu in ...
0
votes
0answers
11 views

Why sharing responds differently on home page and archives page than other pages? [closed]

I use WP Social Sharing. I wanted to add Facebook, Twitter share button for home page and archives pages. WP Social Sharing plugin provide following shortcode. [wp_social_sharing ...
1
vote
1answer
452 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 ...
0
votes
1answer
399 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
1answer
2k views

Auto gallery from folder contents

I want to create a WordPress shortcode that will add an automated gallery of the contents in a folder. I am currently trying to implement this in a site that publishes 12 annual magazine issues, so as ...
-1
votes
1answer
19 views

Display function from functions.php in tag.php

I've added several functions to the functions.php file. I call those functions using a shortcode [shortCode] while in posts, pages, and widgets. But the [shortcode] will not work outside of posts, ...
1
vote
1answer
318 views

Shortcode are not working in Option tree textarea

I am using option tree. In textarea, i place shortcode [layerslider id="1"] its not working, i also found same post replied by plugin author allow shortcodes in textarea in option tree applied ...
0
votes
1answer
340 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 ...
3
votes
2answers
2k views

Customizing gallery shortcode in 3.5

I'm trying to customize the gallery shortcode using the new gallery system in 3.5 and I'm having a bit of trouble and can't figure out where I'm going wrong. This is what I've got at the moment (in ...
0
votes
1answer
260 views

Wordpress core responsive video not working with shortcode

I cannot get the video from Wordpress core to behave responsively. I'm using the following CSS: .videocontent { width: 100%; height: 100%; max-width: 1024px; margin: 0 auto; } ...
0
votes
1answer
268 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
2answers
41 views

Shortcode not passing variable to included file

I set up a shortcode which includes a standard php/html form file. In the form I have a hidden field where the value is a variable which is meant to be available in the form via the shortcode ...
0
votes
0answers
9 views

Ouput rel attribute on links in Gallery Shortcode within template file

I've added a gallery into a template file using echo do_shortcode('[gallery link="file" ids="1,2,3,4,5"]' ); When I use just the shortcode within a post I get a rel attribute on the links to the ...
1
vote
1answer
99 views

Custom shortcode being executed when saving page in wp-admin

I'm working on a custom shortcode: [abuzz-store slug="woolworths" fields="description,level,phone" more="true"] The shortcode is working correctly on the website frontend. However, I can no longer ...
0
votes
1answer
259 views

tiny_mce_before_init preventing custom shortcode icon appearing

I'm using the following to trim the TinyMCE editor // Restrict buttons on the rich text editor function formatTinyMCE($in) { $in['remove_linebreaks'] = false; ...