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

Shortcodes on instagram

I want to embed my instagram picture using a shortcode, I don't want to copy the link and paste it as other forums suggest because our editors will be the ones adding embeded links. I also do not ...
0
votes
0answers
12 views

Content Section Custom Anchor Not Working

I purchase WP theme (Techwise) and I found an issue with content menu sidebar in post page. that content not working as same (toc) Table of Content. it's not working with Arabic letters but working ...
0
votes
0answers
12 views

How can I to add css or js to wp_head from shortcodes or widgets?

How can I to add css or js to wp_head generated from shortcodes or widgets?
1
vote
2answers
47 views

Extending Shortcode attributes

I've searched many places and tried many ways for this but no success. I have a shortcode in my WP Theme like; [recent_posts layout="thumbnails-on-side" columns="4" number_posts="4" offset="" ...
0
votes
0answers
22 views

Plugin Error on activating

I'm building theme. but for custom post type, custom taxonomies and shortodes . I created the simple plugin. just plugin info and then functions to create CPT CT and shortcode. here is the example: ...
0
votes
0answers
15 views

Get the excerpt length to return attribute

I am writing a shortcode where I would like to set a number to an attribute and then return it in the excerpt. So the shortcode [excerpt_test=10 another_option=something] gets me the excerpt length of ...
0
votes
1answer
15 views

Nesting shortcodes results in the inner shortcode being placed AFTER outer shortcode

I'm trying to use nested shortcodes, but i'm having problems with it. Everytime i try to nest two shortcodes created by me... First declared in functions.php (the inner): function ...
0
votes
1answer
12 views

shortcode which is introduced into entry the blog, and appears in side bar

I have the following shortcode plugin, it works perfectly, nothing more I want to put you in the blog and appear in the sidebar, how I can accomplish this? I want not put a widget in the sidebar, ...
0
votes
1answer
33 views

How to insert HTML/CSS/JS into my iframe plugin?

I currently have an iframe plugin that displays on a WordPress page by shortcode. Currently I have been displaying websites in my iframes "src" but I recently came across an issue to display my very ...
0
votes
1answer
32 views

Create a shortcode to use in visual editor

I'm using Visual composer and i can't use php code inside boxes but i can use shortcodes. I know i must use function inside my functions.php file I need only a example/help for one and i will ...
0
votes
0answers
15 views

optional way of displaying plugin output on pages other than shortcode? [closed]

Currently if I want to display my plugin output I would have to use a shortcode on a page. Instead I want to to have an option in my settings page that has a drop down of all the pages on my wp site ...
1
vote
1answer
33 views

Can't understand $atts in functions?

I'm not sure if I don't fully understand the basics of functions in php or maybe it is WP convention that I am not sure of. My question is why use an argument in a function when it is not going to be ...
0
votes
1answer
25 views

Using $this from child class inside shortcode function

I am building many custom shortcodes and to off load a lot of reusable code I created an abstract base class for all my shortcodes classes to extend. However when I try to use a reference to $this ...
0
votes
0answers
68 views

Limit the number of successful logins

I would like to retrieve the number of successful logins of a user and act accordingly. If user logged in more than 10 times, then log out user automatically with wp_logout() or similar. I would ...
0
votes
2answers
50 views

Ajax not returning anything on form submit

I am working in wordpress and on pressing the submit button I want the function to return result through ajax and result should be shown as an alert on the screen. But when I press submit nothing ...
0
votes
2answers
29 views

Custom Shortcode

So I have the following code: <span class="delete"><a onclick="return confirm('Are you sure?');" href="<?php echo wp_nonce_url( add_query_arg( array( 'action' => 'my-delete-product', ...
0
votes
1answer
26 views

Woocommerce Filter Main Loop by Tag [closed]

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
21 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
67 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
18 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 ...
0
votes
1answer
24 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
23 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
15 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
26 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
32 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
8 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
41 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
15 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
13 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
1answer
28 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
38 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
57 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
11 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
38 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
30 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
25 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
41 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
37 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
47 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
35 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
14 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
23 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
72 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 */ ...