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)

4
votes
0answers
46 views

How to customize a shortcode using the customizer

General context: I have a plugin which implements a widget and I would like to make the widget into a shortcode. The widget has many options some of them mutually exclusive, and it is never good UX ...
3
votes
0answers
31 views

Calling shortcode in wp_localize_script strips result

I am working on adding some functionality on a Wordpress plugin which after a certain click needs to call on some shortcode through ajax. What I first attempted was to call the shortcode inside of ...
3
votes
0answers
44 views

Can I create customizer setting that can handle plugin shortcode?

Can I create a customizer setting which will handle a shortcode from a plugin? Do I violate and rules or guidelines in WordPress theme development? If it's possible what is the best way to sanitize ...
2
votes
0answers
235 views

How to have different captions for same image, for galleries?

Seems like I can't have the same image in different galleries with different captions. Is it possible to make that working in any way? Like if we could change the shortcut code that Wordpress is ...
2
votes
0answers
643 views

Custom media upload content for inserting custom post shortcode

I’m working on a plugin that creates custom post type “portfolio” along with shortcode to insert in any page or post. The shortcode is: [portfolio option1=“1” option2=“0” option3=“1” ] And it works ...
1
vote
0answers
14 views

Can I strip HTML tags in the “Compare Revisions” screen?

I am building a CMS for content editors that have zero tech savvy. They currently use a system called NewsCred that allows them to compare revisions much like how WordPress does when you visit ...
1
vote
0answers
14 views

Is it possible to add a repeater field to TinyMCE's option window?

I am trying to create an accordion shortcode builder for WordPress using TinyMCE's editor.addCommand / windowManager.open function. I'd like to be able to add a repeatable region within the popup ...
1
vote
0answers
18 views

WordPress TinyMCE : Get value of popup button

I'm developing a shortcode plugin, with a main button and sub-menu buttons for each shortcode, I create bootstrap thumbnail shortcode with a popup button for parameters like : Thumbnail Title Insert ...
1
vote
0answers
41 views

Is it possible to delay execution of shortcode output callback?

I have a problem : shortcode output callback triggered too early. /* Defined in plugin constructor */ add_shortcode( 'foobar' , array($this,'pre_render_routine')); function ...
1
vote
0answers
76 views

wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query

I'm implementing a form for a frontend post with a shortcode. The form is processed in the same function, reloading the page: function adicionar_ninhada(){ $user_id = get_current_user_id(); if ...
1
vote
0answers
26 views

Shortcode: text content ends up outside html tags

I have a shortcode which loops through a custom post type. It is supposed to output a link and a title for each post. But the result is that the divs and link tags that are created are empty, while ...
1
vote
0answers
85 views

Displaying recent posts on static page with template-part via shortcode

So, I'm taking my first shot at creating my own custom Wordpress theme with Underscores. I have everything straightened out, with the exception of one last thing I want to add. I would like to add a ...
1
vote
0answers
49 views

What's the best way to render Visual Composer in posts, not pages?

I have a page with layout and ui content I'd love to use in my posts. Is that possible without running through all the shortcodes with do_shortcode?
1
vote
0answers
38 views

Edit shortcode in post content programatically

Let's assume there is a simple post. It has some content and a few [gallery] shortcodes in it. I need to add (or modify) attribute to specific shortcode and save in database (not temporarily modify ...
1
vote
0answers
34 views

Creating shortcodes in plugin

First time creating a WP app, so please bear with me. Essentially, I want to be able to input a value in a form, which gets processed and put into the database. Once that is done, I was trying to use ...
1
vote
0answers
131 views

Visual Composer shortcode for child theme dir

I have a site using VC that is running on localhost and also on a staging environment. I need to access the child theme directory to call images from within raw-html sections of visual composer ...
1
vote
0answers
51 views

Displaying Login form with Shortcode

So I am trying to display a working version of the default wordpress login form on one of my pages. There is code in the functions.php file that creates the shortcode and as far as I know it works ...
1
vote
0answers
106 views

Problem with multiple shortcode in page template

We have a page (wmnf-events.php) with no content that uses a template file (page-wmnf-events.php). The template has 4 different div containers where each container has the same shortcode but for a ...
1
vote
0answers
15 views

Print shortcode in defined area

I would like to make shortcake to work that it would be possible to print in certain areas (sidebar, footer or normally in content). In templates I have two places with do_shortcode function (sidebar ...
1
vote
0answers
29 views

wordpress 4.4 self hosted video (html5) doesn't show

I was developing WP theme on my localhost (version 4.3). The client wanted to be able to add self-hosted videos. So I wrote shortcode and implemented it in Visual Composer. Basically, this shortcode ...
1
vote
0answers
39 views

Adding a colorbutton in tinymce dialog with current api

I'm trying to add a colorbutton in a tinymce dialog box, which i was able to do with the help of using this stackoverflow question here: ...
1
vote
0answers
29 views

Tinymce shortcodes within shortcode contents

I am using wp.mce.views.register to create a simple view for my shortcode in the tinymce editor, this works fine but i am looking for a way to have "nested" shortcodes e.g. [column_3] [info_box] ...
1
vote
0answers
144 views

How to prevent shortcode preview from breaking in tinymce editor?

I am creating visual preview for shortcodes (just like captions). I have don't most of the parts but my preview html is getting broke by the editor when post is saved. I have investigate it further ...
1
vote
0answers
181 views

How to wp_redirect on 'init' hook on condition of current post id?

I have made a shortcode, because we can't redirect page within shortcode using wp_redirect so I used 'init' hook to check the $_POST/GET parameter and make system redirect. But I'm stuck in a ...
1
vote
0answers
181 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 ...
1
vote
0answers
229 views

wp_editor in thickbox

I am updating a shortcode generator that I made before and I want to add in addition to text areas inputs etc.. a tinymce editor, so I call wp_editor in the ajax content of the thickbox, the editor ...
1
vote
0answers
143 views

Shortcode default attributes over-riding non-default attributes

I have a shortcode with default attributes. It works fine with the default attributes, but the user-entered attributes do not over-ride the default attributes. Here is my shortcode code: function ...
1
vote
0answers
396 views

Shortcode in posts called by ajax is not working

I am using ajax to load content of post. Functions like the_title() works fine, but unfortunately the_content() doesn't returns any shordcodes( gallery nor tablepress ) data. here is my code: ...
1
vote
0answers
494 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
0answers
18 views

Widget not displaying in WMPU sites

I'm modifying a theme for a WPMU install, and I've hit a wall. In order to display a text widget in a specified area, I'm using: $args = array( 'before_widget' => '<ul ...
1
vote
0answers
843 views

Adding css to wp_head from shortcode

I'm trying to add CSS to wp_head, from within the method called to render a shortcode. I know that wp_head does not take any parameters, so I'm trying to figure out the following: The method called ...
1
vote
0answers
251 views

WP UI style within shortcode - Any Suggestions?

I am using the wp-ui Wordpress plugin to create vertical tabbed content. What I want to do is add a span to part of the tab title - to add some additional style, but the shortcode/plugin strips my ...
1
vote
0answers
431 views

How to protect parts of my code from TinyMCE modification when switching from text to visual mode?

I've got the following problem. When I switch from 'text' to 'visual' mode - TinyMCE is automatically messing around in the code doing unwanted things which breaks my styling - not so good ;/. Is ...
1
vote
0answers
122 views

Add button to kitchen sink toggle

I have created a simple function along with a shortcode, my goal is now to add a button in the sink toggle of wordpress so that the user doesn't have to type anything. Is this hard to achieve? how ...
1
vote
0answers
88 views

Adding shortcode field to edit gallery / Gallery Settings

I want to add a field to the Add Media / Edit Gallery / Gallery Settings column which is able to accept shortcodes. I want to do this so that I can add a Cart66 shortcode which will "render" an add ...
1
vote
0answers
98 views

Complex Slider Shortcode Help

I have a PHP-Code for Slider which I found. Now I want to transform it into a Wordpress shortcode. Here's the Code: <!-- Slider --> <div class="big-slider-wrapper block-full ...
1
vote
0answers
253 views

Stop wptexturize from texturizing my shortcode

I have a script outside of Wordpress that generates an HTML file a few hundred times a day. I figured the best way to get the contents of this file in to a specific page would be a shortcode. I ...
1
vote
0answers
103 views

Using shortcode to display array in array

I am using a widget, U more recent posts. Seems to work with custom taxonomies when you input the correct data into it in a widget form, but the suggested shortcode doesn't work (and I am trying to ...
0
votes
0answers
18 views

Shortcodes not working in an AJAX call

I am using AJAX to load next set of posts on homepage. The posts load fine but the shortcodes are not rendered. I am trying to use the do_shortcode function on the content the ajax call fetches ...
0
votes
0answers
11 views

Highlighting HTML code entered in the text editor

I have a need to have both "rendered" html in a post and "raw" or highlighted html in a Wordpress 4.5.2 post or page. I have solved the former by simply editing in the text editor, placing my code in ...
0
votes
0answers
18 views

Extending site search to include shortcode output

I wrote a shortcode that generates some HTML content for a page. I want my visitors to be able to find the page that this shortcode is on when they do a site-wide search. But when I perform a site ...
0
votes
0answers
23 views

Post information from plugin to static page Wordpress

I'm writting a plugin to Wordpress and i need to post an information from date base to static page. I do it by shortcode. Here is an example of plugin function code: function ...
0
votes
0answers
25 views

How do I get a dynamic shortcode to render correctly?

I have a page that loads album preview images from Flickr. I want the user to click on a link/thumbnail and refresh the contents of the page with the requested album. I want to use a plugin called ...
0
votes
0answers
14 views

launch a shortcode from a link

Am in wordpress. I have a shortcode [gallery link="none" size="full" ids="18,17,15,14"] I want it to run when I click a link. I did try using do_shortcode but as yet I can't figure out how to ...
0
votes
0answers
45 views

Shortcode works from functions.php but not from included file

I have put the shortcode for an extension I am building in the same file where that extension (meta box) is located, at the end of the file like: function my_shortcode_callback( $atts ) { $atts = ...
0
votes
0answers
34 views

Adding a query string to product links

I need to add a query string to the end of the links generated by a [products] shortcode from WooCommerce. Each product appears with three links. The image, the title and the add-to-cart button. I ...
0
votes
0answers
37 views

Make shortcode work in all posts displayed by loop, not just the first one

I have a post archive displaying post and author meta at roadtripsharing.com/road_trip I added a do_shortcode(); in the loop, specifically related to the "New Message" button which opens a dialogue ...
0
votes
0answers
37 views

Change Gallery Shortcode Image Size

I am developing a WordPress theme and have a few posts with galleries (displayed via Jetpack slideshow). Gallery example: [gallery type="slideshow" size="full" ids="1672,1682,1674,1670,1676"] ...
0
votes
0answers
30 views

Wordpress not responseing headers to download a file

I have a WP plugin that sends a link to an email to download a file in hidden location. User selects a file, then a token containing the file ID etc. is written to a database, and a link is sent. Upon ...
0
votes
0answers
15 views

Choosing what Shortcodes should render

So I am working on a mobile app that pulls from a WordPress JSON API, I've coded our own end point and it's delivering content just fine. I need a way to be able to pick and choose what shortcodes ...