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

Woocommerce Filter Main Loop by Tag

Two questions: How can I modify the query results of the archive and search pages exclude the product-tag "audio"? How can I make the Recent Products shortcode of Woocommerce exclude the product-tag ...
0
votes
1answer
19 views

How to trace shortcode to its functionality

I am trying to modify a plugin and I need to trace its shortcode to the functionality page(s). Is there a way to parse a shortcode?
1
vote
1answer
41 views

Execute Closing Shortcode After the_content

I need to execute a short code on thousands of posts which don't already contain the short code as i've added some manually. I'm using another function to add the opening short code after the 2nd ...
0
votes
1answer
13 views

Saving post content to database with do_shortcode?

I'm working on a project where I use WordPress admin hooked up with Laravel. I use WP to edit and create posts and Laravel to query the database. I also use shortcodes. Is it possible to call the ...
-2
votes
0answers
17 views

WooCommerce - How can I hook into product variation select to show dynamic content for each variation? [on hold]

my site runs Wordpress + WooCommerce and I have put together a simple plugin which I am using in my sidebar to run the standard [product_category category=""] shortcode, with get_post_meta to retrieve ...
0
votes
1answer
22 views

How to convert query sql to shortcode in wordpress?

I want to make a shortcode like this [myshorcode:2:drinks], and query-wrangler I have managed to get the following query that shows me 2 products of a certain taxonomy PHP WP_Query: $query = array ( ...
0
votes
1answer
18 views

Shortcodes: override a shortcode / change shortcode on the fly

I've done a plugin where you can add shortcode like this: [myplugin xx] (where xx is a number which calls a specific content xx). I have to do a multilingual version of my plugin, so here's my trick: ...
0
votes
1answer
13 views

How can I add 2 buttons with shortcode

I want 2 buttons in my blog post. One is "DEMO" and another one is "DEWNLOAD" . For Demo button shortcode I use this codes. function demo_button($atts,$content = null) { extract( shortcode_atts( ...
0
votes
1answer
24 views

Add shortcode support to custom field

I'm using CMB2 and I have a wysiwyg field, and I want to display a formiddable form in it by shortcode, but the shortcode is not rendering, but does render in a normal page or post. How do I enable ...
1
vote
1answer
30 views

<!--nextpage--> as a shortcode within the loop?

Anyone implemented this successfully? I want to include the <!--nextpage--> within a single post loop as a shortcode. I tried to echo it, the tag shows up but the post doesn't get divided into ...
0
votes
0answers
5 views

Custom short code pulling all tag IDs instead of selected ID

My server host recently detected malware in a script and deleted the files, causing the audio player plugin on my website to go bye-bye. I'm trying to restore but now the custom short code I wrote is ...
1
vote
1answer
32 views

Add attribute to shortcode dynamically

I'm looking to add an attribute to a shortcode used in a post dynamically. For example, say we start with: [shortcode-name] I'd like to add the "attribute=xxx" portion to the shortcode so it is ...
0
votes
1answer
13 views

Pre-populating new Page creation with shortcodes

I would like to have my authors to be able to create new pages on my site, but I would like a couple of shortcodes to automatically be included when they create each page. The shortcodes independently ...
0
votes
0answers
11 views

Previous/Next Post Link within Child Post

I am creating a custom plugin for Sensei by WooThemes that allows me to create custom shortcodes. Currently, I am working on a feature that lets me move to previous/next courses within lessons. As far ...
0
votes
0answers
12 views

Snippet for extern page

I am extremeley new to wordpress developing. My current situation is that I have created a plugin with a shortcode which i can insert into my wordpress site. Now I am wondering if there is a way how ...
0
votes
0answers
15 views

Shortcodes for Row and column layouts of post boxes and overlay text [closed]

I'm looking for a layout that most closely resembles this - http://i.imgur.com/Ej4SaFP.png?1 note that there are two horizontal rows and then three columns. I'm thinking of using a plugin like ...
0
votes
1answer
17 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
6 views

How to fix the warning shortcode function generated by Theme Check? [duplicate]

I searched on the internet but I still don't know how to fix it. I solved most of the the errors in WordPress Theme I am developing except for one WARNING. Please refer on complete error lines below: ...
-1
votes
1answer
20 views

trouble with passing class method data to outside function

I'm attempting to call a function using this shortcode format: [priceguide file='test.csv' type='mods'] When I do this, all I get back on the page is the file name, test.csv, and nothing else. ...
0
votes
0answers
18 views

Ads below footer

A client of mine has ads on his website, which are managed by a CPT. The ads can be pulled in via a widget, hardcoded query and a shortcode. I have an issue that isn't consistent that I'm trying to ...
0
votes
1answer
33 views

How do I get shortcode, widget and template tag CSS to load in the head only as required? [duplicate]

I have a shortcode, widget and template tag that need to load CSS. I am registering in init, and enqueueing as required. The only problem is, it is adding the CSS loader at the bottom of the page, ...
0
votes
2answers
53 views

Why aren't paragraphs breaking on this page?

This page is created using a recent posts shortcode included with my theme. It is not displaying paragraph breaks that I've added in the editor and I'd like it to. How can I get the shortcode to ...
0
votes
0answers
10 views

Problem with the_content() shortcode

The content from the footer pages on my website as well as blog post content is missing on my live site, although all is OK on my development service. There seems to be an issue with the short ...
0
votes
0answers
6 views

Does a String Replacing script affect shortcode output?

I have some javascript in the header that finds and replaces any phone number string in the static html output of the page. It's working great on strings that are outputted by the_content, but for ...
-2
votes
0answers
12 views

Exact number installs of a WordPress plugin [duplicate]

Is there a way to know the exact number of installations of a wordpress plugin. I would like to know about this one I just released Woocommerce - Products By Custom Tax
0
votes
0answers
37 views

Shortcode error

I've created a plugin that includes the shortcode below, it works fine one website ( http://www.porministries.org/wordpress/?page_id=16 ) but not on another website ( http://www.rccov.com/media/ ). I ...
0
votes
1answer
26 views

How to get_post_meta in a shortcode in excerpt on archive pages

I have a shortcode, [foo], which displays the value in a custom field. However, as it appears near the top of each post, it is included in the excerpt. function foo_shortcode(){ global $post; ...
0
votes
1answer
19 views

How to type shortcode-like text in WordPress TinyMCE visual editor?

Suppose, I have a plugin which is offering a shortcode for its users: [my-shortcode]. Now I want to post an advertisement in a page of my WordPress powered blog like the following: Hey you can use ...
0
votes
1answer
37 views

Change variable value for different shortcode attributes?

Suppose I have a function that needs to be able to load a file depending upon an attribute in a shortcode: [open_file ex1] How would I go about defining which file name is set as $csv depending ...
0
votes
1answer
34 views

Shortcode doesn't display in custom post type

I created a custom post type, but when i have added a shortcode for a slider it doesn't show the slider it shows just shortcode in text. and when i change get_the_content by the_content, it shows me ...
0
votes
0answers
22 views

Passing multidimensional arrays and associative arrays to plugin shortcodes

I want to pass complex structured data to a plugin I am creating. I have been using text strings in shortcodes with delimiters that are exploded into arrays by the plugin but things get increasingly ...
0
votes
3answers
44 views

Creating Wordpress Shortcode with Variable

please forgive me I'm relatively new to PHP... I would like to create a shortcode called [city-name] and have tried placing the following code in my functions.php file: function get_city_name() { ...
1
vote
2answers
32 views

Insert a custom field into a shortcode and use it in post(s)

I would like to insert a custom field into a shortcode and use it in post(s). I want the shortcode to be used with parameters. I tried to solve this problem but it displays the "Array" word instead of ...
0
votes
1answer
9 views

Display custom widget, added as a shortcode in the correct place

I've created a custom Widget and I would like to add it to the page content as a shortcode. function show_custom_widget() { the_widget( 'WP_Custom_Plugin'); } add_shortcode('custom-widget', ...
0
votes
0answers
16 views

How to get value from listbox in TinyMCE

I want to get the value in the listbox but it always return text value (Yes/No instead of True/False). This is my code: onclick: function () { ed.windowManager.open({ title: 'A Grid based ...
0
votes
1answer
68 views

Pagination fuction in shortcode always displays on top

Pagination function in shortcode always displayed on the top. Please have a look on below code /*-------------------------------------------------------------------------*/ /* Custom Pagination */ ...
0
votes
1answer
23 views

Shortcode for External HTML

I'm looking for a short-code that I can put in a page, that will open up a static external HTML file. The point is so I can update the file, and change the contents of the page with just uploading a ...
0
votes
0answers
23 views

How to change color of headlines within shortcode?

I have done my own shortcode for the layout of the page like this: (from the functions.php file) // One Half function layout_one_half($atts, $content = null) { $atts = shortcode_atts( array( ...
0
votes
2answers
27 views

Adding a class to shortcode API

So, I have the following shortcode which is included in two different pages. <?php echo do_shortcode('[shortcode]'); ?> Since two pages are using one identical shortocode, I am thinking of ...
0
votes
1answer
16 views

Wordpress upgrade adding additional quote marks to shortcode output

Since upgrade to 4.1.1, Some shortcodes are now playing up. IE The HTML output. Below is in the functions file for producing TABS. ...
0
votes
1answer
11 views

How to implement theme shortcodes in text outside of pages?

I am working on a project where the admin can enter text that will be presented in a custom template. Once the text is written it is saved to the dB then pulled out and presented when needed. The ...
0
votes
0answers
17 views

Shortcode Menu plugins default value

I use Shortcode Menu plugins, everything works fine. When I'm using a smartphone, the menu is responsive but the default value is the last value of the Menu. I would like that the default value is ...
0
votes
1answer
45 views

Shortcode to return an image based on post taxonomy

here is my first question here ! I learn a lot reading question an answers here, but I still have a lot more to learn... So, I want to create a simple shortcode, to return an image "If this ...
0
votes
0answers
42 views

Inserting a variable into a shortcode inside php

$idstring = do_shortcode( $cb_video_url ); long story short, this gets the YouTube video ID from a given url (example: 5kx45jHqQ ) and there is a youtube embed plugin for wordpress that uses the ...
-1
votes
1answer
22 views

Passing HTML in WordPress Shortcode arguments

I've searched a lot but didn't find a solid answer for my question. So I'm posting a new one here. If someone know how to do it, please answer it with an explanation. Lets say I have a shortcode ...
0
votes
2answers
63 views

Specific loop in Shortcode

I'm making shortcode and I'm stuck here. Here is code: add_shortcode('service-shortcode', 'service_shortcode'); function service_shortcode($atts) { extract( shortcode_atts( array( 'title' => ...
0
votes
0answers
17 views

Special characters get auto replaced

When I create a new post in WordPress and I publish my post, everything is OK. But when I try to edit my old post, the code in [code] has changed. For example " changes to &quot; and < ...
0
votes
0answers
21 views

Extract a WordPress shortcode attribute from function and apply in another one

I try to modify simple AJAX contact form so that it could take shortcode arguments. Specifically I need to send a message about the successful submission of the form, and as well error message based ...
0
votes
0answers
25 views

Custom Login in Shortcode got error

I am creating a shortcode that having a login form but it seems I got error when I try to login. this is my code. function postCustomWPLogin($username, $password){ $creds = array(); ...
0
votes
1answer
18 views

Trying to get property of non-object in shortocde

I'm having error in shortcode that "Trying to get property of non-object" on line no 130 Here is code: while ( $our_work->have_posts() ) { $our_work->the_post(); $termsArray = ...