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

Iteratively add sub shortcodes to php array

I have this shortcode structure: [component] [type1]some content[/type1] [type2]some more content[/type2] ... [typeN]some other content[/typeN] [/component] I would like to have the $...
2
votes
1answer
392 views

wpautop() when shortcode attributes are on new lines break args array

I have a custom shortcode tag with a few attributes, and I would like to be able to display its attributes on new lines - to make it more readable to content editors: [component attr1 ="value1" ...
0
votes
2answers
456 views

include shortcode values in Thickbox form

I have a shortcode that is built using a Thickbox form with various inputs that return the values. This works fine. However, I would like the existing values (if present) to re-populate the form if ...
1
vote
3answers
1k views

Caption shortcodes not including caption as attribute

I recently installed the bonpress theme and am having trouble with the captions showing correctly. The more I try to understand how captions are supposed to work in Wordpress, the more I suspect ...
0
votes
1answer
53 views

Create pages for authors

I have a pretty good question here. I would like to create a hidden page on my wordpress blog for each user as they are registered. I already have most of the code of what needs to be put on the page ...
0
votes
2answers
460 views

How to pass custom field value to shortcode?

I want to call custom field in single.php template to complete a short code and thus show a menu. I places the below code but it is not working <?php echo do_shortcode("[custommenu menu=<?php ...
2
votes
1answer
3k views

Frontend editing, Frontend user dashboard

I am creating a website so that users can submit their articles from the front end. I have quite a few things set up: The ability to submit custom post types from the front end Blocked from the back-...
2
votes
3answers
763 views

get attributes/part of the gallery shortcode

I'm trying to grab all image id's that are associated with the [gallery] shortcode that are listed as exclude. For example: if my post has [gallery exclude="1,2,3"] I'd like to get a variable that ...
1
vote
2answers
981 views

Does Wordpress support a shortcode calling itself from within a shortcode call?

I've built a super-crazy Wordpress framework that has a million and one shortcodes, one of those is a columns shortcode which supports a count parameter that allows you to define a column and the ...
2
votes
2answers
2k views

echo do_shortcode is not working on theme's template

I don't know whats causing the problem but the echo do_shortcode is not working on my theme's template, but its working on my plugin's template and the shortcode is working on my posts and pages. ...
2
votes
1answer
333 views

How navigation works in custom loop within shortcode?

I am using a shortcode to display a custom query. The shortcode is use in page. Everything is fine, only the navigation that I can't get it working correctly. Here is the function that I use to ...
0
votes
2answers
2k views

Stripping shortcode from custom excerpt function

I'm using the following function to create a custom excerpt for my homepage and categories pages so I can do it by character count and have a custom "read more". However, I have captions shortcode ...
2
votes
1answer
174 views

Short code for Venues

I am using the Event Organiser plug in and I am trying to setup the "venues." In the post my client and I would like a little more information on the venue to appear, I found the short code for the ...
1
vote
1answer
518 views

How to format shortcode's HTML in external file

I need to add a shortcode in my theme and I would like to put the HTML code not in the function which creates the shortcode but in a template file in my theme directory. Now I have function ...
1
vote
1answer
398 views

Adding option to Gallery shortcode

just starting out in WP dev, and I'm looking for any guidance I can get. What I'd like to do is use a hook or filter to add my own option to the core WP gallery shortcode. I would want it to work just ...
0
votes
2answers
1k views

passing parameters to do action from shortcode to wp_footer

Driving me nuts. I have a shortcode which works -fine- but for one detail. I won't post the entire thing, but it pulls the content of a post (works fine) then should echo a portion of it to a new DIV ...
1
vote
1answer
130 views

Enumerating shortcode attributes in JavaScript

I'm working on a plugin which uses a shortcode to call a JQuery function, and it requires three aspects to work: The JQuery code + its own code, to be included on the pages it will be used on The ...
1
vote
2answers
777 views

do_shortcode() doesn't work if shortcode contained in variable, works if shortcode passed as string

I'm developing a plugin, wherein one of the features is to switch out forms on a specific page by changing the shortcode within a custom field. within my plugin file: function getShort() { ...
0
votes
1answer
824 views

shortcodes output before content [duplicate]

Possible Duplicate: problem with short code Shortcodes are broken. For those of you playing at home, heres an easy step by step to replicate my problem. 1) Open a fresh Wordpress install (...
0
votes
1answer
888 views

Shortcode for Twitter Bootstrap Collapse

Im trying to create shortcodes for Twitter Bootstrap Collapse. This is what Im trying to achieve: [collapse-group] [collapse accordion="#accordionOne" title="my heading1"]some text[/collapse] [...
2
votes
1answer
706 views

Prevent add_shortcode from escaping a tag

In my plugin, I'm rendering a shortcode with some inline JavaScript. Wordpress seems to hate the closing CDATA tag (]]>), as it escapes it. I'm using CDATA blocks so as to render well-formed XHTML, ...
1
vote
1answer
125 views

Single post content custom order

In my post I have a shortcode for [video] than text content. Single post page displays first entry-meta, than title, than content [video] + text. What I need is to add some condition in single.php so ...
1
vote
1answer
3k views

Shortcode output always showing at top of page

my shortcode output won't appear where I put it, but rather at the top of the content (top of the post/page content). And here is my code function service_shortcode_index() { global $content; $...
4
votes
2answers
2k views

TED talks shortcode not working

I am trying to embed a Ted talk video using the shortcode: [ted id=myid] But it's not working. It shows the text instead of the video. Is there any configuration I need to check to make it work?
2
votes
1answer
206 views

How to create tabled index of posts in a certain category

I have a tech blog, what I want to do is to create an index page for articles in a certain category. For example, I want all the articles under the category "WordPress BasiX" to be arranged in an ...
-1
votes
1answer
657 views

Create plugin/function to catch XML-data via Shortcode

I need to display data from an XML-file inside Wordpress posts, and I want to use shortcodes to do it. I have this XML-file witch I need to get the data from; http://xml.prisguide.no/productExport....
0
votes
1answer
2k views

Using do_shortcode with variables?

Struggling to get the format right for the PHP in this do_shortcode embed using variables from Advanced Custom Fields plugin. I think I've tried every variation on ., ', and ". After reading every ...
-1
votes
1answer
819 views

Applying if (get_post_meta) to new shortcode

It's my first time here so here goes :) I've created a custom image field which allows me to upload new images, or have images added via a form from the frontend. I want these to display. I'm ...
0
votes
1answer
364 views

Testing for a shortcode using a function. 404 page throwing PHP Notice

I'm using the following function (can't remember where I found it, but I think it was written by pippin so thanks to him) to test for a shortcode. function has_shortcode($shortcode = '') { $...
1
vote
2answers
470 views

How to split <p> text text text </p> into array

I like to output and style in a shortcode, but the content that is get is the content of a page, so it's style like that <p>2012-12-12</p> <p>2012-6-23</p> <p>2012-7-3&...
0
votes
1answer
175 views

Shortcode for tables which can include comma and linebreaks

Is it possible to make a shortcode for table which can include commas and linebreaks for its content? I've been trying to output something like this with shortcode: But it seems difficult. I tried ...
0
votes
1answer
4k views

Add custom attributes to a post

My blog is mainly composed of posts describing hiking. Actually, since I just moved from a Wordpress.com blog to a self-hosted Wordpress blog, every hike is inserted in a simple post. However, every ...
6
votes
1answer
2k views

Using wp_editor in shortcode

I am building a plugin for frontend submission. I am using shortcodes API to display the form for content submission, but I am having troubles. The problem is, wp_editor echoe's data, and shortcode ...
-1
votes
3answers
679 views

do_shortcodes() isn't working

I'm making a homepage template for my theme and I want to call a plugin, namely royalslider. Surely do_shortcode('[gallery id= "1"]'); Should do the trick?
0
votes
1answer
233 views

Create Widget or Enable Shortcodes in Sidebar

I'm well aware that WordPress by default does not process shortcodes in the sidebar. My question is why. I'm building a very small plugin that exports some content when the shortcode is present. This ...
2
votes
1answer
4k views

How do i reference the theme path in pages for images?

How do i reference images in a page/post without installing the php plugin or typing it out manually like this: domain.com/wp-content/themes/mytheme/image.jpg
-1
votes
1answer
250 views

Wrapping a function in html tag and return?

I am creating a shortcode. The shortcode will output a list of pages with the wp_list_pages() function. I am using the ('title_li') parameter and the list headline will be removed, because it is left ...
0
votes
1answer
302 views

Why is my custom post query shortcode only showing 1 post?

I created a shortcode for a custom post type so I can show the posts in a page. It works, except it only shows 1 post. here the code... anyone know what's wrong? // this is the shortcode function ...
0
votes
1answer
199 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
2answers
181 views

Shortcode interpreted as text

I have the following shortcode in one of my pages [[Intern: Termine/News]] This works on a password protected sub page. Now I want that all news of the category Termine/News are on the parent page. ...
0
votes
1answer
1k views

conditional shortcode not working

I'm using a plugin, NextGEN gallery, to display photos. Each gallery from this plugin corresponds to a different sub-page, so I'm using conditional shortcodes to assign the right gallery to it's ...
5
votes
3answers
1k views

Show shortcode without executing it

I am trying to display code in my WordPress page and it isn't working. Everything I read says that you should be able to just use pre tag with code tag and it would be good but when I try to display a ...
0
votes
2answers
195 views

Problem using $var for shortcode attr value

I am trying to pass a variable value to a shortcode attribute. I can't get it to work. Is the following supposed to work, or must values be literal? $mycat = 'books'; $myshortcode = '[products ...
0
votes
1answer
138 views

manipulate a plugins shortcode

I want to add some javascript directly below content, added by another plugin's shortcode. We are using the NextGen Gallery plugin and there are many articles containing the [nggallery] shortcode. I ...
0
votes
1answer
127 views

Wordpress do_shortcode first iteration

I've created a recursive shortcode that looks like this. [tabs] [tab state="active"]Home[/tab] [tab]About[/tab] [tab]Contact[/tab] [/tabs] [tabcontent] [tabpane]Content 1[/tabpane] [tabpane]Content ...
0
votes
1answer
6k views

call shortcode in javascript

I want to display a shortcode through jquery after the DOM is loaded: This is how I call the shortcode: <?php echo do_shortcode('[plugin]'); ?> Now, my question is how can I call that ...
2
votes
3answers
1k views

WordPress gallery 'post_gallery' filter doesn't work with feeds?

We can use the post_gallery filter to modify/replace the default WordPress gallery template (AKA output code) to suit our needs. But this doesn't seem to affect the markup in RSS feeds. No matter ...
-1
votes
1answer
44 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
vote
1answer
267 views

plugin shortcode output

I have a plugin which uses this shortcode: [daisy] And the html output of this shortcode is : <a class="clickable">Click Here</a> Plugin is working perfect if I use the shortcode to ...
0
votes
1answer
433 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"); ...