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
4 views

How to open media browser from tinyMCE window?

I'm trying to create a shortcode to embed audio files, with custom data as copyright owners and year, etc. It's a basic tinyMCE window with textboxes to insert the information, and the URL of audio ...
0
votes
3answers
339 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 ...
1
vote
1answer
591 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 ...
0
votes
1answer
327 views

<?php wp_register(); ?> Display logged in user as “Site Admin” apposed to Logged in user

I'm just working on a little hobby word-press site I have; <?php wp_loginout(''); ?> <?php wp_register( '',''); ?> In the top rite corner of my site, <?php wp_loginout(''); ?> ...
1
vote
1answer
19 views

Is it important to sanitize inputs in a shortcode that will be used in site that only I will post to?

Is there any security risk in not sanitizing shortcodes in a wordpress site if I am the only one who has access to the admin panel?
0
votes
0answers
19 views

Shortcode not accepting atts

i have been working on a shortcode and I am having trouble passing $atts to it. i can't figure out what i am doing wrong. To say it another way, i cannot update 'input_product_image_ID' to a ...
0
votes
0answers
13 views

display-posts shortcode attributes have no effect

I need to list some specific posts on a page. I discovered the [display-posts] shortcode feature but it doesn't seem to work. Here's what I'm trying to do: [display-posts posts_per_page="2"] ...
1
vote
0answers
40 views

Wordpress Shortcode callback function with a plugin

I am working on a plugin and the plugin currently works great on the admin section but I'm trying to extend the functionality to the front end and using a shortcode to use the same functions. I have a ...
0
votes
1answer
24 views

How disable checkbox when listbox value changes in tinymce

I'm creating a custom popup in tinyMCE for WordPress, to insert video shortcodes, so I have a list of websites (YouTube, Vimeo, Vine, and others) in a listbox, and a checkbox to let the user decide to ...
1
vote
1answer
43 views

How to create a shortcode with 1 parameter (atts)

I am having trouble getting a shortcode to work with 1 attribute. Here is my shortcode [sme_user-email userID="2"] Here are my scripts - none of them work. function getUserEmail_func($atts) { ...
0
votes
2answers
358 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
15 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
22 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
908 views

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

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
371 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
290 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
426 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
13 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
35 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
29 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
298 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
656 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
10 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
289 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
9 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
19 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
189 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
24 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
31 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
37 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
415 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
64 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
19 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
811 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
627 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
27 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
22 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. ...
1
vote
1answer
454 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
401 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
320 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 ...