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

Initialize add_action() for every copy of a specific shortcode

I have here a shortcode which generate a slider. Everything works just fine until i try to add another "partners" slider with different options. I can't specific settings for each slider because the ...
0
votes
0answers
251 views

Progress bar - JS + CSS

I'm trying to implement a progress bar to wordpress. Exactly this one : http://workshop.rs/2012/12/animated-progress-bar-in-4-lines-of-jquery/ php shortcodes function progress_bar( $atts, $content ...
1
vote
1answer
150 views

How to insert image and text from admin panel throughout my theme

I'd like to have an admin panel where I can upload an image and customize a line of text. Then use a shortcode throughout the theme to display the text/images. I'd also like this to be scalable so I ...
0
votes
0answers
49 views

get current event using My Calendar Plugin

I need to get the current event. At the moment it outputs all events for the day. Here is my shortcode so far: <?php echo do_shortcode('[my_calendar format="list" above="none" below="none" ...
0
votes
0answers
60 views

Most elegant way to create html for shortcodes?

Shortcodes seems to be very nice way to introduce complex features to the content blocks, but I don't like to generate html inside shortcode function. Instead I would like to create template file for ...
0
votes
1answer
123 views

How do I add text in a shortcode?

I think this might be an easier question but I can't figure it out. How can I add simple text inside a short code? For example: $return_string .= '<a ...
0
votes
1answer
89 views

Displaying shortcode output through Options Framework

I'm hoping someone might be able to help me. I'm using the Options Framework Plugin to customise my site, but I'm having difficulty with using a shortcode in one of the custom fields. I've created ...
1
vote
1answer
115 views

Getting the count of a shortcode that is nested

Let's say I have nested shortcode where the outmost shortcode is just HTML but the inner one is the one who displays the data. [outer_shortcode][inner_code url="#" title="Hello"][/outer_shortcode] ...
-1
votes
1answer
164 views

Insert Shortcode exactly at the end of the content

<?php echo do_shortcode("[sharethis]"); ?> <?php wp_related_posts()?> There are 2 short codes above 1) share this plugin short code 2) related posts short code now my ...
5
votes
2answers
535 views

Create custom [sourcecode] shortcode, the right way?

What I want to do Sharing code in posts on WordPress is quite a pain with all the HTML escaping to take care of. So, I plan to enclose code in posts within a custom shortcode called [sourcecode], as ...
3
votes
2answers
135 views

using html as shortcode attribute

I have created a shortcode that retrives and displays top recommended posts based on a meta_key. There are different attributes, which all work, except for once where the content of the attribute is ...
0
votes
0answers
101 views

Plugin or shortcode for ISBN number?

I have a Woocommerce site with a catalogue of books. Each book has an ISBN (or EAN) number entered in a custom field. I need to do two things with the ISBN, and I don't want to have to manually ...
0
votes
1answer
99 views

Can I use widgets & shortcode if I need to return an array?

I'm trying to achieve the following functionality. I have several widget 'areas' that I can place widgets into. I programmed these widget areas into the theme of my site and I can turn them on and ...
0
votes
1answer
90 views

Replace shortcode with output in database?

For example, say I created a shortcode called [sourcecode] using the Shortcode API function, which is used to share code in posts like so: [sourcecode] #button { font-weight: bold; border: ...
0
votes
0answers
112 views

Creating tabs shortcode

<div id="tab-side-container"> <ul> <li><a href="#side-tab1">Tab 1</a></li> <li><a href="#side-tab2">The Second Tab</a></li> ...
0
votes
1answer
153 views

do_shortcode within post query

I am querying blog posts with a specific category (according to the template page slug, and want each post to output a slider, title and content. I'm using the wordpress plugin Anythingslider for ...
0
votes
1answer
22 views

Shortcoding with Divs

I am trying to turn a custom query into a shortcode but I am having some difficulty. Firstly, I am not sure how to return a custom thumbnail size via $return_string...in fact I am not sure how to ...
0
votes
1answer
57 views

Custom WP theme not showing shortcodes

I'm building a custom theme and am trying to use the Nivo Slider wordpress plug in. I have a widget area under my nav bar and for some reason only the shortcode shows, not the slider. I have read that ...
5
votes
1answer
94 views

Autoembeds don't work with paragraphs

I'm writing the below pieces of code in "Text" mode of the posts editor. Does work: http://www.youtube.com/watch?v=xxxxxxxxxxx Does work: <p>test http://www.youtube.com/watch?v=xxxxxxxxxxx ...
2
votes
1answer
44 views

Stop parsing shortcodes

I'd like to stop parsing shortcodes in the_content but I'm struggling to find what the correct filter would be. This didn't work: remove_filter( 'the_content', 'do_shortcode', 40 ); remove_filter( ...
0
votes
1answer
156 views

Last post ordered by publish date using WP_Query on front page

I'm joining together few websites into one and I created appropriate posts and changed their post_date (publish date) to the original time of post. However (even if I list more than 1 post) the ...
0
votes
1answer
28 views

Is it possible to handle two or more shortcodes in a single page?

I have a shortcode [API-Module version="1"] and another shortcode like [API-Module version="2"] If i handle any one at a time in a single page it works perfectly. Yet my requirement needs both had to ...
0
votes
1answer
229 views

SImple Example To Update User Info From Front End [duplicate]

I want to give user ability to update their nickname from front end using wp_update_user and shortcode. The code below is working. add_shortcode('user-profile', 'get_current_user_prof'); ...
0
votes
0answers
62 views

Get ID of the page where shortcode is included

I have a page with a shortcode that uses get_the_ID(). The shortcode displays custom fields from the current page. When I include that page within another page, get_the_ID() returns the ID of the ...
1
vote
2answers
236 views

Localize variable for multiple Shortcodes

I have this code for flexslider Shortcode add_shortcode('flexslider', function($atts){ global $post; $ids = explode(',', $atts[ids]); $uniqid = uniqid(); wp_enqueue_script( 'shortcode_flexslider'); ...
1
vote
1answer
237 views

Form Shortcode not saving data to WP database

I'm developing a plugin that creates a custom table upon plugin activation. The plugin allows users to add a form shortcode to collect data for leads. I've got to the point where either the data ...
0
votes
1answer
121 views

Trying to override/intercept a PhotoMosaic gallery link in Wordpress using jQuery

The page in question is located at http://www.sandbarmedia.com/clients/va/gallery/. Basically, I'm trying to use jQuery to intercept a click on one of the photos in the mosaic so that it jumps to the ...
0
votes
0answers
36 views

Use shortcode as parameter for another shortcode

I'd like to use a shortcode as a parameter to pass to another shortcode: [google_map address="[content field='address']"] However, this outputs a blank map plus this string: "] I've looked in both ...
0
votes
0answers
52 views

Display certain category in a page

Is there any way to display certain category name in a page via shortcode? Edit: I have plugin which displays posts in pages by shortcode [display-post id=id of post]. I would like to have similar ...
0
votes
3answers
74 views

Shortcode question… javascript

We want to create a short-code. The final output of the source code should be similar to the code mentioned below. <script type="text/javascript" ...
0
votes
0answers
43 views

How can I determine if functionality is provided by a plugin or a custom shortcode on another wordpress site?

Recently, I purchased a theme from AIT-Themes.com, a company dedicated to Wordpress theme development. I purchased the Directory theme, and here is a page from that theme I'd like to be considered: ...
0
votes
2answers
71 views

Print shortcode in custom action hook not where the shortcode is entered

I have added a custom action hook into my theme. I want to be able to enter a shortcode anywhere in the_content() and have the shortcode print were the custom action hook is rather then the point from ...
0
votes
2answers
130 views

Shortcode to find and replace URL

I'm trying to create a shortcode that will search within some specified text for a link and replace it with one that I specify. For example: [scode]Click on <a href="www.X.com">this ...
1
vote
1answer
123 views

Shortcode are not working in Option tree textarea

I am using option tree. In textarea, i place shortcode [layerslider id="1"] its not working, i also found same post replied by plugin author allow shortcodes in textarea in option tree applied ...
0
votes
0answers
42 views

using enqueue_script in a shortcode isn't working

I'm new to wordpress and I'm trying to get this to work by following the wordpress codex but I feel like I must be missing something obvious. I have a child theme based off of a parent one, and I ...
0
votes
1answer
102 views

How to stop unwanted splits in excerpts when using shortcodes for sliders or players

Am using this code in functions.php: Issue with enabling formatting in excerpts in Wordpress to allow shortcodes, javascript and formatting in the excerpt - works great, thanks. However, I am also ...
0
votes
0answers
48 views

Code auto escaping is not working when using short codes

I'm using this ages old, but still well working, plugin (source code here) to auto escape html inside <code>. All is well and good until I tried to use short codes to form the ...
1
vote
1answer
410 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
1answer
71 views

How to generate CSS from a shortcode within a plugin

I'm struggling to generate CSS 'on fly' from a shortcode that is within a plugin using class. Here is the shortcode function: public function shortcode($atts, $content = NULL) { $data = ...
1
vote
2answers
137 views

Nested Shortcode Inside [caption] Doesn't Process

Captions in wordpress do not support nested shortcodes at the moment (v3.6). So, If I do write [caption]<img src=""> I love my [city][/caption] Where city is suppose to be processed but it ...
0
votes
1answer
49 views

Toggle Shortcode Sanitize Title

Wondering if anyone can help me out... here is my custom theme shortcode: add_shortcode('toggle', 'shortcode_toggle'); function shortcode_toggle( $atts, $content = null ) { ...
0
votes
2answers
120 views

How to link to a alternative page in CSS

I have a wordpress site and I want to be able to completely change a page that is displayed based on the browser size in my Custom CSS, so that if it is over 1500 pixels it loads a completely ...
1
vote
1answer
585 views

Audio and video shortcodes not working properly

I'm having some trouble with Wordpress's built-in shortcodes for audio and video. When I embed a video, it basically gives me a black box and has a link to download the file at the top; when I embed ...
1
vote
2answers
121 views

Problem with email_exists in shortcode

I have a custom registration form that I insert into a page via shortcode. The shortcode function looks like this: function custom_registration_form_shortcode() { $error = FALSE; if ...
0
votes
0answers
22 views

Shortcode for sectors

We've been given a WordPress site that has the following shortcode in the body of the page. [show_case_studies post_type="case-study" posts_per_page="15" order="ASC" orderby="menu_order" ...
0
votes
1answer
50 views

How to add a nested shortcode into editor?

I want to create an accordion shortcode for wordpress and the html code should be like this: <ul class="acordian"> <li> <h2>sadegh</h2> <p>To delete a comment, just ...
1
vote
1answer
131 views

Stray closing paragraph tag when using shortcodes

I'm using a basic shortcode to wrap some text in an expandable div. What appears to be happening is that the wpautop is inserting a stray closing paragraph tag at the beginning and a stray opening ...
0
votes
0answers
160 views

Responsive Directory Press Theme Listing shortcode/html customizations

I am currently using the Responsive Directory Theme. Under the Theme Options > Display Setup > Content Layouts > Listing Page Display > Customize it allows me to enter a combination of html and ...
1
vote
3answers
202 views

Filter specific shortcode output?

Is there a hook in WordPress that I can use to filter the output of a specific shortcode? Something like this: add_filter('shortcode_output', 'my_filter_function', 2); function my_filter_function ( ...
0
votes
1answer
335 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 ...