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

Custom short code not doing as I tell it too? [closed]

So I built a short code as follows: if(! function_exists ('aisis_toc') ){ function aisis_toc($atts, $content = null){ extract( shortcode_atts( array( ...
2
votes
1answer
44 views

Using get_option() in JavaScript

Previously, I used the get_option() function to get an option in PHP, like this: $width = get_option('my_width'); This is inside a shortcode function. Now, I want to have an option in JavaScript. ...
0
votes
1answer
28 views

Which file renders the “Edit Gallery” Settings page?

I was looking for a tutorial on adding options to the "Edit Gallery" page. In the hopes of adding some GUI inputs that would result in the generated [gallery] short-code having custom attributes. I ...
1
vote
1answer
321 views

Add htmlentities and/or shortcode into data-attributes

I realize this is crazy but, I built up a filtered gallery with quicksand and it pulls in a larger image, title and description when you click the smaller image it shows the data-img in a larger form. ...
0
votes
1answer
81 views

How to change the output of gallery shortcode

I would like to add the media description as a data-attribute to each image of the gallery. All the other answers favour the solution to copy the whole code from media.php to functions.php and change ...
0
votes
1answer
53 views

Create a short code that inserts js

Note: People are assuming this question is already answered when in fact it is no where close to being the right answer. I have created tons of short codes, How ever I am using Jquery plugin TOC and ...
0
votes
1answer
79 views

Shortcodes, output buffering, and WordPress functions

I have a couple of long forms which I want to output as shortcodes. Shortcode API indicates that If the shortcode produces a lot of HTML then ob_start can be used to capture output and convert ...
0
votes
0answers
46 views

I need to create a dashboard widget with input field and will display the text as shortcodes in posts

Hi I need to make automated price updater of my learning materials (e-books, videos, posters etc.) and it's such a drag every time I need to change prices on them to open every single posts because ...
2
votes
1answer
48 views

Global, network-wide shortcodes or text replace functions

What I'm trying to achieve is a simple text-replace functions, that would be available to any site in my Wordpress Network. Basically I want to: Change [--] into — (—), Be able to ...
0
votes
1answer
112 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
0answers
15 views

Printing shortcode as it is for demo purpose [duplicate]

I would like to show demo to my client. So I wanna print the shortcode as it is. For example like this [rawshortcode][gallery][/rawshortcode] So all the shortcodes I wrap within rawshortcode ...
0
votes
0answers
32 views

Gallery inside posts

I'm looking for a solution to a certain type of gallery I want to use inside posts. These posts have tons of content, including pictures. I want to create a gallery like the one in this image I made ...
0
votes
2answers
44 views

Inserting shortcode is blanking excerpt - any ideas?

I wrapped a shortcode around my post content and I have noticed it is making the excerpt blank on archive pages instead of auto generating one from the_content/post. At a loss as to what is causing it ...
-4
votes
1answer
31 views

how to remove shortcodes from page [closed]

Please Help -- It's impossible to find the answer for this. Maybe you can help. I do not want the theme designer's shortcode dropdowns and layout dropdowns shown in their demo page to appear on my ...
0
votes
1answer
127 views

How do a put a form with php code into a variable or shortcode?

I'm trying to put my frontend form into a variable or a shortcode so I can wrap another shortcode around it (specifically Bainternet Post Creation Limits). My form has PHP code in it so I'm not ...
0
votes
0answers
56 views

Shortcode not working

I am using calendar plugin but the short codes are not working. I tried various other plugins, but none of them works. They provide me a shortcode and when I implement them in my page, nothing ...
1
vote
1answer
59 views

wp_editor returns the shortcode and not render the output

I built a plugin, and I would like to use shortcodes in the integrated wp_editor. I'm using echo to display the content of the wp_editor, so I think that's the problem why I can't use the shortcode. ...
1
vote
0answers
30 views

Complex Slider Shortcode Help

I have a PHP-Code for Slider which I found. Now I want to transform it into a Wordpress shortcode. Here's the Code: <!-- Slider --> <div class="big-slider-wrapper block-full ...
1
vote
1answer
62 views

Responsive Embeds using default embed shortcode

Can someone explain how to make embed shortcode responsive? http://codex.wordpress.org/Embeds
0
votes
1answer
52 views

Get variable value based on string constant

In my plugin I define a constant as follows: define('DEFAULT_NUM', 5); I also define a constant representing the name by which I want to refer to this number: define('DEFAULT_NUM_NAME', ...
1
vote
1answer
63 views

How can a shortcode can take the place of the featured image in a post?

When there is a specific shortcode in a post (example [sc]anything[/sc]), I want to hide the featured and take it's place. How can I do that? I add this on my theme function // TopWide Shortcode ...
0
votes
0answers
7 views

shortcode is not working in customize theme [duplicate]

I really appreciate with your's response! Actually I just new in this technology so please can you clear me in more easy way with example. Please I need your help. Thanks,
0
votes
1answer
88 views

Using shortcodes to parse POST request (containing the data from a front-end form)

I would like to allow my subscribers to post classifieds, which are nothing but a custom post type with a few metas for the price, etc. (The existing classifieds plugins I have tried are way too ...
0
votes
2answers
39 views

short code is not working in in custom wordpress theme it's only working in default theme

<?php /*template name: my template*/ ?> <?php get_header(); ?> <?php get_header(); ?> <?php echo do_shortcode('[STORE-LOCATOR]'); ?> <?php if ( have_posts() ) : while ( ...
0
votes
0answers
12 views

Get wordpress shortocodes list with their attributes list [duplicate]

Lets say I have 2 shortcodes: [title] - it handles attributes 'size' and 'color', [image] - it handles attributes 'border' and 'opacity' You can easly get your wordpress shortocdes names list via: ...
0
votes
0answers
17 views

wp shortcode cannot show on accurate place of content [duplicate]

function show_menu_list_func( $prams ) { if(is_array($prams) && !empty($prams)) { $menuname = $prams['menu_name']; wp_nav_menu( array( ...
1
vote
1answer
84 views

Why are you using add_action for shortcode?

I would like to create shortcodes, some tutorials write about to use add_action add_action( 'init', 'register_shortcodes'); but I read tutorials where the author didn't use it, only put ...
0
votes
0answers
37 views

How to create a shortcode that lists products by category

Hi I d like to create a shortcode that lists products of a certain category. I ve used the following code to register products and categories: add_action('init', 'catalog_init'); function ...
-1
votes
1answer
89 views

Some Shortcodes Not Working [closed]

I am using the Rebirth theme from Scheetz Designs. I'm trying to update my events calendar, as my current Ajax calendar does not look very pretty. I've tried to install both the Ajax Event Calendar ...
0
votes
1answer
49 views

Custom taxonomy in short code

I am using short codes in theme for grid display. Code only considers category ids. I also want to add custom taxonomies so it give output as both category posts as well as custom taxonomy posts. ...
0
votes
1answer
46 views

Filter Shortcodes when using get_page

I'm using the following line to show content from one page on another. This line outputs the content's raw text of a shortcode: <?php $id=3934; $post = get_page($id); $content = ...
0
votes
1answer
56 views

Shortcodes that are created based on user input information

I am creating a plugin that users can create forms with. Then the user will be able to input a shortcode to display this form. The shortcode will be the form name, which is stored as a meta_value in ...
0
votes
2answers
79 views

Escaping quotes from shortcode attributes

I have been trying to figure out how to escape quotes (single and double) from shortcode attributes. Basically the content is written by the user and therefore can potentially include " and ' quotes. ...
1
vote
1answer
94 views

Wrap Shortcodes and wpautop

WP has me pulling my hair out at the moment (past few days trying to solve). Trying to do some simple shortcodes which wrap around various points of an article. However wpautop() I believe is ...
1
vote
2answers
259 views

Return HTML Template Page with PHP Function

I want to create a form that I can use a shortcode to insert into my site. It would be really nice if I could create the HTML part in a seperate file and then insert it with a PHP shortcode (to ...
0
votes
1answer
79 views

Shortcode with multiple variables

I'm trying to create a shortcode to insert the Pinterest button with variables manually in posts. This is the code I've arrived at after reading various posts and grabbing the code from Pinterest. I ...
0
votes
1answer
58 views

Creating shortcodes with user created forms

I am creating a plugin. That enables users to create forms, & display these with shortcodes on a site. When creating a form (using custom post types), users will be able to add additional form ...
0
votes
2answers
50 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
28 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
42 views

shortcode with external file is showing twice [closed]

I have problem on short code activation in my custom plugin. The included file it's shows up twice. class Configurator{ public function __construct() { add_action( ...
0
votes
0answers
12 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
64 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 ...
0
votes
1answer
98 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
56 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 ...
-2
votes
2answers
61 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' ...
2
votes
2answers
42 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
71 views

Allow shortcode in the author bio textarea

Is it possible to make shortcodes available in the Author bio textarea?
0
votes
1answer
65 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
34 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
47 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 ...

1 2 3 4 5 13