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)

1
vote
1answer
27 views

Setting youtube size in functions.php

I'm using the code below to set the width and height of youtube embeded links ////////////////////////////////////////////////////////////////// // Youtube shortcode //////////////////////////////////...
0
votes
0answers
19 views

Turn shortcode into HTML view right after the user types it in the admin editor

WordPress automatically embeds from many providers. Let's say I type an URL from YouTube in the admin editor, it instantly shows the video at "Visual" tab, the iframe embed, but the URL remains ...
6
votes
2answers
213 views

Insert Custom HTML After Shortcode

The scenario is that I need to add an HTML banner under a slideshow which is a shortcode in the homepage content. I personally hate adding a bunch of div tags to the TinyMCE editor so I'm trying to ...
0
votes
1answer
30 views

Shortcode outputting at top of content

I have a shortcode that is always outputting at the top of the page content. I am not sure on the correct usage for the output buffer in this instance. Below is my shortcode function: function ...
1
vote
1answer
26 views

UberMenu list current user's posts as menu items

I'm attempting to turn users' posts into menu items, without luck. Here's what I have so far, but not working. I would like to use the Advanced custom content by adding a shortcode. add_shortcode( '...
1
vote
1answer
50 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 (...
3
votes
3answers
111 views

Are php template shortcodes ok?

Can I just get everyone's ok that using shortcodes embedded within templates is the 'correct' thing to do? I've tested them and they work just fine - but I just wanted everyone's thoughts. Thanks ...
0
votes
3answers
44 views

Shortcodes do not work in own template

I have a big problem rendering shortcodes in my template I designed for my Tennis Club which works fine. However, now I wanted to integrate the standard WordPress Gallery, which is implemented by a ...
0
votes
0answers
39 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 ...
4
votes
0answers
50 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 ...
1
vote
1answer
39 views

How create a Shortcode with hover and complex options

I am wondering how do you do when you have to create a shortcode with multiple hover or complex options ( gradient, boxshadow etc, thing that can't be inline ). How do you generate the css. I don't ...
1
vote
1answer
50 views

Can A Shortcode Get HTML/Text From Content And Return It Twice With Added HTML?

I'm trying to cut down on some work for myself and I was hoping someone might know if this is possible. These are images setup in a slider that shows a text overlay on the image on the next slide in ...
5
votes
1answer
64 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 ...
2
votes
0answers
17 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 /wp-...
0
votes
0answers
20 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 ...
1
vote
2answers
83 views

Shortcodes not resolved in AJAX call response

I have a simple function, which returns the content of a page with the given pageID: function get_page_content(){ $id = $_REQUEST['id']; $page_data = get_page($id); echo ...
0
votes
1answer
26 views

Is Post-Author-Id shortocde

How difficult would it be to create a shortcode based on the following code: <?php if($post->post_author == '8'): ?> Yes This Post Is By Author Id 8 <?php endif; ?> The shortcode ...
0
votes
1answer
19 views

Calling PHP Titles inside Javascript Markup

I have a video gallery, and all the titles are generated by php. They are coming from my Wordpress media library's attachment titles. The lightbox for these videos, however, is customized in ...
0
votes
0answers
24 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 show_list_oil_filters($...
5
votes
3answers
228 views

how to include other plugins css files in a shortcode?

I've coded a plugin that creates a shortcode, among other things. That shortcode expects a post_id parameter, it extracts the content of that post and it returns the filtered content of that post (e.g....
2
votes
1answer
45 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 ...
0
votes
1answer
24 views

Modifying the wordpress login page and then referencing it with a shortcode problem

Both parts are working great separately. I have made the shortcode for the login form with: //register new shortcode add_action( 'init', 'my_add_shortcodes' ); function my_add_shortcodes() { ...
0
votes
0answers
44 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 ...
-2
votes
1answer
59 views

Shortcode - Display inline icon before text [closed]

i created buttons with shortcodes, and i need to add icon before the first text like this http://s32.postimg.org/codndv6s5/Bez_n_zvu.jpg here is the shortcode [button iconurl="http://www.yakna.cz/...
2
votes
1answer
149 views

WordPress Shortcode and Dynamic CSS

I have a question I would like to ask to the WordPress developers, Usually when creating a shortcode that need to generate custom css how do you proceed? For example a simple button shortcode with ...
0
votes
1answer
22 views

Change shortcode value by jquery in WP Editor

I have this code on the WP Editor <p>[vc_row][vc_column][le_page_grid le_page_grid_layout="1"][/vc_column][/vc_row]</p> and i have two radio buttons on the meta box <label><...
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
1answer
39 views

Shortcodes in RSS excerpts

I am developing a plugin that uses shortcodes. I wanted to enable users to use shortcodes in excerpts, so I added the line add_filter('the_excerpt', 'do_shortcode'); which worked fine.However, in ...
0
votes
0answers
49 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
1answer
34 views

function of parent not working in childtheme

I have a plugin used on a parent theme which uses shortcode. The plugin (shortcode) works on the parent theme but when I switch to child theme it no longer works. I've only added the child theme code ...
1
vote
3answers
63 views

How do I apply style to each category of a list?

I need to create a simple plugin to show a list of categories inside the body of the post and, as I am new to coding, I searched for the basics and started to make little changes; it looks like this, ...
3
votes
2answers
141 views

Search & Remove Specific Shortcode From All Posts

Question Is there a way to remove a specific shortcode, say [print_me] from all the posts where it appears in one shot. And I don't mean mask it or filter it so it doesn't show up while it stays in ...
0
votes
1answer
47 views

Add custom shortcodes to the Welcome Mail

I need to add a custom shortcode to the welcome email of my website. I'm not expert; what I need is in plugabble.php file? I tried a lot of plugins for edit email template but nothing seems work. ...
0
votes
1answer
34 views

How to enable shortcodes in text retrieved from get_theme_mod

Is there a way to enable shortcodes in text saved in the customizer and retrieved using get_theme_mod? I'm guessing there's a filter in a similar manner to enabling shortcodes in widgets.
0
votes
2answers
87 views

Why 'do_shortcode' doesn't work in a REST request?

Why do_shortcode doesn't work in a REST call ? In the example below, do_shortcode exists, but the shortcode isn't interpreted. Route declaration /* Adding a route with callback is ...
0
votes
0answers
46 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
2answers
33 views

Push Shortcode parameter to template

I'm trying to push a shortcode parameter value to a template file but for some reason I can't get the array value that I'm targeting into a single variable. Here is my code and the shortcode I'm using:...
0
votes
2answers
37 views

Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?

This is my first go at making my own shortcode. What I am trying to do I have 11 different outputs for star ratings I want to be able to use in posts. I want to wrap it all into one shortcode, and ...
0
votes
2answers
29 views

How to handle multiple nested shortcodes with different tags?

Hi I'm fairly new to Shortcode programming and was wondering if it is possible to process the following nested shortcode with different shortcode tags: [review] [title]Sample Review[/title] [...
0
votes
1answer
17 views

How to reuse php templates as shortcodes?

I want to have a structure like: wp-content |themes |myTheme |page.php |contact.php |break.php In a page from WordPress admin, I want to ...
0
votes
1answer
22 views

Is it possible to get a shortcode generated by a plugin, then, using a function, create a new post using that shortcode?

I am planning to purchase a plugin that allows users to create polls and then embed them via shortcode into posts. It looks like a great plugin all around; however, the functionality I would like is ...
0
votes
1answer
54 views

Load next post by ID on a single page

I hope this topic is not duplicated. I see some similar topics but non of them can solve my problem, so I decided to put a new one. Here's the case. I have a single.php post with the defualt ...
0
votes
2answers
36 views

Shortcode templates

I don't know if this is the correct way to approach this, but here it goes. I'm working on Visual Composer (but could be vanilla WP), and I'm trying to implement a shortcode which generates another ...
0
votes
1answer
16 views

How do I require a file in a shortcode?

I have a shortcode that is working and displaying the problem is that it jumps to the top of the page. If I have any text or other shortcodes above it in the page editor they will be displayed below ...
0
votes
1answer
41 views

latest posts shortcode with image

I am trying to make a shortcode that will take my latest 5 posts and render them on page. I get all the posts rendered correctly except for the image source, I receive it blank. Is it something I'm ...
1
vote
2answers
18 views

Create a widget to use shortcode?

I have a plugin (Social Warfare) that I love. But, there's no widget available. What is involved in creating a widget so that I can use the shortcode that seems to work fine on the pages and posts?
0
votes
1answer
43 views

How can I create another instance of my custom shortcode

I've created a custom shortcode which takes category slug and number of posts as parameters and creates a loop with WP_Query and outputs the posts from db. But I'm unable to use it more than one time ...
0
votes
1answer
40 views

Woocommerce products shortcode specific order

Is there a way to get products in the order of the IDs in the shortcode parameter: e.g [products ids="53,68,1"] Display block with 3 product, where 53 on first place, 68 on second...? Now I get ...
0
votes
1answer
58 views

PHP/WordPress — How do I check if Shortcode returns content?

What I'm basically trying to do is check if a shortcode is returning any content, I'm using a plugin called Ninja forms and they have default content posting using their own shortcodes which look like ...
0
votes
1answer
55 views

WordPress shortcode display as plain text

I have a custom templates and I used custom shortcodes to displayed it in the page. But the shortcode is not working, its displayed as plain text only. I already deactivate and reactive the plugin but ...