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
0answers
7 views

Output Number Based on Date that increases by X every week [migrated]

I need to do something similar to this date based math for PHP (below). All I need however is to output a number that changes every week. The starting number needs to be 5000 on week 34 of this year ...
2
votes
1answer
31 views

Enqueue Scripts / Styles when shortcode is present

What is the idea way to register/enqueue scripts and/or styles for use in plugins? I recently made a plugin simple plugin to add the user avatar/gravatar with a shortcode. I have different style ...
0
votes
0answers
14 views

video not displaying in template page by shortcode

I am working on WordPress 4.0.I am new to WordPress. I have created a template page to show single post by their post id for this functionality I have created a template page where all the posts are ...
0
votes
0answers
15 views

Shortcode from admin textarea to page

I've added shortcode to a page via a custom textarea in my Wordpress admin, but the shortcode is seen as text and gets wrapped in quotation marks, so it doesn't work. This is basically how I ...
0
votes
1answer
12 views

Only execute specific shortcodes

For my wordpress content editor I need to specify the shortcodes I want to get executed. Is there a chance to define an array of shotcodes which get executed and all other shortcodes in the content ...
0
votes
1answer
13 views

How can I define the output of shortcode attribute value?

I would like to create a shortcode that has predefined output for attribute values. For example: [shortcode att="value1"] output = <div id="value1">Predefined content for value1</div> ...
0
votes
2answers
34 views

check if the user is owner of current page

I am struggling with this little problem. I have a user profile page and I want to change some of the content based on whether it is my own profile og someone elses. This is my code to add a shortcode ...
0
votes
0answers
22 views

How to add codes to wordpress editor using jquery

I am learning how to write plugins. I am new to it. I have a shortcode generator that is used to insert shortcodes. It inserts codes (HTML/CSS/JQERY/PHP) inside shortcode and plugin highlights in ...
0
votes
1answer
51 views

Enable a short code in the custom meta field

I was wondering if there is a filter that allows me to enable short codes to work inside the custom meta fields in my posts. I know the following code enables it in widgets: ...
0
votes
2answers
33 views

How can I extract a word from page/post URL using shortcodes

I have this URL: www.example.com/dog-to-cat I have this Title: "Dog-to-Cat" In the post/page I would like to insert 2 images, dog.jpg and cat.jpg Also, in the text I would like to use the words "Dog" ...
0
votes
0answers
13 views

template redirect is not working from within a shortcode

I am new to WordPress. I want to show a custom template of a plugin using a shortcode. This template has my own login form with my own header and footer. I am using the following code: add_filter( ...
2
votes
1answer
59 views

Extending the Audio Shortcode

At the moment, the audio shortcode only allows four attributes, src, loop, autoplay and preload. When you upload an audio file however, it comes with pretty useful meta data such as the album art, ...
0
votes
2answers
48 views

What is wrong with my rewrite rule for a page URL with query parameters and short codes?

I'm new to WP programming and I am having trouble with what would be a simple problem in other environments. I created a page (cdl-manual) using the normal WP admin UI. Then I added some functions to ...
0
votes
1answer
23 views

How to prevent tabs from opening all at once

I'm stuck on a plugin I'm writing to show and hide content in large texts. The html below is loaded using shortcode in the text editor. <p>Completely synergize resource <a href="#" ...
0
votes
0answers
11 views

Post content obtained via get_post has shortcodes in html form

I have a plugin that fetches the content of a post and displays it inside a form for editing. It works well with a wide range of plugins but Nexgen Gallery is causing a weird issue. When I use ...
0
votes
1answer
36 views

Trying to write shortcode with get_post_meta but isn't working

I am trying to write a plugin with a CPT and have a shortcode to display the data. I can get 'the_title()' to work and display the title of the post type but using 'get_post_meta()' I can't seem to ...
0
votes
0answers
6 views

Custom caption/image shortcode disappears after switching between text-editor and visual-editor

I've written an custom shortcode for images. I use the filter image_send_to_editor to modify the inserted html. My code (mostly copied from the core) looks like this public function send_to_editor( ...
0
votes
0answers
12 views

Manage Custom Gallery Shortcodes using Media Manager

I would like to create multiple gallery shortcodes (ie [gallery],[gallery-grid],[gallery-slider],[gallery-simple],etc.) I know how to create custom gallery shortcodes, but I was would like to use ...
0
votes
1answer
54 views

Multiple do_shortcode in page template

Is it possible to nest multiple shortcodes with do_shortcode? Using visual composer and easytable with the visual editor, the classic editor displays: [vc_row][vc_column ...
0
votes
1answer
44 views

run shortcode in excerpt of single custom post type

Hi because of the way my theme is set up, I need to run a shortcode inside the excerpt of a custom post type (services). This is the code I have so far... function ...
0
votes
0answers
4 views

How to make this shortcode horizontal? [migrated]

i'm not really good in php and I can't find out how to make this shortcode horizontal and not vertical. I just want to show 3 videos on horizontal view. Right now, they're on vertical.. it take space ...
0
votes
0answers
8 views

Splitting content into two columns and shortcode-slideshow above

I am working on a custom template that will allow me to display a shortcode gallery in full width, and below that, the text from the content of the post in two different columns. I have been able to ...
-2
votes
1answer
28 views

PHP error in shortcode [closed]

Can anyone help me see the error in this code? I'm trying to implement a function via shortcode which I found here: <?php if (function_exists(‘wooslider’)) echo do_shortcode(‘[wooslider ...
0
votes
1answer
40 views

Shortcodes (with a space) added to php Sample

I have found only a small handful of posts from around the internet regarding Shortcodes and allowing them to work / execute within Admin Pages. So, I have made several admin pages in Wordpress, and ...
0
votes
0answers
44 views

Foreach inside shortcode not working as planned

I have a loop inside a shortcode to display the list of posts for each category (schedule-day) in a custom post type (schedule). The first category lists the posts in said category just fine, but ...
0
votes
0answers
17 views

Keep shortcode in shortpost contents excerpt

I'm really confused , when I use some default theme like twentyfourteen, shortcodes show well in shortpost, but when I use theme that someone design for me , in shortpost I get shortcodes as text !! ...
1
vote
1answer
47 views

Adding javascript actions to words in post content

I would like to have my blog run some JavaScript code when certain particular words are clicked on. One approach would be to include "onClick" handlers in HTML elements within the posts and disable ...
0
votes
2answers
44 views

Image and shortcode not showing in excerpt

I've paid to someone to create a theme for me. Everything works fine, expect the excerpt on category posts. It only shows an excerpt of the post ( not image ) and when I add a shortcode in the ...
0
votes
1answer
23 views

shortcode issue in the_excerpt

I had this custom shortcode working but it seems to have stopped. I had the code running through another shortcode that ran the loop for category posts. I have since improved the code so that it works ...
0
votes
0answers
41 views

Adding Shortcode Values to wp_head

I'm trying to create a shortcode with attributes which then places the values in meta tags for SEO purpose. I know there a some plugins for this use, but I want a simple and reusable/extendable meta ...
0
votes
1answer
33 views

Sanitize or treatment of string in editor via shortcode

I have a string of data that's getting passed to the page via shortcode, but the original developer of the shortcode did not account for how I'm necessarily planning on using the data on the page, ...
1
vote
2answers
40 views

Creating a shortcode based on users preferences

Background: Creating a dynamic shortcode based on user inputs. This shortcode should change the output of do_shortcode based on the fields the user selects. Example: On a page, a user selects ...
0
votes
0answers
7 views

How to add an image uploader to shortcode generator?

Creating a quote shortcode which requires an image. I managed to find shortcode generator tutorials which inserts simple stuff like tabs, columns or just quotes without images. How do I add and use ...
0
votes
2answers
28 views

Add variable in between do_shortcode

I'm using redux frmaework for my theme option panel. & I'm using meta slider for my homepage. I used this shortcode in my frontpage template to show the slider: <?php echo ...
0
votes
1answer
34 views

Creating custom shortcode

I'm trying to create some custom shortcode - I want to be able to have names and numbers of people I want to display on my website, but as a shortcode, so it doesn't have to be typed in again and ...
0
votes
0answers
25 views

Wordpress gallery shortcode - include author's images

I'm using the built-in wordpress gallery shortcode to display all images of a category -- documentation found here: Wordpress Gallery Shortcode Codex --- By using [gallery category="1"] How could ...
4
votes
4answers
254 views

Native “playlist” shortcode random playing… How?

I'm using the beautiful shortcode "playlist" in my site but I want the random playing of my audio files. What I use is this: [playlist tracklist="false" images="false" artists="false" ...
0
votes
0answers
15 views

Modifying Search to Exclude results from within short code or HTML

I've been struggling with this one for some time and I was wondering if anyone has any ideas on how to fix this. I'm not asking about stripping out short codes or HTML from the excerpt, that's fairly ...
0
votes
1answer
14 views

What is short code for following?

Here is my code and I want to know what is shortcode of this? Is it [login_form] or do we need to add something more? With [login_form] there is no output as result function pippin_login_form() { ...
0
votes
1answer
26 views

Input with spaces in Shortcode attributes overwritten by defaults

question seems to be similar to the one asked here but the answer went down a different path. Pretty much if a user enters a shortcode attribute with a space it will get overwritten by the default ...
0
votes
1answer
50 views

Gallery shortcode menu order fix no longer working on Wordpress 4.0

I currently use the pmc_gallery_menu_order_fix for setting the menu order for image attachments in galleries as seen here: Wordpress 3.5 Gallery Menu Order not set? With Wordpress 4.0, I am now ...
0
votes
0answers
28 views

positioning disqus comment box in a specific location using function.php file

I need to display disqus comment box just after the post end (there are some other related post plugins which also load after post content so i want to post the disqus above them. Earlier when i was ...
0
votes
3answers
244 views

Wordpress plugin shortcode not working

I have a shortcode defined in a plugin as follows: // [tag1] -> Some Longer Text function shortcode_example1() { return 'Some Longer Text'; } add_shortcode('tag1', 'shortcode_example1'); Now ...
0
votes
0answers
25 views

Separating Custom Template logic

Our site displays athletic race results, and each runner has a specific wordpress user account. We have custom plugin to handle building the html elements. A specific runners page can be seen via this ...
1
vote
1answer
24 views

Allow shortcode for custom widget

The following code allows shortcode parsing for 'text' widget: add_filter('widget_text', 'do_shortcode'); How to make a similar one for a custom widget? I tried the following one but it didn't ...
0
votes
0answers
21 views

Using shortcodes that wrap around code

I'm using a membership plug in that requires me to wrap protected pages in a short code [private]content[/private] I want to use this code in my template so my client doesn't have to manually insert ...
0
votes
1answer
24 views

Add category attribute to custom recent post shortcode

I have a recent post shortcode to display a custom post. Everything works fine so far. However, I would like to add a category attribute so I can specify which category to display. My working code is ...
0
votes
2answers
135 views

Using “excerpt_more” filter for a specific post type

I have used excerpt_more filter in a theme's functions.php and in a plugin's functions.php. Here is the code for the theme function theme_excerpt_more( $more ) { return '...'; } ...
0
votes
2answers
30 views

Having Trouble Running Query From Shortcode Using Tribe's Events Plugin

I am not getting any results back using this code, even though I am passing in correct values. Can someone please take a look? function webinar_list_shortcode($atts) { global $post; // Defaults ...
0
votes
1answer
16 views

Children Shortcodes?

I started creating WordPress plugins a few weeks ago, and I would like to know if it's possible to somehow "embed" shortcodes in some others. Basically what I want to do is create a table or a list, ...