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 ...
0
votes
1answer
309 views

Custom Fields - Boolean Display of True/False to Yes/No

I am importing fields from a Real Estate site. The Import of one Custom Field looks like this... Field Name after Import ---> assistedLiving Field Value ---> false to output the display in ...
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 ...
2
votes
1answer
32 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
1answer
264 views

<?php wp_register(); ?> Display logged in user as “Site Admin” apposed to Logged in user

I'm just working on a little hobby word-press site I have; <?php wp_loginout(''); ?> <?php wp_register( '',''); ?> In the top rite corner of my site, <?php wp_loginout(''); ?> ...
0
votes
1answer
113 views

Add an access code form to call a unique page based on page without registration

I've seen some similar questions, but they are not totally the same. If I missed in my search, please forgive me. However this what I have so far: I've created a form that has an input field for the ...
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 ...
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
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 ...
1
vote
1answer
302 views

wp_specialchars and wp_specialchars_decode in a shortcode plugin

I have written my first plugin, a shortcode plugin. I have read about wp_specialchars and wp_specialchars_decode but I'm not sure how to use them. The plugin read a shortcode allowing some parameters ...
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 ...
1
vote
1answer
941 views

Audio and video shortcodes not working properly

I'm having some trouble with Wordpress's built-in shortcodes for audio and video. When I embed a video, it basically gives me a black box and has a link to download the file at the top; when I embed ...
0
votes
1answer
620 views

Custom wysiwyg editor doesn't execute shortcodes?

I encounter this weird problem.. I'm trying to create a simple & easy website for a client. He wants to embed video's into the page. I use different customfields assigned to specific elements in ...
0
votes
2answers
248 views

Custom Shortcode and Button not Working after 3.9 update

I have added a new button that creates a short code but it seems that after the newest WordPress update, the button is not working any more. The button is visible but when someone clicks it, nothing ...
0
votes
1answer
413 views

Custom registration form in shortcode getting internal server error 500

I created a custom registration form which works fine when used as a custom page template. I needed it as a shortcode so I created a shortcode using the function below /* Custom shortcode */ function ...
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
235 views

Display MP3 as media using an URL from a custom field

I created custom field and placed this inside the loop: <?php echo get_post_meta($post->ID, 'ses', true); ?> But now the link is all text. I would like it to be like my theme does when I ...
0
votes
1answer
379 views

WP_Editor Shortcode Issue

I have created a front-end editor using wp_editor that functions as it should. Upon testing I have noticed that it is stripping out any shortcodes that have been inserted in the content. I have ...
0
votes
1answer
240 views

Calling widget using shortcode

I am using shortcode to call a widget. All is working fine but I want to pass some $instance(parameters) to the_widget. I am using $content to pass paramets to the_widget but I dont see any chnages ...
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
602 views

Insert wp gallery shortcode into custom textarea

Is there a way to insert wp gallery shortcode into custom metabox textarea ? I would like to have something like this: New metabox in post/page with textarea and below textarea there are a button to ...
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" ...
2
votes
1answer
838 views

Convert shortcode into html form

I want to convert this shortcode. [list-style="one"] a b c d [/list-style] To ouput like this one (html form) <ul class="one"> <li>a</li> <li>b</li> ...
3
votes
1answer
709 views

TinyMCE popup windows using WP functions

In my editor I would like to use a TinyMCE generated popup to insert in the textarea some complex shortcodes. I use the TinyMCE API to show the popup (bottom of this question). The popup is a PHP file ...
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( ...
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 ...
1
vote
1answer
414 views

Shortcode in AJAX popup

I am trying to use a shortcode from Ultimate Facebook plugin to display a FB connect button in an AJAX popup and can't seem to get it work properly. I searched and used the solution given by djb in ...
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 ...
1
vote
2answers
243 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
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
1answer
2k views

Auto Gallery from folder contents

I need to be able if this is possible, (i am a newbie at this so please take that into consideration) I want to create a Wordpress shortcode that will add an automated gallery of the contents in a ...
1
vote
2answers
462 views

How to add shortcode tags in single.php

In my theme has one shortcode tags to display tags of post and function to load content post. But in function doesn't include shortcode tag. Now I want to add it to function but i don't know how to do ...
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 ...
3
votes
2answers
2k views

Customizing gallery shortcode in 3.5

I'm trying to customize the gallery shortcode using the new gallery system in 3.5 and I'm having a bit of trouble and can't figure out where I'm going wrong. This is what I've got at the moment (in ...
1
vote
3answers
969 views

How to detect if a Shortcode is being called on a page?

I'm trying to push some variables to google analytics and would like to be able to detect if a shortcode has been included on a page at all. Anybody know a smart way going about this? Thank you! ...
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 ...
1
vote
1answer
260 views

Shortcode are not working in Option tree textarea

I am using option tree. In textarea, i place shortcode [layerslider id="1"] its not working, i also found same post replied by plugin author allow shortcodes in textarea in option tree applied ...
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
1answer
297 views

Unable to add TAB character to post?

I am using the CodeColorer plugin to display source code in my WordPress. I am trying to have my code indented so that it displays properly on the website. However, when I try to add the following ...
1
vote
2answers
1k views

Wordpress removing <p> tags?

I'd already come across a case where Wordpress added <p> tags. However now I'm dealing with the opposite situation. When I add [] shortcodes inside <p> tags WordPress automatically removes ...
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 !! ...