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
2answers
98 views

Do shortcode that is inserted in a textarea is not displaying properly

In the dashboard, I'm using a textarea to get user input. I'd like them to be able to use shortcodes anywhere in that textarea. Here's my current function: function slp_getwelcome() { ...
0
votes
1answer
73 views

How to handle a shortcode function directly?

I was wondering how i can handle a shortcode function directly? At the moment i have created a shortcode which works OK. The shortcode function outputs a image. Now in functions.php i have another ...
0
votes
0answers
14 views

Random Image Shortcode [duplicate]

I have a great little shortcode for displaying random images. Works wonderflly--however, the output defaults to the upper corner of the main container element--as though it is being written after the ...
0
votes
2answers
95 views

using shortcodes in theme content

I am using plugin like to read http://wordpress.org/extend/plugins/like-to-keep-reading/ problem is its using opening and closing shortcodes,when I embed them to my site http://vijaykudal.info only ...
1
vote
1answer
152 views

Gallery shortcode numerical sorting

When I try to sort a Gallery created through the [gallery] shortcode by numerical titles I get them sorted in alphabetical order. That means that they are sorted like so: 1, 3, 34, 4, 56, 6, etc. ...
-3
votes
1answer
267 views

do_shortcode does not work with slideshow shortcode

I am using the Slideshow plugin 2.2.7 by Stefan Boonstra and am adding the shortcode to a custom wp_editor() metabox. When I echo the slideshow plugin with: echo do_shortcode( $banner ); /* $banner ...
0
votes
2answers
407 views

How can i put an array as variable in shortcode_atts?

I am trying to create a shortcode with an array as input like so function product_gallery_shortcode($atts) { extract(shortcode_atts(array( 'product_id' => '31', 'prodvid' ...
4
votes
1answer
3k views

How to paginate wordpress [gallery] shortcode?

I am using wordpress gallery shortcode [gallery] I was wondering if there is anyway to paginate them without using a plugin.
2
votes
2answers
163 views

What is wrong with this code I have to make a blockquote shortcode

I have a shortcode for a blockquote [blockquote]this is the quote[/blockquote] ... this is the code. function shortcode_shortcodetest( $atts, $content = null ) { $return = '<div ...
1
vote
1answer
409 views

Allow shortcode in the author bio textarea

Is it possible to make shortcodes available in the Author bio textarea?
0
votes
1answer
127 views

Remove some tags from shortcodes output? Trying to fix autop

remove_filter( 'the_content', 'wpautop' ); add_filter( 'the_content', 'wpautop' , 99 ); add_filter( 'the_content', 'shortcode_unautop', 100 ); Work for almost all my shortcodes excluding one that ...
0
votes
2answers
99 views

How to use author meta in shortcode?

I am trying to create a shortcode that will return a link to a book on Amazon with a specific affiliate tracking code specific to the author. I created a user option called "amz" to hold the author's ...
0
votes
2answers
191 views

Using multiple line variable inside a function?

I am using the commenting system to all users to add a private note that only they can see to posts and I am using the wordpress comments system to do it. I wrote a function to call the logged in user ...
3
votes
2answers
1k views

Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer

When you hover over my drop-down menu using IE8 or IE9, the menu div will display behind the YouTube embedment. It works fine on all other browsers. Upon research, I found out that many others have ...
1
vote
1answer
549 views

How to use shortcode attribute in separate function

I'm working on a WordPress site and have installed a slider plugin that registers a slider on the backend (or multiple sliders) and then displays it on the front end with a couple of simple php ...
0
votes
1answer
528 views

Unable to add TAB character to post?

I am using the CodeColorer plugin to display source code in my WordPress. I am trying to have my code indented so that it displays properly on the website. However, when I try to add the following ...
1
vote
2answers
348 views

how to check if a shortcode is used more than one time in the same post

I've written a shortcode plugin. Basically the plugin has the following structure: PL::setup(); class PL { public static function setup() { add_shortcode("myshortcode", array ( ...
0
votes
2answers
553 views

do_shortcode doesn't work on some pages

Im using Artiss Currency Converter to convert some numbers on my website. Im trying to out put do_shortcode('[convert number=1 from="aud" to="jpy"]') in 2 pages. One is a template page in ...
1
vote
1answer
598 views

wp_specialchars and wp_specialchars_decode in a shortcode plugin

I have written my first plugin, a shortcode plugin. I have read about wp_specialchars and wp_specialchars_decode but I'm not sure how to use them. The plugin read a shortcode allowing some parameters ...
1
vote
2answers
992 views

Wordpress Gallery shortcode: Display one category ID only

Good Day. I am using a Gallery shortcode in my wordpress site to display images. Problem is that I wasnt the gallery to show only images from a certain category, for example category id 35. How do I ...
0
votes
1answer
252 views

do_shortcode & render custom field won't work

I am wondering why this code just won't work.. I am frustrated about it. It creates the tabs, but doesn't render the custom fields (types). <?php echo do_shortcode('[xt_tabs_button]'.' ...
0
votes
1answer
184 views

shortcodes inside shortcode to sum values

I have statistical shortcodes that return values [stat1 val="usa"] [stat2 val="europe"] [stat3 val="china"] [stat4 val="africa"] I struggle to create the shortcode that can sum the shortcode values ...
0
votes
1answer
459 views

using 1 form shortcode (si or cf7) for all multisite sites [closed]

I have a network with more than 50 sites. I want to create one contact form (which means one shortcode) using contact form 7 or fast secure contact form. Then, I want to use that shortcode on all the ...
1
vote
1answer
101 views

Get all posts containing a shortcode

I'm writing a WP plugin that involves using shortcode. One of the missions is to display all (publish) posts that contain my shortcode regardless of their post type. Is there a built-in function for ...
2
votes
2answers
1k views

Adding short codes from a page's content on header and hiding the same from page's content

I have created a page and added the following shortcode from wp-orbit-slider [orbit-slider category="test"] I want the contents of [orbit-slider category="test"] be displayed on the header ...
0
votes
1answer
189 views

Shortcodes and a list of IDs?

I'm creating a simple shortcode function and need to specify a list of IDs as a variable. I've checked the Codex but I'm not sure how this is handled. The shortcode is: [video_vote ...
0
votes
1answer
81 views

How to: Simple Nested Shortcode [closed]

Im trying to wrap a shortcode inside of a "user loggeed in" shortcode. Here are the two shortcodes and my setup in WYSIWYG function wpfc_logged_in( $atts, $content = null ) { if ...
1
vote
1answer
151 views

Processing shortcodes in groups (separated by line breaks)?

The Project I'm working on a plugin to resize and embed rows of images using shortcodes that will be converted into <img> tags. In most cases there will be multiple images per row, and the ...
1
vote
2answers
2k views

shortcode to create dynamic dropdown box form shortcode attributes

I am trying to make a shortcode that will create a dynamic dropdown list of downloadable file links, that once selected, html will show a download link below the dropdown. Here is the end result of ...
4
votes
1answer
217 views

Show content only if member left a comment

Functions Php : add_shortcode( 'membervip', 'memberviparea' ); function memberviparea( $atts, $content = null ) { if( is_user_logged_in() ) return '<p>' . $content . '</p>'; ...
0
votes
1answer
85 views

Insert First Image into post (full-width)

I am looking for a simple PHP function to insert the first image from the gallery into the post, full width (I am using custom post types btw). So the syntax will be: <img src="xxxxx" /> any ...
0
votes
1answer
95 views

is_mobile as shortcode

I installed the Plugin "mobble" which provides some more conditional tags. As I want to hide some content for mobile devices I tried to build a shortcode [is_mobile]. But I tried many different ways ...
0
votes
1answer
2k views

How to display NextGEN gallery in templates?

I have installed the NextGEN Gallery plugin and have all my images in albums. Can someone please support me in displaying the NextGEN gallery with the use of the Galleryview plugin? Is there any ...
1
vote
3answers
1k views

Execute shortcode within shortcode

I am using this plugin: http://wordpress.org/extend/plugins/worldcurrency/ Shortcode syntax: [worldcurrency cur="EUR" value="25"] However, I'm using Advanced custom fields and the shortcode for ...
1
vote
3answers
4k views

Multiple Parameters for a Shortcode

I am working on building some shortcodes for my blog. I can set a single parameter for my shortcode, but not sure how to set different parameter. For example, I can use [myshortcode myvalue] to ...
4
votes
2answers
8k views

All shortcodes not working on custom theme

I'm using a custom theme not developed by myself that seems to have disabled/ or doesn't have the function for any and all Shortodes, whether its a WordPress shortcode or a plugin shortcode. I mostly ...
-2
votes
2answers
1k views

Shortcodes: closing shortcode not being processed

I have been using shortcodes in my templates successfully, apart from when a closing tag is required to wrap some other code or content. The problem is that the closing tag, eg [/shortcode], ...
1
vote
1answer
290 views

Raw output (preventing wpautop)

Using WordPress 3.5. I'm trying to put a <form> into a Page of a WP-based site. Unfortunately, WP is "helpfully" screwing up the formatting of the form by inserting <br> and <p> ...
1
vote
1answer
597 views

How to enqueue script based on post category?

I have scripts for various little tools I have made using some js and html. I want the js to load only on specific single posts in side a specific category. I have tried the following code and it does ...
-1
votes
1answer
396 views

Display HTML5 jQuery Audio Player On Front Page

I would like to display the plugin HTML5 jQuery Audio Player 'centered' on the front page of my site. The plugin comes with shortcodes for posts and pages but my front(home page) only works with the ...
0
votes
1answer
142 views

Parse a shortcode differently based on on what it's nested in

Suppose we have two different sets of nested shortcodes, like this: Apple version [wrapper snack="apple"] Today I had a [flavor] snack... [/wrapper] Desired output: My snack was quite HEALTHY ...
0
votes
2answers
499 views

Custom registration form in shortcode getting internal server error 500

I created a custom registration form which works fine when used as a custom page template. I needed it as a shortcode so I created a shortcode using the function below /* Custom shortcode */ function ...
0
votes
3answers
107 views

Need to return shortcode text instead of the output

Is there a way I can return the shortcode text instead of the output. My code function is hooked into 'the_content' and I know if my function contain shortcode it will automatically generate the ...
1
vote
1answer
166 views

Shortcode Function not working

I got this code to show my thumbnails images and videos on my blog page, but when i try to use to show the thumbs in another page, it doesnt works. Function to display images and videos thumbs ...
0
votes
1answer
130 views

Shortcode displaying at the top of the page [duplicate]

Possible Duplicate: The result of a shortcode appear BEFORE page content short code output too early I got this shortcode for display my blog posts on my page, but the EXCERPT and the ...
3
votes
1answer
323 views

Possible to create placeholder images in Wordpress editor that are clickable (should bring up uploader)?

Working on a project where I would like to have buttons within the actual visual editor area where the user can click on the placeholder image and it brings up the upload dialog. I've seen that ...
0
votes
2answers
955 views

Insert wp gallery shortcode into custom textarea

Is there a way to insert wp gallery shortcode into custom metabox textarea ? I would like to have something like this: New metabox in post/page with textarea and below textarea there are a button to ...
4
votes
1answer
672 views

How to display the names of users from a specific group with a shortcode?

I have in the database a table with the user_id and corresponding group_id values, so each row contain the ID of the user that is a member of a group and the related group ID. The question is: How to ...
0
votes
2answers
60 views

Shortcode of a function

I got this function and i want to make the contents divs of "foreach" as return. How can i do that? <?php $args = array( 'numberposts' => 6, ...
0
votes
2answers
437 views

How to process shortcodes in XML-RPC

Firstly, I know that XML-RPC is designed to send out the raw post data, but I need it to expand shortcodes out. I don't use it for posting so it won't be an issue there, but there are services that ...