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

Trying to get do_shortcode to work inside page template

I have the following page: <?php /* Template Name: name */ get_header('header-name'); ?> <div class="video_area fix"> <div class="main_container video_content no-control"> ...
0
votes
1answer
12 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 = 1772). I would like to display the ...
2
votes
2answers
403 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
15 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
550 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
31 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
21 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
23 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
33 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
500 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
309 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
852 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
10 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
86 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
12 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
413 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
957 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
17 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
840 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
8 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
2 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
17 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
325 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
79 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
552 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
63 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 ...
2
votes
1answer
62 views

Execute/Parse Shortcode in Native WordPress Custom Field Value Field

I've spent some time searching for a solution but have not found 1 single example of how to do this. I would like to place a shortcode in the value field of the Custom Field meta box in WordPress so ...
1
vote
1answer
408 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
0answers
17 views

Wrapping succeeding shortcodes together

I'm developing a WordPress theme where the gallery shortcode breaks out of my main content div. I haven't really put this in to practice but I'm thinking of theories how to accomplish this easily. ...
0
votes
1answer
520 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
2answers
16 views

Short code format for cat tagging when posting from email

I thought I read that when you send in a post via email you can add the category tag with a short code. So I try this with something like [my-category-name] But all that does is print the literal ...
1
vote
1answer
419 views

Remove specific shortcode from get_the_content()

I have a variable like this: $post_content = get_the_content(); Here i want to remove some specific shortcode from the $post_content variable e.g i want to remove only this [video height="300" ...
3
votes
2answers
497 views

Using get_option() in JavaScript

Previously, I used the get_option() function to get an option in PHP, like this: $width = get_option('my_width'); This is inside a shortcode function. Now, I want to have an option in JavaScript. ...