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

Which wordpress function is the caption shortcode linked to?

I have used this code in my page content to try and output an image + caption with a custom caption class and id... [caption id="my-caption-id" class="my-caption-class" align="alignnone" ...
0
votes
0answers
19 views

Shortcode in HTML not working

I'm having a lot of trouble with something that seems simple. I'm trying to get a form to appear inside a lightbox (using the Easy Fancybox plugin – feel free to recommend an alternative since it ...
0
votes
0answers
7 views

Enqueue script in Widget

I am trying to use wp_enqueue_script inside function widget of the Widget class. But it seems like when I print html it doesn't handle the javascript functions which I enqueue before. This enqueue ...
0
votes
1answer
21 views

Can't display shortcode in WP_Query loop

I want to display all posts from my CPT brand. My WP_Query loop works well but the shortcode I want to use within it doesn't work. This shortcode comes with some plugin called Download Attachments, ...
0
votes
1answer
27 views

Force [wordpress_social_login] shortcode to display where it is embedded [on hold]

The WordPress Social Login plugin contains a [wordpress_social_login] shortcode that can be used in posts and pages. The problem is, no matter where I place it in the body of the post, it always ...
1
vote
1answer
27 views

How to create a custom shortcode based on the layout?

Hi I am developing a custom post type plugins. Which has shortcode support. Already i have created a shortcode which is going to use for default layout design. Again i have to create a onemore ...
0
votes
1answer
19 views

Form processing: How to process form before output and access data from shortcode

I have a form that's output with a shortcode. I need to be able to conditionally process a redirect on the form submission, so the form processing needs to happen before any output is sent (I've put ...
0
votes
1answer
23 views

Create special button on WP Tiny MCE Posts Editor for Shortcodes

I am trying to create a special button on the Tiny MCE editor on the Post Editor of Wordpress. I want to create a button for my created shortcode tooltips. Check out my desired output: ...
0
votes
1answer
19 views

Custom user registration shortcode - redirect header issue

I've created a custom shortcode that calls a function which will produce a registration page. Registration works. No issue here. The issue I am having is to log the user in after a successful ...
0
votes
1answer
12 views

Executing Javascript in Plugin

I am trying to display a google map using short code for a plugin I am building, but I can not get it to work. Does anyone have some advice on this? Here is my code: add_shortcode( 'show_map', ...
0
votes
1answer
17 views

Form Plugin for Api Requests which is used via Shortcode

I've a little PHP Script with a input Form which is used to register for a newsletter. This Form accepts only an email address and then makes an api call using curl. Now I wan't to build this form as ...
0
votes
0answers
22 views

Display Thumbnail, category title and category description

I am trying to create a shortcode that would display woocommerce category title, thumbnail and description so far I can only display the thumbnail $prod_categories = get_terms( 'product_cat', ...
1
vote
1answer
20 views

How to Reference/Echo Variable from Another PHP Function

I have successfully set up a PHP function for my blog posts to create a shortcode to automatically display/style an iFrame tag for a YouTube video, as well as pull in the duration and view count ...
0
votes
0answers
27 views

Shortcodes Not Working on Custom Theme

I am editing my mate's site which is a custom theme that his agency must have created: http://www.meddingshughes.com/ I'm using real3d flipbook to (try) display some important portfolio content. ...
0
votes
2answers
22 views

Shortcode for Admin Theme Option?

I am trying to create a shortcode for 2 of my theme option. Basically I want to grabe my theme options to my shortcode so that I can display them anywhere on my posts something like this: [ads_1] ...
0
votes
0answers
26 views

How to structure WordPress plugin to display data from API

I am creating a plugin that connects to a remote API that has car listings and displays the data that's returned in that call. The plugin essentially does not need to interact with the WordPress ...
0
votes
1answer
12 views

Trying to echo out custom field inside shortcode?

I have this shortcode code currently - <?php if (!function_exists('latest_tweet')) { function latest_tweet($atts, $content = null) { $args = array( "latest_tweet_icon_color" ...
0
votes
1answer
34 views

Remove echo from shortcode

I've just started playing with shortcodes and due to my lack of php knowledge I am unable to figure out how to make this shortcode work without using php echo. Can anyone help me revise my code? // ...
0
votes
1answer
24 views

Created a shortcode, using it twice (but differently) on a page but its just outputting the same one twice

I have created a little shortcode that allows a user to output a custom post type contents into another page: [module name="foo"] On a given page I have: [module name="foo"] [module name="bar"] ...
0
votes
0answers
35 views

How to get transient cache to work with wp_enqueue_script

So I have this page that has various shortcodes on it. Each shortcode may have wp_enqueue_script to load say jQuery accordion or tabs. Now I am wanted to cache the page for better performance so I ...
-1
votes
0answers
25 views

WordPress Column Shortcode issue

i have a column shortcode. when i applied it, automatically adding br tag and removing p tag from the first para. I attached the print screen. please look at it. Shortcode reference url Thanks
0
votes
0answers
4 views

Run shortcodes in custom setting value that holds user supplied HTML in my header?

My plugin I built for a client shows a special header type banner/head section for a visitor on every nTH visit to the site. I have a setting where the user picks the number for nTH visit to show ...
0
votes
1answer
36 views

Shortcode in Text Widget not working

Not sure why this is not working. I get no errors, but just shows nothing at all in the text widget. The shortcode works on pages and posts. WordPress version 3.9.1 add_filter('widget_text', ...
0
votes
1answer
14 views

How to Retrieve data of Gallery Shortcode and display it above a post

I'm trying to style my theme without resorting to custom fields. For gallery posts type, most premium themes are using custom field which is the method I used till now. With it, I could then retrieve ...
-1
votes
0answers
28 views

A ShortCode Within a ShortCode. INCEPTION [duplicate]

Problem I have a plugin called WP-Filebase https://wordpress.org/plugins/wp-filebase/ & http://wpfilebase.com/, which allows a user to upload media and it has a shortcode to allow the user to ...
0
votes
1answer
19 views

Which method to use when deleting posts from the front-end

I am trying to enlist all my posts on the front-end along with delete and edit links (using the shortcode API). I am having difficulty with the delete links. To me the most obvious way to handle ...
0
votes
0answers
28 views

Some shortcodes breaking after AJAX call

I have a content slider that displays my Academic posts on my website. Some of my posts have shortcode in order to display an accordion menu and some columns. I am using AJAX to fetch the posts and ...
0
votes
0answers
14 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
29 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
22 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
27 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 ...
-1
votes
0answers
35 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
0answers
49 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
1answer
49 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
46 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
26 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
28 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 ...
0
votes
1answer
77 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
61 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
1answer
24 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
0answers
20 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
1answer
43 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 ...
-1
votes
1answer
54 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 ...
0
votes
0answers
30 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
2answers
111 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 ...
0
votes
1answer
16 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
2answers
33 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
38 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
50 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 ...
0
votes
0answers
86 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 ...