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

Trouble passing attribute into shortcode function

For some reason the WP_Query instance in my shortcode function won't take the query attribute sent from the shortcode. The shortcode is like this: [postlist query="post_type=any&posts_per_page=5" ...
1
vote
2answers
406 views

Inserting shortcode [stream /] into a Text widget

hi i'm trying to insert a short code into a Text widget but all its doing it showing the code and not processing it. <?php echo do_shortcode(' [stream embed=false share=false width=500 height=560 ...
0
votes
1answer
817 views

How to add shortcode to show/hide press releases?

Is it possible to create a TinyMCE button and shortcodes to WordPress to enclose press releases in, so that they're hidden by default, but at the press of the button, they would expand to reveal the ...
3
votes
1answer
827 views

do_shortcode() doesn't do shortcodes ;)

Imagine this basic shortcode in your functions.php file: function div_shortcode( $atts ) { return '<div class="div"></div>'; } add_shortcode('div', 'div_shortcode'); So every [div] ...
1
vote
3answers
2k views

Any Short code Availble for Get Post List With Thumbnail Plugin?

Any Short code Availble for Get Post List With Thumbnail Plugin? or else how to Create Short code for this Particular plugin? Thank u in Advance.
0
votes
1answer
451 views

Better way to display multiple plugin output on the same page?

Using two plugins on one page; promoslider & events list. Tried to produce desired output. +-----------------+ | slider output | +-----------------+ Text related to events list ...
0
votes
1answer
2k views

Turn off image captions in gallery view?

I've set up my loop-attachment.php to show the gallery of thumbnails above the main, selected image using this code from the WordPress Codex: <?php $gallery_shortcode = '[gallery id="' . ...
2
votes
1answer
637 views

nested Shortcode doesn't work

Shortcode: [permalink][title][/permalink] Output: <a href="foobar">[title]</a> Wordpress shortcode API sais, it's correct: http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes ...
1
vote
1answer
411 views

Create own Wordpress shortcode gallery

How I can handle this shortcode: [my_gallery] img01.jpg img02.jpg img03.jpg img04.jpg [/my_gallery] I can't understand how to write a function, to handle image files name.
0
votes
1answer
105 views

Pulling RSS from site and display it in posts

I'm trying to pull rss from sites similar to this: http://andreabadendyck.blogg.no/ I have several posts with the URL in the title, so I can pull the URLS from here and hardcode the rss reader in the ...
-1
votes
2answers
217 views

Embedding BitBucket Code in Posting

I want to embed my code at BitBucket in wp post, anyone can suggest me, a good plugin or anytrick to do it?
3
votes
5answers
2k views

Cannot strip JW Player shortcode?

On the WordPress archive template I am using a custom excerpt function that includes a reference to strip_shortcodes(). For some reason, shortcodes are being rendered and displayed in the archive. ...
0
votes
1answer
677 views

Replacement for gallery_shortcode function not taking all attributes

I have the following custom function to replace the gallery_shortcode function from core. It hooks in at the beginning and works. The problem is that I can't get my custom key/values from the ...
0
votes
3answers
389 views

append stylesheet via shortcode

Wondering how I can add a stylesheet to wp_head section via shortcode, since shortcodes are parsed after wp_head, I've hearing about output buffering but I Am not sure. Any idea?
0
votes
1answer
686 views

Prevent wordpress from rendering shortcode in post

Suppose I have a [list] shortcode. I want to have a post explaining how to use shortcodes (docs for my theme). How can I have a header like [list type="arrow"] Shortcode Tag Currently wordpress ...
2
votes
3answers
1k views

Creating a table from shortcode avoiding wpautop for each row

I'm probably doing this all wrong, and there'll be a much simpler solution. Basically, I'm trying to build a table of tour dates that'll be editable by someone with little technical knowledge, but can ...
3
votes
1answer
1k views

Shortcodes, HTML tables, and multiple rows

Im trying to build a shortcode which calls an HTML table with a fixed number of columns and a variable number of rows depending on the context. Its hard to manage — or even build, multiple ...
1
vote
1answer
4k views

How to call custom taxonomy categories with shortcodes

I've just had one questions solved over here: How to display posts from a single category within a custom taxonomy. Now I'm wondering how to take this code: <?php $args = array( ...
7
votes
3answers
326 views

how to show the syntaxis of a shortcode

i want to show the syntaxis in some posts about how to run a shortcode, I mean, something like this [myshortcode] but without running it, is that possible?
2
votes
2answers
355 views

Post the content of a specific “Custom Post Type” post within a post using a shortcode

The posts on our music blog usually include multiple tracks of music. I want to have each individual track be its own entity--a custom post type called "track"--which I want to be able to insert ...
3
votes
2answers
5k views

What kind of object type is WP_Query?

I am getting this error when I try to return the post_title value from my WP_Query: **Fatal error:** Cannot use object of type WP_Query as array Here is the code: $query = new WP_Query( array( ...
0
votes
1answer
733 views

Stream Video Player does not work with do_shortcode()?

I have downloaded a plugin called Stream Video Player, which has a shortcode. If I put the shortcode into the content editor, it works well and it displays the video. However, if, inside a template I ...
0
votes
1answer
257 views

hard code shortcode only on specific category

I am looking to embed several shortcodes into my post template, but I want the tags to be conditional to a specific category (and subcats). I've looked through the codex, but I'm unsure where to ...
2
votes
3answers
3k views

Custom form, shortcode, and submit handler

I have a frontend form with a bunch of input. My requirements force me to use a custom shortcode to create the form. I have already tested a page with that shortcode. Here's my : <form ...
0
votes
1answer
487 views

Nested Gallery Shortcode INTERMITTENTLY working

I have an Expand/ Collapse plugin which, via a shortcode, can expand/ collapse content. My expandable content is a shortcode of a gallery. See here: http://shop.dearearth.net/collections ...
2
votes
1answer
199 views

Browser title script ignoring is_page /else conditional [closed]

I've used this code to stipulate different separators for different pages in my clients site: <title> <?php if(is_page('Portfolio')){ wp_title( 'of', true, 'right' ); echo ...
0
votes
3answers
1k views

Wordpress global variables?

I've got page with metabox called "something". It can have two values "value" and "value2". I'm using a shortcode at this page and want it to display something's value. The problem is I don't know ...
1
vote
3answers
650 views

Get Posts shortcode plugin and meta_query?

I'm using Get Posts plugin to list posts with post type "project". I want to filter the list by two custom fields: year (ex. 2006) and state (ex. Completed). I added meta_query to the plugin's ...
3
votes
2answers
2k views

WordPress adds br in between my shortcode

I am having a problem where my markup is rendered incorrectly (more space because of <br />) as WordPress adds <br /> everywhere theres a line break eg. [x] [y]Hello world[/y] [y]A ...
0
votes
1answer
458 views

Dynamic number within shortcode

I need to write a dynamic shortcode. The original says: [... width="940" height="200" ...] I need to have this: [... width="<php>" height="<php>" ...] How do I get this to happen?? ...
1
vote
5answers
2k views

Display post shortcode content in the sidebar?

I need to display images and other content in the sidebar depending on a page. Pages are added dynamically and information that need to appear in the sidebar is different for each page. So I can't ...
0
votes
1answer
425 views

Hide/disable sidebar using shortcode?

The question is pretty simple, but it's complex in fact. I have implemented custom sidebars for each post/page function in my blog. It looks like: <div id="<?php echo ...
5
votes
2answers
5k views

How to add multiple buttons to TinyMCE?

I've followed a tutorial on Nettuts on how to add a custom button to TinyMCE (http://net.tutsplus.com/tutorials/wordpress/wordpress-shortcodes-the-right-way/) It works great and all, but i want to ...
5
votes
3answers
2k views

Is there a way to add another row to the tinyMCE kitchen sink toggle?

The tinyMCE "kitchen sink" toggle button shows/hides a row of buttons. I have successfully added my row of shortcode buttons to the tinyMCE editor, but I was wondering if there was a way to make my ...
0
votes
2answers
143 views

How can i share codes on my blog?

I want to add <code> tag to my post, easily. For example, Adding code is very easily in Stackoverflow and other sites. Basically, we can add codes between apostrophes (``) I need something like ...
0
votes
2answers
998 views

Can data from a Custom Field data be used by a shortcode on a per page/post basis?

I'm developing a site where better is very quickly becoming the enemy of the good. I would like to make updating as simple for the client as possible by enabling them to populate boilerplate and ...
1
vote
3answers
143 views

What is a short code?

I am new to WordPress and I've seen this term passed around.
3
votes
2answers
990 views

Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation

I really need some help, I dont know where else to turn with this request. I'd like to add a shortcode to one of my posts. The template tags get_next_post() and get_previous will not work for me since ...
4
votes
2answers
770 views

Remove wptexturize from a shortcode?

Is there a way to remove wptexturize only for a certain shortcode?
0
votes
2answers
2k views

How to turn this HTML code into a shortcode? (adding song lyrics and giving an id to a div)

STEPS: Don't forget to use different id numbers in each accordion. For example: id="5" (1 to 10) The title goes between the The lyrics before the Place 2 accordions per posts (like the example ...
0
votes
3answers
2k views

ShortCode and extra </p>

[box id='1' text="some texte"] the shortcode, at one point is outputting text the html result is : </p> some text </p> There is an extra closing paragraph in the start and and opening ...
0
votes
2answers
3k views

Using the title of the post in a shortcode

Hi I'm trying to use this plugin: http://wordpress.org/extend/plugins/wordpress-simple-website-screenshot/ I am supposed to use the shortcode: [screenshot url="www.example.com"] Because I am ...
0
votes
1answer
745 views

Shortcode content filter?

I'm looking for something, but don't exactly know what. I have a shortcode, let's call it [shortcode]. Users will input HTML tags inside, mostly images, but also links, images in links, etc., for ...
0
votes
1answer
480 views

Custom Shortcode Broken in Wordpress 3.1

A recent upgrade to wordpress 3.1 broke a custom plugin written to make use of shortcode in order to generate easy embed html for brightcove videos. Can anyone see what is happening in the following ...
1
vote
3answers
1k views

Shortcode doesn't work if I directly paste its function in a template file?

This is a shortcode to add a question form in the Question and Answer Forum plugin for Wordpress: [question_form width=\'x\' bordercolor=\'x\' style=\'x\']question form title[/question_form] This ...
0
votes
3answers
2k views

Automatically added brs and paragraphs?

Here's my very simple shortcode: function box_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( 'width' => 'auto', 'height' => 'auto', ...
1
vote
3answers
715 views

stray <p> elements

I coded a wordpress shortcode for columns that basically inserts html via a shortcode. Problem is that wpautop adds stray p elements that renders the code invalid. To test put this into your ...
2
votes
4answers
1k views

Shortcode empty attribute

Is there a way of creating an empty attribute for a shortcode? Example: function paragraph_shortcode( $atts, $content = null ) { return '<p class="super-p">' . do_shortcode($content) . ...
1
vote
2answers
2k views

the_widget() and widget's ID

Let's assume I have a widget that displays only its name: <p> <?php echo $args['widget_id'] ?> </p> So when I drag & drop my widget to any sidebar it shows: ...
0
votes
1answer
159 views

Shortcode displays always first. Once again

OK, I've had a problem with echoes in my last shortcodem, but everything works fine now. But I have another one: function myWidget_shortcode( $atts ) { extract( shortcode_atts( array( ...