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)

1
vote
2answers
630 views

stop shortcode stripping in category and archive pages

Using the Wordpress default theme 2010 1.1, shortcodes work on the main blog page and individual post pages, but are being stripped out on category and archive pages. For example, stick in the ...
0
votes
1answer
348 views

Output loop to function return?

I'm working on a shortcode function that returns a category image, a link to the category, the last three posts in that category, and another link to the category. See my code below: ...
2
votes
3answers
3k views

Custom Select Query with Custom Post Types

Have been trying to figure out the issue with this for the past hour, but hitting a wall. Basically I'm just trying to query my custom post type based on some custom date fields and then displaying ...
1
vote
1answer
2k views

Custom Post Type Loop within Shortcode

I'm really at loss as to why this isn't working: I am using a shortcode to display a query on a custom post type + taxonomy, this is the segment of it: // - arguments - $args = ...
1
vote
2answers
3k views

Trouble with editing template for “List category posts” plugin

WP 3.0.4 local installation, multisite network enabled theme: Twentyten plugin: List Category Posts v .15, network activated I've created the folder list-category-posts inside my theme folder, and ...
0
votes
1answer
777 views

How to create a shortcode to let the user add the ID of a YouTube video?

I use the following to add in a post a YouTube thumbnail and display the video in a fancybox: <div><a class="fancybox" href="#video2"> <img ...
0
votes
3answers
679 views

Looking for a way to include/embed text from a file on a page so that the short codes are processed

I'm using WP as a CMS. I've got multiple pages that share the same header. group 1 has header 1. group 2 has header 2. etc. I've looked at these two plugins for a quick way to insert a combination ...
2
votes
1answer
839 views

Custom shortcode in widget forced to top of widget

A custom shortcode i made is being forced to the top of the widget outside of the widget container. Any ideas why? This is my code... function nktmediaplayer_func($atts) { ...
0
votes
1answer
858 views

How to provide support for [gallery] shortcode?

I'm developing a new custom theme - and noticed that if a post contains the shortcode [gallery] it gets ignored (edit: I mean that the HTML delivered to the browser does not include [gallery], nor ...
0
votes
2answers
389 views

What is wrong with this Shortcode? I get it in a wrong place inside the content

Hi to the community, i try to build a shortcode that prints the Creative Commons logo and some text, everything is working fine except that i put the shortcode at the end of the post but the shortcode ...
0
votes
1answer
190 views

shortcode help require

i am having a wordpress function to display the latest 5 tweets of the user, this tweets can be displayed by two ways one is through direct entering the user ID in admin menu which i created, and ...
4
votes
3answers
1k views

Nested Shortcode Detection

If you are familiar with this code <?php $pattern = get_shortcode_regex(); preg_match('/'.$pattern.'/s', $posts[0]->post_content, $matches); if (is_array($matches) && $matches[2] ...
7
votes
2answers
25k views

How to customise the output of the WP image gallery shortcode from a plugin?

We're building a plugin that displays posts, and we also want to display the image gallery when it is used in a post. However, we need to limit the number of photos displayed? Is that possible?
5
votes
1answer
2k views

Styling Shortcodes in Visual Editor

Does anyone know how to style the visual editor so that when specific shortcodes are used they are replaced with an image within the visual editor? I have found that many users screw up the shortcode ...
1
vote
1answer
1k views

Pass variable to nested shortcode

I'm setting up a plugin with a nested shortcode, i.e. [ct_training_group] [ct_training] [/ct_training_group] Here's the catch: I use the [ct_training] code outside of the parent as well as ...
0
votes
1answer
707 views

Using shortcode in template file

this is shortcode in template: function shortcode_frame_left( $atts, $content = null) { return '<span class="frame alignleft">'. do_shortcode($content) . '</span>'; } ...
0
votes
2answers
361 views

How do I create shortcodes for my wordpress themes?

I have seen many professional wordpress themes for sale that have shortcodes built in with which you could easily make posts like this: [alert_box]This is an alert box which based on this short-code ...
1
vote
1answer
381 views

Shortcodes attributes defaults

I use this construction to implement my own shortcode: function column_with_icon($atts, $content = null) { extract(shortcode_atts(array( 'icon' => 'onebit_03' ), $atts)); ...
5
votes
2answers
386 views

How would I create a plugin for my shortcodes?

All tutorials I have found say to add your shortcodes to functions.php in your theme. I would like to break that away from my theme and put that in a plugin so I can share these shortcodes between my ...
0
votes
2answers
145 views

Plugin that provides the [edit] shortcode?

Several months ago, I was browsing around the Internet and came across a WordPress site that had updates on the posts enclosed in [edit]...[/edit]. Obviously this was a function provided by a plugin ...
0
votes
2answers
2k views

How to get shortcode to work inside a foreach loop called within a shortcode?

My plugin, WP Coda Slider, uses a shortcode to get_posts and add them to the slider. If one of the posts contains shortcode the shortcode in that post will not work. $my_wpcodaslider = new ...
2
votes
3answers
436 views

How do I add my own custom shortcodes?

I'm looking to reuse some small portions of html inside several pages/post but I don't know how to obtain this on WordPress. It would be nice if I could have a helper in the editor to include them, ...
1
vote
2answers
183 views

Use shortcodes in terms description? [closed]

Anyone knows a way of using shortcodes on terms description? This is possible?
0
votes
1answer
828 views

How to display a shortcode caption somewhere other than the_content

I want to disable shortcode captions for posts in one of my themes, and display the content elsewhere, such as in a sidebar. The images aren't uploaded to wordpress, but they're linked-to using the ...