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
votes
1answer
283 views

Shortcode append to the the_content()

Currently I have a short that embeds a div into the the_content. This works fine like thus: [shortcode param=1 param=2] This returns a message at the end of the post, but within the current article, ...
0
votes
1answer
135 views

how to show last 5 images from the one post gallery

i want to get the 5 images of a one post gallery and show this random, example : [gallery id="123" orderby="rand" {numberpost=1 } or offset ? ] [gallery] codex tanks for help me.
1
vote
1answer
217 views

Function to show only first instance of shortcode

I need to add a function to my theme to remove additional instances of a shortcode in a post. First off I wonder if i'm approaching this wrong, but I have a theme that is drastically reformats the ...
1
vote
1answer
133 views

conditional tags- how to use with shortcodes

I have a salon website with a gallery page wherein the user must first select a stylist prior to viewing their individual gallery. I planned on using NextGen to house the images in stylist specific ...
1
vote
0answers
64 views

NextGEN Gallery- using shortcode for different galleries on different pages [duplicate]

Possible Duplicate: conditional shortcode not working I have a salon website with a gallery page wherein the user must first select a stylist prior to viewing their individual gallery. I ...
0
votes
1answer
281 views

Filters on the_content with plugins, pages and shortcode

I am using a plugin to add tweet, likes... This plugin add filters to the_content() to display this social buttons on a blog page (list of posts). I coded a shortcode which does a custom SQL query ...
4
votes
3answers
614 views

How to embed page content in a blog post

I've built an HTML table that is posted on a page in my site, and I'd like to use that same content inside a blog post (something of an announcement of the table's publication). The table is likely to ...
0
votes
1answer
196 views

Parse Shortcodes in Theme's Custom Field?

I have a theme which has a "PRICE" custom field that only accepts numerical values. Is there anyway to parse shortcodes in that custom field so I can dynamically display the price using another ...
1
vote
1answer
916 views

Gallery shortcode - change link file image size? (not using default fullsize image)

I am using this for my gallery - <?php echo do_shortcode('[gallery size="gallery-thumb" link="file"]'); ?> and I am using the jquery fancyapps fancybox. But some full-size images that are in ...
0
votes
1answer
830 views

How to Make Archive ShortCode

I checked that there is an shortcode on wordpress.com but it seems there is no build in way of adding the shortcode of archive on wordpress.org site. I know there was one plugin in repo but it's 2 ...
5
votes
2answers
2k views

do_shortcode() within Admin Page

I'm using a few plugins that have shortcodes ... however, instead of creating a public page for the content, I've created some new pages within the admin using add_menu_page and I need to know how to ...
3
votes
2answers
1k views

PHP error with shortcode handler from a class

Currently i am using the following generic flow for adding the shortcode for a plugin. class MyPlugin { private $myvar; function baztag_func() { print $this->myvar; ...
1
vote
0answers
211 views

Stop wptexturize from texturizing my shortcode

I have a script outside of Wordpress that generates an HTML file a few hundred times a day. I figured the best way to get the contents of this file in to a specific page would be a shortcode. I ...
2
votes
4answers
3k views

How can I show the Jetpack Subscriptions form in a page? [closed]

In the Jetpack plugin, the subscriptions module can be included in your blog by following these instructions: To use the Subscriptions widget, go to Appearance → Widgets. Drag the widget labeled ...
1
vote
1answer
76 views

no content after shortcode

I hope you guys can help me with this little bug I've encountered. I am using a shortcode to display an audio player in the entries. This is the code i've put in my functions.php: function ...
-1
votes
1answer
88 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 ...
0
votes
1answer
2k views

How to build dynamic pages?

I'm new to WordPress so please bear with me. I have a requirement where I need to create a page that contains a lot of static and dynamic content coming from the db. What is the best approach to do ...
1
vote
1answer
257 views

Buddypress shortcode for tabs [closed]

I want to add some more tabs like photos, videos on the user profiles of my buddypress site. Is there any shortcodes or functions to add the tabs?
1
vote
1answer
367 views

Shortcode Not displayed at the Right Place [duplicate]

Possible Duplicate: Shortcode always displaying at the top of the page I am using custom shortcode to show some message at the end of the post. I am finding it hard to do so because it ...
0
votes
3answers
2k views

Make a Shortcode load after Post/Page Content?

I created a shortcode for time.ly's "all in one event calendar app" that makes a paginated list of upcoming events with out all the java script and user options. I posted about it here. (Its still a ...
0
votes
1answer
1k views

How do you use do_shortcode via AJAX call?

I'm attempting to call a Contact Form 7 form using AJAX in a Wordpress theme. I'd ideally like to use the Contact Form 7 shortcode to do this, however it doesn't seem as though do_shortcode is an ...
0
votes
1answer
143 views

How to check if this is the nth instance of a given shortcode in a post

Suppose I have a shortcode called [item], which I have used 20 times in a particular post. Is it possible, from within the shortcode handler function, to know what the numerical index of the given ...
0
votes
1answer
56 views

My plugin won't return anything [closed]

I am trying to write a simple plugin to insert some post links in a post at the right place. The query part works okay in a template, but my attempt at a displaying via plugin just returns a blank ...
0
votes
2answers
1k views

WPTouch - how to remove shortcodes or make shortcodes function

So as the title states - using WPTouch Mobile plugin (NOT Pro) I either want to make the shortcodes work as they should or remove them altoghether. Currently they render on the page as [shortcode] ...
3
votes
1answer
1k views

Using action hooks inside of a shortcode

I am trying to create a modular plugin that includes action hooks for developers to add content before and after the main shortcode content. I'm having some trouble because anything I do in the ...
0
votes
3answers
762 views

shortcode using multiple WP_Query's with multiple category names not fully functional

we're working on a bilingual site, Larry A. Downs all the posts are categorized into two categories, english or spanish, along with other categories. so every post has multiple categories, i've ...
0
votes
1answer
650 views

Form submit from modal window to parent window

Trying to submit a field value from a popup modal window to my WordPress parent window meta-box. On my add post page I have a metabox with a field type 'text'. The id of my 'text' field type input ...
1
vote
1answer
590 views

Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it

I'm trying to output a custom post type archive using a shortcode. Everything works fine except for the get_next_posts_link part. The weird part is that it's right next to a get_previous_posts_link ...
2
votes
1answer
4k views

Shortcode Displaying Custom Post Types

I have a problem with a shortcode that I'm creating. I have 5-10 different custom post types, and rather than creating a template for every individual post type, Id rather use a normal page and ...
0
votes
2answers
140 views

Which is a better practice when writing shortcodes: pack lots of configuration parameters or just give an id?

I am writing my first wordpress plugin which inserts a visualization widget inside a post. I am planning to use a shortcode for my plugin. I followed an excellent tutorial about writing shortcodes. ...
1
vote
1answer
129 views

How to get rid of shortcodes in post content once and for all

I changed theme/plugin now the post content still display shortcodes. There are some tips around on hiding them, but everytime I use some content functions, the shortcodes shows up again. Also, my ...
1
vote
1answer
182 views

Shortcode with custom content attribute?

I am creating a shortcode for a client site that should display an image and a saying (mainly at the bottom of the page, but basically wherever the client wants to insert said image/saying). The ...
0
votes
1answer
768 views

PHP Widget and do_shortcode

I'm using PHP Widget which allows PHP code to execute from a widget. I tried using this code to execute do_shortcode but it's not rendering <?php $lat = get_field('woo_maps_lat'); $long = ...
1
vote
2answers
465 views

Google Map Shortcode for Custom Taxonomy/Post Types

Calling all WP Stack Exchangers! I am currently using Alain Gonzales' Google Map Shortcode plug-in on a site I'm developing, and it's worked just fine: Google Map Shortcode plug-in on wordpress.org ...
3
votes
1answer
559 views

Get shortcode name from within it's callback function? [duplicate]

Possible Duplicate: current_shortcode() - detect currently used shortcode I'm dynamically generating shortcodes with my plugin like this: foreach ($options['grids'] as $grid) { ...
1
vote
0answers
91 views

Using shortcode to display array in array

I am using a widget, U more recent posts. Seems to work with custom taxonomies when you input the correct data into it in a widget form, but the suggested shortcode doesn't work (and I am trying to ...
3
votes
1answer
62 views

When to use which plugin output method?

I'm a Drupal dev, getting into Wordpress. So far as I can tell there are a few different methods by which a plugin can output content on to a Wordpress site: Shortcode Rewrite API Widget API ...
1
vote
2answers
254 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
1answer
188 views

Shortcode Strategy

I'm looking to insert data from another database into my posts, and thought of using shortcodes. An example post: [imdb id="123" name] was born [imdb id="123" birthday] in [imdb id="123" ...
0
votes
1answer
3k views

plugin shortcodes not working on custom theme- unsure how to fix

Live site. I've got a custom theme that is giving me slight issues with shortcodes- they don't work. When I switched back to the default theme, the shortcodes worked fine. What do I need to look for ...
0
votes
2answers
136 views

Custom shortcode breaks my page

Okay so I'm trying to create a wordpress shortcode called chapter, i.e. [chapter]text[/chapter]. What this does is it first checks if the content entered is already in the database, if it's not it ...
3
votes
2answers
87 views

How do I make specific plugin functionality apply to different sites in a network?

I have a site specific plugin that I've written for the main site in my multisite network. Now I realize that the shortcodes that are in the plugin are also useful on the sub-sites, however the ...
0
votes
1answer
120 views

If else with shortcodes

I only want one of these shortcodes to display if the custom field value is true. I'm not understanding the logic to do this. So basically, if there is a twitch video and a own3d video I only want the ...
4
votes
1answer
327 views

How to return loop contents

At times, I need to return the output of a loop (usually with WP_Query like in this example) for use in a shortcode or with a filter on the_content. The following code that uses object buffering ...
1
vote
2answers
2k views

How do I get the attributes of a short code from a post?

I am trying to preview a NextGen gallery on my main page (and category pages) to show a single image from the gallery on the main page next to the text from the post that normally shows up. I have ...
2
votes
1answer
394 views

Table of Contents with a shortcode

I have this Table of Contents class below that will find all <h2> <h3> and <h4> tags in a wordpress post and it will create a Table of Contents out of them, it adds an ID to each ...
1
vote
1answer
756 views

shortcode outputs first before the page content [duplicate]

Possible Duplicate: Shortcode always displaying at the top of the page I have a wordpress site with wp e-commerce plugin and gold cart plugin. I have created a worpdress page with ...
2
votes
1answer
754 views

How to display html in a shortcode

How do you display or process HTML in a wrapped shortcode ? [myshortcode]<div class="map"></div>[/myshortcode] my shortcode code is function myshortcode_sc($atts, $content = null) { ...
2
votes
2answers
2k views

Creating a Slider Shortcode Based on Nivo Slider

I´m new with wordpress and I need to create a slider based on Nivo library. There I would like to create the shortcode using this syntax: [slider] [image]http: //www .domain.com/images/1.jpg[/image] ...
0
votes
1answer
211 views

Enclosing Shortcode is acting like self-closing

I'm sure I'm missing something simple, as I rarely use shortcodes, but I can't seem to get the following shortcode to work. I want it to be an "enclosing" short tag vs. a "self-closing", but its ...