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
0answers
126 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
135 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
110 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
152 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
166 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
26 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
70 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
107 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
59 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
262 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
29 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
325 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
128 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
306 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
273 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
132 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
49 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
55 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
83 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
53 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
90 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
156 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
187 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
47 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
122 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
57 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
641 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
80 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
227 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
57 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
148 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
793 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 ...
2
votes
2answers
149 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
25 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
63 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
171 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
225 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
4answers
450 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
361 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 ...
0
votes
1answer
432 views

Strip shortcode from excerpt [duplicate]

I have this challenge, that i've found out that i'm not the only one in the WEB with the same issue, nevertheless, there are no solutions yet. I'm trying to remove shortcodes from my custom post ...
2
votes
1answer
93 views

How extend shortcode default values for a plugin?

I recognize this would be better suited for the plugin's official support thread, but the developer doesn't appear to read the forums. I'm using the Standout CSS3 Buttons plugin to add buttons via ...
0
votes
1answer
44 views

Shortcodes: Return different based on atts

I have the following shortcode for pullquotes: //Pullquote shortcode function pullQuotes($atts, $content = null) { extract(shortcode_atts(array( "author" => '' ), $atts)); return ...
0
votes
1answer
25 views

Problem code and show comments

I use this code in shortcode for show posts : <?php while ($wp_query->have_posts()) : $wp_query->the_post(); $imagen = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ...
0
votes
1answer
65 views

Creating a shortcode in a plugin that includes JS

I use a lot of embedded tweets on my site. The script always gets stripped out. I added Twitter's code to my theme, but it doesn't work with infinite scroll. So I'd like to make a shortcode that will ...
0
votes
1answer
241 views

Why is my str_replace not working on short code submitted by front-end?

I've built a front-end post submission form that allows a user to include a shortcode provided by SoundCloud. SoundCloud shortcodes generally look like this: [soundcloud ...
1
vote
1answer
231 views

Are .MP3 files with capital letter extensions allowed in [audio] shortcode?

In WordPress 3.6, using the new [audio] shortcode, I can add a player for an .mp3 file like this: [audio src="http://example.com/audio_files/test.mp3"] However, if the .mp3 file has capital letters ...
0
votes
2answers
136 views

Wrap php in shortcode

I'm using a plugin that will display content based on user location, and I'm trying to add it to a facebook widget code. The plugin is using a shortcode to wrap content that will be displayed, and ...
0
votes
0answers
23 views

Button shortcode with two actions

I have a shortcode that handles url parameters and returns html form button to send user to info page. But now I need to include additional action that would run allow.php script when button is ...
0
votes
1answer
208 views

How to Generate html tags using shortcodes?

I am using a widget and adding this: <div id="testimonials"><h4>[acf field="testimonial" ] <strong>[acf field="name" ]</strong></h4> <h4>[acf ...
0
votes
0answers
144 views

Wordpess frontend posting -> Featured image

I'm currently making a custom Wordpress theme with custom templates for users to keep them 100% front-end. Now i am creating a frontend posting template but i'm stuck, i can't find a method to get ...