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

Pass Variable from Function to Shortcode

I realize that this may be as much of a PHP issue as a WP issue, but I'm posting it here because it does pertain to shortcodes and have some WP-specific functions mentioned. Basically, What I'm ...
-3
votes
1answer
29 views

How to execute the “Visual Composer” code on a custom html page?

Visual Composer is an essential plugin for creating a website with Wordpress. I created an html page with Sublime Text without using the tools offered in Wordpress and without using Visual Composer. ...
0
votes
1answer
35 views

Shortcode to eliminate <p> and replace </p> with <br>

I have a filter that removes opening p tags and replaces closing p tags with a br tag sitewide. The client would like this filter in a shortcode that they can use only on specific portions of the site....
-4
votes
0answers
37 views

shortcode from plugin only floats on top of the page, no matter where I place it [on hold]

I'm using the theme Divi, and a plugin called WP Membership. I'm attempting to add the shortcode for the enrollment and login boxes to the body of the page, http://brookeseggleston.com/learn, but ...
0
votes
2answers
38 views

Running Filter or Shortcode Before Query Prevents Excerpt from Showing

I've been wrestling with some code cobbled together for a function I found, first published circa 2009 and my inexperience with PHP has me at a loss. The function is designed to count episodes in a ...
0
votes
1answer
24 views

Shortcode call not working in WP Template

I'm working with a Visual Composer shortcode to call a text resizer into being. When using the Visual Composer or the classic WYSIWYG, if I insert it's shortcode [enlarge_text small='A' ...
0
votes
0answers
14 views

Generated short-codes don't seem to work

I'm using "Photo Gallery" plug-in and W3-data. Then there is a page where I want to display one gallery (of photos) per user. So using w3-data I generate the short-codes that I would like to have ...
-1
votes
0answers
20 views

Visual Composer plugin Speed problem [closed]

I am using Visual composer plugin in my website. Server Response time with Visual composer 0.60Sec Visual composer using ~100 shortcodes. Many shortcodes are inside other shortcodes. Also Visual ...
0
votes
1answer
19 views

Object of class WP_Query could not be converted to int inside shortcode

I have the following code which is used to display download posts by the custom taxonomy. I am receiving the error Object of class WP_Query could not be converted to int When I have Query ...
-2
votes
1answer
24 views

Can I prevent wordpress adding <p> and <br> tags to autoembeds

Cant give a reduced code example right not because my Advanced Responsive Video Embedder plugin is somewhat complicated. But the exact same code is used to generate the embeds, its just through ...
2
votes
0answers
23 views

Remove and restore one shortcode

I would temporarily remove a shortcode, make something and restore it... it's possible? // override default wordpress "the_content" hook remove_filter('the_content', 'do_shortcode', 11); add_filter('...
1
vote
1answer
67 views

stop Wordpress removing shortcode from content

I've found that Wordpress is removing &nbsp; from my content, so from this page, I added the following to my functions.php: function nbsp_shortcode( $atts, $content = null ) { $content = '&...
0
votes
1answer
40 views

Automatically add class-attribute to gallery?

I'm making a theme for a client in WordPress and he wants each gallery to have a grouped lightbox, so there's a lightbox for each gallery. I found out you can make it add an attribute to the gallery ...
0
votes
2answers
32 views

What is the correct syntax to append a URL using a shortcode for an iframe?

I need to iframe a series of content on our site. I need to pass on the the user information via a URL - vendor request. I have tons of shortcodes that display the username. It works fine. But ...
0
votes
2answers
34 views

Custom Field 101

I'm trying to learn how to use the Custom Field function. I have a series of posts with titles like "Adams County," "Lane County," etc. All are in the category "Washington" and are tagged with "county....
0
votes
2answers
68 views

Shortcode is not outputting all of the desired markup

I'm having trouble getting my shortcode to output all of the markup - for some reason it's only outputting part of it. I have the following function: function shortcode_container($atts, $content = ...
3
votes
1answer
48 views

Stop strip_shortcodes() stripping content inside shortcodes

I have this shortcode: add_shortcode('refer', function($atts, $text) { $defaults = ['link' => '', 'nofollow' => true]; $atts = shortcode_atts($defaults, $atts, 'refer' ); $...
0
votes
3answers
53 views

custom field (video/audio url) and embed functionality

I was wondering if there is any way to combine a custom field (in custom post type) with an embed shortcode? Long story short - a user type into a field called videox and an url for a video (youtube, ...
0
votes
3answers
50 views

Wordpress shortcodes & performance

Do shortcodes affect performance? each plugin using this technique has to parse post/page content looking for the shortcode? If so, it would be better to limit as much as possible shortcode-based ...
1
vote
1answer
17 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
16 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
201 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
28 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
22 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
42 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
108 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
19 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
40 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
36 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
60 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
16 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
19 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
54 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
20 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
197 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
33 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
19 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
38 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
52 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
132 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
16 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
34 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
48 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
31 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 ...