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
3answers
675 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 ...
2
votes
2answers
2k views

Customizing gallery shortcode in 3.5

I'm trying to customize the gallery shortcode using the new gallery system in 3.5 and I'm having a bit of trouble and can't figure out where I'm going wrong. This is what I've got at the moment (in ...
1
vote
2answers
591 views

Stop WordPress automatically adding <br> tags to post content

Is there a way to stop WordPress from automatically inserting <br> tags when adding returns in the WordPress text editor. I would like for it to behave more like a code editor where I can ...
1
vote
2answers
219 views

How to load shortcode sooner

I am trying to add a shortcode to my menu, the menu item shows up but not the shortcode output. I think the problem is that the shortcode runs after the menu has run and therefore the shortcode ...
0
votes
2answers
37 views

Problem with shortcodes in external file

I have simple post with a shortcode: [xx]http://harrix.org/1.txt[xx] And an external file which has the content containing a WordPress shortcode: [strong] g[/strong] I try add my own tag to load ...
0
votes
2answers
90 views

How to add shortcode tags in single.php

In my theme has one shortcode tags to display tags of post and function to load content post. But in function doesn't include shortcode tag. Now I want to add it to function but i don't know how to do ...
0
votes
2answers
40 views

Strange get_the_* behavior with php 5.4

Let me try to explain what happened to me : I have a shortcode plugin which display child pages of the current page (a mod of http://wpist.me/wp/child-pages-shortcode/, very useful). In the display ...
0
votes
2answers
65 views

How to parse nested shortcodes?

The nested shortcodes won't parse correctly: [row] [col size="6"]...[/col] [col size="6"] [row] [col size="6"]...[/col] [col size="6"]...[/col] [/row] ...
0
votes
2answers
88 views

Call Shortcode inside another Shortcodes callback

I'm using a plugin that shows content only to specific user roles. This content is surrounded by a shortcode tag to make it invisible to other other user roles. Now I'd like to call other shortcodes ...
0
votes
2answers
58 views

get value from post to sidebar

I have the following div in my post, <div class="my_calss" id="my_id"> my content </div> Here, my_id is different for each post. I need to display my_id in sidebar into php code. ...
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 ...
0
votes
2answers
72 views

Shortcode or placeholder for theme options page?

I'm writing a theme options page that provides a space for the user to enter code for social buttons e.g. <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php ...
0
votes
2answers
35 views

Custom field in a shortcode?

I cannot get the image from one of my fields into a shortcode. (it works with get_the_post_thumbnail($post->ID, 'thumbnail') but I need the value from the field udstiller logo. function ...
0
votes
2answers
527 views

wp-query Shortcode in Gravity Forms Notification

I have the following code that runs two wp-query loops upon form submission to display specific posts depending on the users choices in the form (The form fields are radio buttons with values that ...
0
votes
2answers
63 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
2answers
128 views

Using locate-template & shortcodes doesn't appear to work

For organisation, I'm trying to split up the functions.php file into separate files. In particular the functions for shortcodes in a separate file, with the shortcodes being defined in functions.php. ...
0
votes
1answer
30 views

Prevent Menu Shortcode From Formatting

I'm trying to insert shortcodes into menu links (as I need to display a latest post link). I've figured out how to get the do_shortcode part done. However, when I insert a shortcode as the menu link ...
0
votes
1answer
199 views

Custom Fields - Boolean Display of True/False to Yes/No

I am importing fields from a Real Estate site. The Import of one Custom Field looks like this... Field Name after Import ---> assistedLiving Field Value ---> false to output the display in ...
0
votes
1answer
81 views

How to wrap a text with shortcode into php file?

I want to wrap a text with shortcode into the single.php file. The shortcode is: [box type="note" align="aligncenter" ][/box] and the code is: Διοργανωτής διαγωνισμού: <?php ...
0
votes
1answer
84 views

Change the default video URL in a post to shortcode format

I want to add video from youtube/vimeo to my post.Whenever i add a video to my post ,there will display a link like https://www.youtube.com/watch?v=dsUXAEzaC3Q in my admin(Add new post ),and in the ...
0
votes
1answer
182 views

Create Short code dynamically

I want to generate short code for my gallery dynamically. For a single gallery, it is easy to create a short code for my gallery using add_shortcode( 'image-gallery', 'gallery' ) Now my question is ...
0
votes
1answer
153 views

Multi-part form and wp_redirect()

For starters, it's a plugin (with a shortcode) or at least I would prefer it to be. I've got two issues both related to wp_direct. If form 1 validates I want to redirect to form 2, and continue the ...
0
votes
1answer
133 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
74 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
258 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
1answer
255 views

How to 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
1answer
73 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
123 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. ...
0
votes
1answer
94 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
1answer
164 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 ...
0
votes
1answer
164 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
61 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
85 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
1answer
328 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
1answer
100 views

Displaying shortcode content inside custom field without images

I need to be able to display different shortcodes inside custom fields. I have found a method that almost works perfect, but since that uses get_content, it also shows the main featured image of ...
0
votes
1answer
97 views

About redundant code when I use shortcode to output the HTML from a variable

I use shortcode to output the following html in a variable, but there are too many redundant code such as br and p tags, how to remove them? Thanks! HTML MAKEUP $return_html.='<div ...
0
votes
1answer
155 views

Don't show images inserted into content

I'm using a lightbox plugin to display my post images with [gallery], it works but those images show up in the content area too. So there are thumbnails and full size of same image. How can i hide ...
0
votes
1answer
142 views

display custom portfolio tags

This is a part from the code that is used to display portfolio categories: $post_cat = array(); $post_cat = wp_get_object_terms($post->ID, "portfolio_category"); ...
0
votes
1answer
173 views

Display MP3 as media using an URL from a custom field

I created custom field and placed this inside the loop: <?php echo get_post_meta($post->ID, 'ses', true); ?> But now the link is all text. I would like it to be like my theme does when I ...
-1
votes
1answer
496 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 ...
-1
votes
1answer
110 views

How can I edit these shortcodes so that the text for the form is displayed within the input boxes?

Never worked with short codes, and if you could point me in the right direction, you could help me edit this contact form plug in. (This is no formatting help from what I saw on their site) I have a ...
-1
votes
1answer
36 views

Shortcode returning specific content of a post

I'm currently building a plugin to display specific part of post after accepting verification code. Can a shortcode return a part of a post? I mean: Bla bla bla [shortcode postID="100"] Special bla ...
-1
votes
1answer
82 views

Shortcode in a page to display custom posts which also have a shortcode in them

I have created a shortcode [get_custom_posts] to be inserted in a page (the default page post type from WordPress) to get posts which are from a custom post type. In each post from that custom post ...
-1
votes
1answer
133 views

Shortcode not picking up custom field

I created a custom field that allows me to set the cropping style of timthumb, but I am also using short code to populate a page with blog posts, but the shortcode isn't picking up the customfield, so ...
-1
votes
1answer
546 views

Changing the title tag from a shortcode

I currently have a shortcode which dynamically swaps out locations on a page to make each page specific to a location. For example the url http://mywebsite.com/offers/scotland/ Would make the H1 ...
-3
votes
1answer
197 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 ...