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)

2
votes
2answers
409 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 ...
1
vote
1answer
535 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
27 views

Showing content from one page on another

There are many posts that seem to strike around this area, but I'm more and more confused by each one I read. I have a page that shows the "Terms of Service" (id = 1086). I would like to display the ...
0
votes
0answers
13 views

Is there a way to tell if a shorcode's handler is being run before or after the content formatting filter?

Apparently (based on what I observe) WordPress runs every shortcode handler twice for every time that shortcode appears --- once, preliminarily, before the output is processed (and the output of the ...
0
votes
1answer
17 views

Where to find the code used to render a page that has a shortcode and a template defined?

I'm new to WP and trying to configure the 'My Account' page on a WP site. The site uses the Paid Memberships Pro (PMP) plugin. In the WP admin console > Pages, there is a page called 'My Account'. ...
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
2answers
8 views

Can you add shortcode as a menu item link?

I want to use the Ninja Forms pop-up modal from a link in my menu. I used this plugin to make shortcodes work in the menu but couldn't get it to work: https://wordpress.org/plugins/shortcode-in-menus/ ...
0
votes
1answer
358 views

How to get specific string in explode array?

I have a shortcode where I'm trying to get a specific string from the $args array below. Query: <?php $args = array( //'post_type' => $posttype, 'post_type' => explode( ', ', $posttype ), ...
0
votes
2answers
392 views

Passing postid of Testimonial Custom Post in Shortcode Parameter

I am trying to create Testimonial custom post and display using shortcode function create_post_type() { register_post_type( 'testimonials',//new post type array( ...
2
votes
2answers
404 views

Stray closing paragraph tag when using shortcodes

I'm using a basic shortcode to wrap some text in an expandable div. What appears to be happening is that the wpautop is inserting a stray closing paragraph tag at the beginning and a stray opening ...
1
vote
1answer
599 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
16 views

Combining similar shortcode functions?

function customfield_1_shortcode( $atts ) { if ( get_post_meta( get_the_ID(), 'customfield1', true ) ) { $customfield = get_post_meta( get_the_ID(), 'customfield1', true ); ...
1
vote
1answer
551 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
0answers
42 views

How to retrieve sticky post with Visual Composer's loop builder?

So I have a simple custom shortcode function build under Visual Composer with vc_map. <?php /** * Blog Posts * */ if( function_exists( 'vc_map_get_attributes' ) ) { $atts = ...
0
votes
1answer
22 views

Reload wordpress shortcodes

Let's say I have a page, and inside that page, I have inserted shortcodes/plugins for a chatbox, twitter feeds, fb feeds, tumblr, etc. The shortcode accepts parameters for different hashtags to ...
0
votes
0answers
26 views

Pagination of Custom Query inside a Shortcode on a Custom Post Type Page (singular)

I've done dozens if not hundreds of searches regarding my problem, but didn't find a solution anywhere. I really hope you can provide me a solution, that would be great! Thanks for reading. Heres ...
1
vote
1answer
28 views

creating shortcode to pull json array

Frankly - this may be a duplicate of another question I have out there. Sorry if it is. I'm learning this site and PHP/Wordpress development. I have partnerships with local sites that use JSON and ...
0
votes
1answer
44 views

Shortcode not working with Wordpress updated

I am trying to learn wordpress and php development. I have been trying to create my own shortcode to add a json pull that I can parse into scheduled posts. I have the base php working - I've been ...
0
votes
0answers
20 views

Problem creating menu shortcodes

I'm trying to setup three shortcodes, each to display its own unique menu block. Just two are shown in the code below because I ran into an issue. The problem I am having is that both [footera] and ...
1
vote
2answers
34 views

shortcode get thumbnail size

How to get shortcode thumbnail size? my code get shortcode thumbnail size in functions: function thumb_medium( $atts, $content = null ) { return wp_get_attachment_url( get_post_thumbnail_id( ...
0
votes
1answer
501 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
30 views

Using ACF Custom Field value in a URL with do_shortcode() [on hold]

I am using the ACF custom fields and video.js plugins and I want to add the custom field value inside the url for the youtube video that is inside of do_shortcode() So far this is what I've come up ...
0
votes
2answers
317 views

Is shortcode_unautop() broken?

shortcode_unautop() in /wp-includes/formatting.php is supposed to find shortcodes in a block of text and remove wrapping paragraph tags from them. I've been having issues with paragraph tags making ...
0
votes
1answer
857 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
0answers
11 views

Gallery using Foundation 5 Grid + Clearing

First i'm using Foundation 5 JointsWP theme. Found this link and Esa Rantanen code work's great but there's problem i found and can't fix. Using wordpress gallery creator i can select image size ...
3
votes
1answer
87 views

Insert Images at Master Uniform Height

I'm trying to figure out a way to insert images from the media library into the post editor at a uniform height... but by selecting one option. For example, I set a height like "300" somewhere (like ...
0
votes
0answers
15 views

woocommerce shortcode modification

I would like to modify a Woocommerce shortcode. I would like to make a copy of it in my own functions file. So far everything I've tried hasn't worked. The shortcode I would like to modify is the ...
0
votes
1answer
24 views

Video shortcode outside WordPress not working with IE and mediaelement's Flash fallback

I'm using WordPress shortcodes outside the installation folder (specifically the video shortcode) to play locally hosted videos, but I have a problem with IE. The videos are loading fine with HTML5 ...
0
votes
1answer
529 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
13 views

problem multisite with blog id

I have a little problem that I can not solve. I have a website "multi-site" system with ADS PRO scripteo. I wish I could enter leaderboard banner. After that I created the shortcode: ...
0
votes
1answer
415 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
0answers
24 views

To get the data from the Database is not working?

The below code is reponsible to display a dropdown options that while selected a options a google map was appeared. But when I put the shortcode into my page the options are being shown. But the ...
0
votes
1answer
19 views

help with custom shortcode that stopped working

A while back I wrote a shortcode for my site, and it just recently stopped working. I'm wondering if someone can help. The shortcode is called paramtext. What it does is check the value of a certain ...
0
votes
2answers
964 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
1answer
3k 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 ...
0
votes
1answer
18 views

Referring to site URL in shortcode argument

Apologies for the noob question -- have searched extensively, and it's probably a forehead-slapper. A plugin I'm using offers a shortcode that takes a URL as an argument; I should set that argument ...
0
votes
1answer
873 views

Display custom post type with shortcode

I have made a custom post type for my WordPress Theme and a page where the custom post types are displayed. But does anyone know how to make a shortcode that displays posts of a custom post type?
0
votes
0answers
12 views

mceInsertContent repeating previous values

I am trying to insert a shortcode to the editor using jQuery dialog. But every time I click on insert button it adds the previous values with the current values. For example, on first click it adds ...
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 ...
0
votes
0answers
10 views

I want to invoke a javascript function after shortcode

I created a shortcode that loads 6 posts in a custom design with a filter. But i'm getting a JS error because its looking for a dom elements that don't exist yet: jQuery(document).ready(function(){ ...
0
votes
0answers
3 views

Why are wp.mce.views re-created each time?

If you look in the mce-views.js of Wordpress you'll see something interesting - it references views by the text shortcode and looks them up in an array: /** * Get a view instance. * ...
0
votes
0answers
20 views

Shortcodes don't work

I'm trying to make shortcodes work. Because I use a onepage website, with get_page in page.php, the shortcodes in the wordpress admin don't work. I tried to activate the plugins I'm using (which are ...
0
votes
1answer
22 views

apply_filters to $GLOBALS

I'm building a onepage website, using the Pootle Page Building plugin. With get_page, I show every separate page on 1 page. To target the Pootle Page Builder content, I'm using the following code: ...
0
votes
2answers
327 views

Shortcode to find and replace URL

I'm trying to create a shortcode that will search within some specified text for a link and replace it with one that I specify. For example: [scode]Click on <a href="www.X.com">this ...
2
votes
1answer
89 views

Adding PHP/HTML code inside page from custom template

I'm helping my son with his financial site with some custom programming. The first project for him is a custom spreadsheet using jQuery, flot, php, etc. I created a child theme, created a template, ...
0
votes
0answers
10 views

shortcode with menu item attributes show only if entered

I have created a shortcode so admins can add a menu with up to 11 items. The issue I have is if they enter only 8 items I have 3 empty items showing up in the html. Is it possible to show items only ...
3
votes
1answer
1k 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
558 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 ...
-1
votes
2answers
64 views

I've broken the short code for Contact Form 7!

Well I should qualify that title. The shortcode is fine in itself, and no doubt nothing to do with the guys at CF7 causing this issue. I am sure it's me, but it just isn't working after I've added ...
1
vote
3answers
3k 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 ...