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
1answer
23 views

How to add and submit input fields using a shortcode?

How can I add and submit the post without user login? By that I mean an offline user can add some content on WordPress and submit it, like simple forms in PHP. I tried this code: public function ...
1
vote
1answer
9 views

Searching in shortcode contents

Can WP search be extended to search in shortcode generated contents? If it is not a possibility please guide if replacing default WP search with Google Custom Search will solve the problem of ...
0
votes
1answer
22 views

Put php variable in shortcode

I want to put the variable in the shortcode, but it is not working. What i have done wrong. <?php $calendar = getCalendarTag();?> <?php echo do_shortcode( '[ai1ec tag_name=".$calendar."]"]' ...
0
votes
0answers
11 views

Pull in excerpt with shortcode

Working with a plugin that provides a shortcode with only a couple of parameters. https://wordpress.org/plugins/radio-station I'm using the [list-shows] shortcode. I would like to also pull in an ...
0
votes
0answers
15 views

How to show single post from custom post type with shortcode

I know the topic have been around before, and have read extensively on the subject, without finding a complete solution. My goal is to have a shortcode that calls a single post, from my custom post ...
0
votes
0answers
16 views

Duplicate short code duplicating some values only

I've created two short codes which are used as follows: [foo_tabs] [foo_tab]{Tab 1 Content}[/foo_tab] [foo_tab]{Tab 2 Content}[/foo_tab] [foo_tab]{Tab 3 Content}[/foo_tab] [/foo_tabs] ...
1
vote
1answer
24 views

WordPress Payment link will not transform PHP vars into values

My WordPress site runs with WP 4.3 + Avada 3.8.6.1 Theme. On a subscription page there are several payment buttons with links to a PsP. I have to know the ID - Name - Email from each user. The page ...
0
votes
0answers
20 views

Trouble implementing python on WordPress

I followed all the directions in this post and I still cannot get a result to display. I know PHP is doing something, because there is no text displayed whatsoever. The result has a header and no body ...
0
votes
0answers
17 views

Review plugin configuration

I bought the Reviewer Plugin addon I want to display list of reviews and review form but I don't know why it doesn't work. Here are the docs. I try to use shortcode like this: [rwp-review id=“…”] ...
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
18 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'. ...
0
votes
2answers
9 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
2answers
37 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
1answer
19 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 ); ...
0
votes
0answers
46 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
28 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
30 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
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
45 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
12 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 ...
0
votes
1answer
30 views

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

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
0answers
16 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
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
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
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
26 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
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 ...
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
23 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
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 ...
2
votes
1answer
98 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, ...
2
votes
1answer
64 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 ...
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
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 ...
0
votes
1answer
28 views

Display random text from a file with the WP built-in AJAX API

I want to use a solution by @toscho to display and rotate some quotes. The unchanged code works very well, but if I replace the protected function get_rand() { return rand( 1, 1000 ); } with ...
0
votes
2answers
61 views

Dynamically create shortcodes using add_shortcode and a callback

In the example below, $shortcodes is a multidimensional array with shortcode data. foreach( $shortcodes as $shortcode ) { // Here we have the shortcode name, could be 'custom_person_john'. ...
0
votes
2answers
23 views

Can I use a function to return HTML and the result of another function?

I have a very simple function to create a shortcode to get the name of my page. I was using this shortcode in a form, but WordPress changed the Shortcode API and that no longer works. So I was ...
0
votes
1answer
33 views

Use WP_Query in shortcode

I'm trying to get meta information from the first four posts that have a meta key equal to Sedan, then format that posts meta in order to set up gallery type display boxes. I believe it has something ...
0
votes
0answers
15 views

Wordpress: Trying to echo taxonomy slugs of individual downloads, but limit them to the $atts[category] selected from shortcode from post

Note: I'm a reasonable newcomer to .PHP, starting with this project. I understand the concept of it, but I'm not yet skilled enough to figure out what functions I need to use for something a bit ...
0
votes
1answer
36 views

Onepage with shortcodes

i build a onepage wordpress theme , and for showing all my pages in one page i use a loop , but shortcodes don't work (Ex : contact form 7 : the form is showing but don't work at all) this is my code ...
0
votes
0answers
20 views

Displaying WP Job Manager Expired Listing

Anyone experience with the WP Job Manager? I tried to create the shortcode to display it, but seem not working. this is what i did: function jobexpired() { return '<div class="job_listings" ...
0
votes
1answer
78 views

Shortcode not working inside html input

I'm using Wordpress 4.2.3 The shortcode is added with the following: function upsellxid_shortcode() { return '9eaa86d1a36a126313aa752c2ff8e16c'; } function upsellxid_shortcode_2() { return ...
0
votes
2answers
143 views

Why do_shortcode is not executing the shortcode in data-* html attributes?

This is on Vanilla installation. I've made a shortcode:- /** * Creates a shortcode for shortcode_use_here * @author Omar Tariq <XXXXXX@gmail.com> */ function callback_banana_abc( $args ){ ...
0
votes
1answer
40 views

How to protect own PHP code from Wordpress updates

I have written several own shortcode scripts which I place in the shortcodes.php file. My Wordpress installation is set to update to new Wordpress versions automatically, which is a good thing. But ...
0
votes
2answers
22 views

How to pass parameter that ends up being part of a class name with wordpress shortcode

This is the resulting html I want to produce with a shortcode - when editing page content in WordPress: <div class="shadow-wrapper half-shadow im-centered"> <div class="box-shadow ...