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

Wordpress removing <p> tags?

I'd already come across a case where Wordpress added <p> tags. However now I'm dealing with the opposite situation. When I add [] shortcodes inside <p> tags WordPress automatically removes ...
0
votes
0answers
11 views

Access Shortcode in ajax code?

I have some data which is pulled over using ajax. Data works all fine, however, I have some shortcode been used in the same data which doesn't display as expected. It looks like shortcode function ...
0
votes
1answer
24 views

How to get URL param to shortcode?

I can't find solution for this ... URL: www.foo.com/some_page/?name=John Page content: Hi [Name]! Worpress still redirects back to www.foo.com/some_page/ I tried everything ... I need ...
0
votes
0answers
11 views

Plugin to encrypt url in base64 [on hold]

hello friends hope to help with this plugin created for decoding base64 urls ... The problem is that encrypts urls. I hope I can help change it. <?php /* Plugin Name: Links Plugin ...
2
votes
2answers
1k views

Redirect function inside a Shortcode

I am developing a free plugin for connection a external support system to WordPress to be able to authenticate users on WordPress. For this, currently from the external system, the user is sent to ...
0
votes
0answers
8 views

Getting categories from DataBase & WP Favorite Post

I am trying to create a shortcode that pull the most saved posts (using WP Favorite Post) and displaying them by YEAR, MONTH or CATEGORY. So far I have been able to get the year and month working ...
0
votes
1answer
22 views

Wordpress Short code with additional parameter

I am using twitter boostrap in my recent project . I want that the post or page content will split into columns. For doing this I am declaring several shortcode like this function ...
0
votes
0answers
22 views

Show Custom Post id in shortcode button on tinymice editor

I have created a custom post Testimonial for my custom theme and i have to display posts using shortcode , i want a shortcode button on tinymice editor so i create a js file for shortcode button Here ...
-1
votes
0answers
29 views

How can I pass a foreach variable into a do_shortcode function?

In my functions I created a shortcode, note the "$array_single": <?php add_shortcode( 'my-shortcode', 'my_custom_query_shortcode' ); function my_custom_query_shortcode( $atts ) { ob_start(); ...
0
votes
1answer
45 views

Passing postid of Testimonial Custom Post in Shortcode Parameter

I am trying to create Testimonial custom post and display using shortcode function create_post_type() { register_post_type( 'testimonials',//new post type array( ...
-1
votes
1answer
45 views

Add the results of a custom query into a do_shortcode

I'm trying to add the post list from a custom query while ( $the_query->have_posts()) : $the_query->the_post(); into the content of a do_shortcode. How can I do this?
0
votes
1answer
30 views

Preserve shortcode content formatting

How can I preserve the formatting of the content within a shortcode block when I switch back and forth between the visual and text editor in TinyMCE? As in, the stuff between [myshortcode] and ...
0
votes
1answer
306 views

Get custom post type list for every category shortcode

I am trying to make a shortcode to list all custom posts under the category they are under. Here is my code and I am no expert of coding but i thought that this would work. If someone can tell me what ...
0
votes
0answers
26 views

Content not showing when using my self-programmed shortcode in a custom sub field (ACF) [closed]

I'm using Advanced Custom Fields with a Repeater-Field to display the Content of my page. So I made three fields per Row (Left Content, Middle Content and Right Content). In my Template I get the ...
0
votes
1answer
21 views

do_shortcode close

I am using the jscrollpane plugin on WordPress along with the advanced custom fields plugin. The jscrollpane plugin uses the following shortcodes: [vr_jsp] [/vr_jsp] I have two different custom ...
-1
votes
1answer
22 views

Custom fields doesnt work well with any postTAB plugin

Here is my problem: I tried to implement custom fields (text) within a post tab. I tried many post tab plugins and the imlementation to template was succesfull... Unfortunately, the content of the ...
2
votes
2answers
2k views

Customizing gallery shortcode in 3.5

I'm trying to customize the gallery shortcode using the new gallery system in 3.5 and I'm having a bit of trouble and can't figure out where I'm going wrong. This is what I've got at the moment (in ...
0
votes
1answer
58 views

How I make a shortcode for this code?

I wrote a script to display recent posts from a specific category in wordPress. <?php $catquery = new WP_Query( 'cat=3&posts_per_page=10' ); while($catquery->have_posts()) : ...
0
votes
2answers
653 views

wp-query Shortcode in Gravity Forms Notification

I have the following code that runs two wp-query loops upon form submission to display specific posts depending on the users choices in the form (The form fields are radio buttons with values that ...
0
votes
1answer
14 views

Why can't I display attachment_image_src with Custom Size?

I'm trying to display an attachment with a custom size that I created with add_image_size called "custom-size-01" What the code returns is the word "Array" I've looked at the wordpress reference and ...
0
votes
1answer
42 views

Change Spaces to Dashes?

I'm using this shortcode function to make flag icons. When you do [flag name="United States"], it outputs United States.gif and "United States" in the alt and title tags. However, I was wondering if ...
0
votes
1answer
2k views

Auto Gallery from folder contents

I need to be able if this is possible, (i am a newbie at this so please take that into consideration) I want to create a Wordpress shortcode that will add an automated gallery of the contents in a ...
0
votes
0answers
15 views

Shortcode to get child pages of multiple parents (using parent slug)

I'm using a nice shortcode to get the child pages of a specific page, using just the parent page slug. [getChild name="page-slug"] This is done using this code: function getChild_function($atts){ ...
0
votes
2answers
258 views

How to add shortcode tags in single.php

In my theme has one shortcode tags to display tags of post and function to load content post. But in function doesn't include shortcode tag. Now I want to add it to function but i don't know how to do ...
1
vote
1answer
632 views

Convert shortcode into html form

I want to convert this shortcode. [list-style="one"] a b c d [/list-style] To ouput like this one (html form) <ul class="one"> <li>a</li> <li>b</li> ...
1
vote
2answers
231 views

How to load shortcode sooner

I am trying to add a shortcode to my menu, the menu item shows up but not the shortcode output. I think the problem is that the shortcode runs after the menu has run and therefore the shortcode ...
0
votes
2answers
62 views

Get a post's thumbnail url or display default image in shortcode

I'm trying to get my code to: Get a post's thumbnail url or (if no thumbnail there) to Echo a default url I'm not sure if I am going the easiest way or right way about this. This is the code so ...
-1
votes
1answer
28 views

Why is my ajax live search not working when i use a shortcode to call it?

I've finally managed to get my live search in Wordpress working, but it only works when i directly call it in the class. I want to put it in a shortcode, so i can call it on every page i want. But ...
13
votes
2answers
17k views

How to add a shortcode button to the TinyMCE editor?

How to make any plugin icon in wordpress post? The code I want to insert in plugin code and will appear in post bar [wp-admin/post.php]. Like this image: Output: If I click the icon it ...
0
votes
0answers
17 views

shorcode to integrate into wordpres adfly?

Just one Just one shorcode implmentar adfly to integrate into wordpres The thing is that if someone can change so that users can use their own ID? implmentar adfly to integrate into wordpress ...
0
votes
0answers
52 views

Custom Meta Boxes repeatable field show on single.php

I have some code that adds a Metabox, with repeatable fields to the edit screen of the WordPress backend. It looks like this: The code, I have in the functions.php, looks like this: function ...
0
votes
1answer
12 views

How to pass an array as attribute of shortcode to work properly shortcode parser?

echo '[test attr="'.json_encode(array('test'=>'my[][dfd]dfds[][][')).'"]'; //How to safe pass the array as attribute in shortcodes ?
0
votes
0answers
183 views

Uncaught TypeError: undefined is not a function (shortcode-box)

I have a Wordpress theme that the author is no longer maintaining, and has stopped functioning properly with the update to Wordpress 3.x. Over the past few months, I have been working to resolve the ...
0
votes
2answers
28 views

How to have Function of a plugin using global vars into a shortcode?

I am trying to convert this piece of code into a shortcode so it can be used inside my posts. Is it possible? I cant think of how to do it as I am beginner in wordpress and learning via books/youtube ...
0
votes
1answer
37 views

Custom Post Type vs Shortcode: Which one is more performant?

I am designing a Wordpress blog where I will have two types of posts: a. Normal posts; regular posts with a number of text paragraphs b. Posts with table content, where the table structure will be ...
0
votes
1answer
37 views

How can I run shortcode after click with ajax

I have a little problem and need your help. I have tabs on my page and in one tab i have google maps. This tab is hidden by default and when i clik on it, i can see only small piece of maps. Map it is ...
2
votes
1answer
240 views

Get multiple shortcode attribute values

I'm trying to get several values from a shortcode. I tried several things without success. The shortcode looks like this: [myshortcode metakey="<field_key:key1, title:Title ...
0
votes
1answer
248 views

Custom Fields - Boolean Display of True/False to Yes/No

I am importing fields from a Real Estate site. The Import of one Custom Field looks like this... Field Name after Import ---> assistedLiving Field Value ---> false to output the display in ...
0
votes
3answers
35 views

Inserting PHP inside do_shortcode

I am trying to use an existing shortcode for an accordion element in a custom template for my wordpress site. Basically, I need to insert PHP arrays inside this shortcode, like so: <php ...
0
votes
2answers
40 views

How to get the $atts of a shortcode

I have the following shortcode: [video width="400" height="400" mp4="http://xxxx.xxxx.xxx/uploads/2014/06/Facebook.mp4"][/video] I need to get every single atts a single variable, I mean, I need ...
-1
votes
0answers
13 views

Integrating a back-end plugin to the front end

I'm trying to take a plugin which is only accessible through the admin panel backend and bring it to the frontend. Specifically, I want users to be able to access the RSP Sharing plugin front the ...
0
votes
1answer
33 views

Shortcode Display From Wordpress Dashboard Page Without Using post_id

I have to code for showing recent post on my home page custom theme it works good function.php code function my_recent_posts_shortcode($atts){ $q = new WP_Query( array( 'orderby' => ...
0
votes
1answer
317 views

Wpautop stops working after get_the_excerpt

function pre_process_shortcode($content){ global $shortcode_tags, $shortcodes; // Backup current registered shortcodes and clear them all out ...
0
votes
2answers
29 views

Using Shortcode to Grab Archive Listing, Separate by Year

Here's code I've modified to display an archive list of every month I've posted news. Each month of course links to the archive for that month. I can then include the shortcode wherever I like. ...
0
votes
1answer
19 views

Adding shortcode to the main menu

Is it possible to add shortcode to a main menu? I tried the following but no luck? add_filter('wp_nav_menu_items','add_nwadcart_widget_to_menu', 10, 2); function add_nwadcart_widget_to_menu( ...
1
vote
1answer
28 views

How resource intensive is wp_register_script()?

I'm trying to use the has_shortcode() function to only load certain scripts when there is a shortcode in the post's content, with this code: wp_register_script( 'shortcode-js-file' , FILE_URI, array( ...
0
votes
1answer
360 views

WP_Editor Shortcode Issue

I have created a front-end editor using wp_editor that functions as it should. Upon testing I have noticed that it is stripping out any shortcodes that have been inserted in the content. I have ...
3
votes
1answer
39 views

Using audio shortcode for .mp3 URLs with a query string

I'm trying to use the audio shortcode with an audio file with a query string on the end of the URL and it won't work. The reason is I'd like to use expiring signed URLs with Amazon S3. If I use a ...
2
votes
2answers
36 views

Strip shortcode from specific post types (formats)

I am trying to remove the shortcode from a specific post type, in this case link. I used this code on my functions.php but it removes the shortcode from the_content for every post type. <?php ...
0
votes
1answer
24 views

How to Modify WordPress Default Image Gallery Shortcode

I would like to be able to show 5 columns and only 10 images per page for the default WordPress image gallery. Visually I would imagine it to look something like the following: columns="5" ...