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

slide_panel id… shortcode not working [on hold]

When I use the tag such as [slide_panel id='825'/ ] with the 825 being the ID of the panel data, Nothing shows up on the webpage. Here you can see the problem: http://imgur.com/a/lToiJ This has ...
0
votes
2answers
46 views

Get first video from the post (both embed and video shortcodes)

The goal is to grab the first video (embed or shortcode) from the post. So we need to check post content if it has embedded videos ( supported by WP ) or [video] shortcodes. Multiple videos and embeds ...
0
votes
1answer
21 views

How to create a shortcode to display a category description?

I'm at a loss on how to create a simple shortcode out of the following code: <?php echo category_description( $category_id ); ?> Looking to create something in the line of: ...
0
votes
0answers
24 views

Different ID in every shortcode

I am trying to make an Instagram-box on the author profile of my page. I need every profile to be different, and to do that I need to change the ID in my Instagram Widget-shortcode on every page. The ...
0
votes
2answers
20 views

How Wordpress Displaying Shortcode In Post Content?

I want to know how wordpress displaying shortcode inserted in post content, so I can replicate what it does and implement it to my plugin. Here is an example: I want to show shortcode inserted ...
0
votes
0answers
11 views

Why would one WP installation have an issue with a space in a shortcode variable?

I found a workaround, so the client site is fixed, but I don't like the fact that I don't have a cause, so I'm hoping one of you might have experienced this and know the cause. The client suspected ...
0
votes
1answer
24 views

Call/Run a Shell Script from Wordpress Page/Blog

Is it possible to run a shell script from a Wordpress page or blog post? There doesn't seem to be a plugin available or way to do this. The script would need to take values inputted in the page ...
0
votes
0answers
8 views

Undefined offset from theme function with preg_match

I am trying to process ifttt [source_link] shortcode with function I found around. It works, but annoys in admin page with this error code: Notice: Undefined offset: 2 in /home/.../functions.php ...
0
votes
1answer
33 views

<p> tag breaks shortcode output (other solutions don't work)

I just encountered weird problem. My shortcode output which is something like '<span class="link_container"><a href="#">'.$content.'</a></span> <div ...
0
votes
0answers
16 views

Display page/post content with Ajax - Shortcode Issue

Sorry for my english :) I am trying, for my new portfolio to load content post on home page with ajax. It's almost ok. I got issue with shortcode. I try many thing (iframe, but it not i'm looking ...
0
votes
1answer
21 views

Wraping $content into link with shortcodes

I'm working with shortcodes in WordPress and I struggle with one problem. I'm trying to wrap my $content into tags, but it doesn't work properly. So here is my shortcode function: <?php ...
1
vote
1answer
52 views

Execute shortcode twice in the same page

I need help with a shortcode question. I have this code: add_shortcode("archive", "archive_render"); function archive_render($atts) { extract(shortcode_atts(array( "rientro" => "no", ...
0
votes
1answer
15 views

Can not get shortcode content in function

I use a shortcode on my page like [homepage_featuredproducts]test[/homepage_featuredproducts] In my functions.php function homepage_featuredproducts( $atts , $content = null ) { ...
0
votes
1answer
10 views

Expanding a function to call a plugin or show a link

I have added the following code to my functions.php to validate if a user is logged in before allowing them to fill out a form: function my_members_only_shortcode($atts, $content = null) { if ...
1
vote
0answers
23 views

How to have different captions for same image, for galleries?

Seems like I can't have the same image in different galleries with different captions. Is it possible to make that working in any way? Like if we could change the shortcut code that Wordpress is ...
0
votes
1answer
36 views

shortcode order for event custom post type

ok im working on a website using post type event with post_meta event_start_date, i created a shortcode and everything is displaying fine except for it displaying in order, it seems as its not ...
0
votes
0answers
18 views

How to output different content of page on different places in my template

I have a special template for my homepage. There are many different boxes, and in every box I want to have different content. That should be possible to create over the backends page edit function. ...
2
votes
1answer
40 views

Shortcodes: Pros and Cons

We're about to start developing a new relatively simple widget in the form of a plugin for a specific client job - but want to create something that will be usable on future projects. This plugin ...
2
votes
1answer
38 views

Always use <figure> for post images

The default behavior when it comes to full-width images in posts is this: If you insert an image alone, this HTML structure is produced: <p><img/></p> If you insert an image with a ...
0
votes
0answers
20 views

Which post called the shortcode

So, I have layered content using shortcodes (Post_A is using a shortcode to show the content of Post_B, which is using a shortcode to show the content of Post_C) Is it possible for the Post_C ...
0
votes
0answers
20 views

Possible to add author avatar to header so displays for all, not just registered/logged users?

I have a wordpress site and here is the page where I am trying to display the avatar & user name in the header, listmenow.com/default Is it possible to display the avatar & user name for the ...
0
votes
1answer
62 views

Wordpress Gallery with ID's Shortcode not Working

Currently, the code below runs well if I use the old gallery shortcode that looks like this [gallery] . However, after Wordpress 3.5 update gallery shortcodes now include the image IDs by default that ...
0
votes
1answer
53 views

ACF Shortcode bringing in my shortcode is adding unnecessary line breaks

At the VERY core, my question is - how to remove linebreaks on a single ACF field that is inserted with the ACF shortcode. I have a lot of "shortcodes within shortcodes" here so I will walk this ...
0
votes
0answers
23 views

How to display single arbitrary facebook post with a shortcode?

Does anyone know of a plugin that can show a single recent Facebook post with a shortcode that works something like this: [fb-recent post="0"] [fb-recent post="1"] where post="0" refers to the most ...
3
votes
1answer
107 views

How to display random users with avatars

I adapted a little a function to display a number of random users with their avatars with a shortcode. It works, but something is not good. Sometimes it displays with one user less than I want (just a ...
0
votes
0answers
37 views

how to pass variable of shortcode of wp to javascript

I have create a shortcode of google map in my theme. whole code is below. function google_map_view_scripts() { wp_enqueue_script( 'googlemap', get_template_directory_uri() . ...
0
votes
0answers
6 views

Why can't wp.mce.views system register an element shortcode?

The Wordpress wp-view system is a neat way to integrate wysiwyg shortcodes into the editor - Wordpress uses it for gallery and other shortcodes. But unfortunately it seems it only works for [shortcode ...
0
votes
1answer
60 views

Looking to Customize YouTube Video Embeds

I am looking to embed youtube videos into my posts and publish them as custom post types (videos). I would like to be able to append the options for getting rid of the information bar, starting the ...
1
vote
3answers
34 views

How to display the site name in a WordPress page, or post

I'm trying to create a set of legal pages, that I can add to any WordPress site. Within these pages, I want to mention the site name. Is there a built in shortcode or something, that I can include in ...
1
vote
2answers
29 views

Shortcode API: How to get name that matched shortcode RegEx?

I am looking for a way to reproduce what is described in the documentation: An overloaded shortcode callback. According to the docs, the $atts array will contain the string that matched the shortcode ...
1
vote
1answer
95 views

apply_filters('the_content', $content) vs do_shortcode($content)

Lets say I have a theme option or custom postmeta text area. Now I want to execute multiple shortcodes, general texts, images etc. What will be best practice and why? Option 1: $content = //my text ...
0
votes
0answers
22 views

Wordpress add menu to page content using editor

I can manage custom menus in Appearance -> Menus Then, I can add any of these custom menus to the page content by inserting a shortcode like this in the editor: [menu name="Menu1"] Question: How ...
0
votes
2answers
15 views

Nested Wordpress Shortcodes of Different Types

How would you do a shortcode wrapper that can differentiate between different nested shortcodes. [teaching_tool_wrapper param1="true" param2="false"] [chord param1="something"] [scale ...
0
votes
0answers
29 views

How to open media browser from tinyMCE window?

I'm trying to create a shortcode to embed audio files, with custom data as copyright owners and year, etc. It's a basic tinyMCE window with textboxes to insert the information, and the URL of audio ...
0
votes
0answers
23 views

Shortcode not accepting atts

i have been working on a shortcode and I am having trouble passing $atts to it. i can't figure out what i am doing wrong. To say it another way, i cannot update 'input_product_image_ID' to a ...
1
vote
1answer
22 views

Is it important to sanitize inputs in a shortcode that will be used in site that only I will post to?

Is there any security risk in not sanitizing shortcodes in a wordpress site if I am the only one who has access to the admin panel?
0
votes
0answers
22 views

display-posts shortcode attributes have no effect

I need to list some specific posts on a page. I discovered the [display-posts] shortcode feature but it doesn't seem to work. Here's what I'm trying to do: [display-posts posts_per_page="2"] ...
1
vote
0answers
51 views

Wordpress Shortcode callback function with a plugin

I am working on a plugin and the plugin currently works great on the admin section but I'm trying to extend the functionality to the front end and using a shortcode to use the same functions. I have a ...
1
vote
1answer
47 views

How to create a shortcode with 1 parameter (atts)

I am having trouble getting a shortcode to work with 1 attribute. Here is my shortcode [sme_user-email userID="2"] Here are my scripts - none of them work. function getUserEmail_func($atts) { ...
0
votes
1answer
73 views

How disable checkbox when listbox value changes in tinymce

I'm creating a custom popup in tinyMCE for WordPress, to insert video shortcodes, so I have a list of websites (YouTube, Vimeo, Vine, and others) in a listbox, and a checkbox to let the user decide to ...
0
votes
1answer
25 views

Shortcode and whitespace formatting problem

I'm having a problem with shortcodes on a website, currently you enter a shortcode in the post edit screen like the following: [tab name=Itinerary] This will output a tab such as: However as ...
0
votes
1answer
16 views

Video Shortcode Only Returning a Link

I am trying to dynamically load a video in the media library using the built in MediaElement player. To do this, I am using the do_shortcode() function to run the [video] shortcode and build up the ...
0
votes
0answers
16 views

Create a random list of html items within a shortcode in the functions file.

I'm trying to create a function that randomly pulls lines of code for a list of HTML items. Basically, I'm going to have a list of 50 or 100 images with hyperlinks associated with them. I'd like a ...
0
votes
1answer
51 views

Extract attribute values from every shortcode in post

I have multiple shortcodes in the post: [section title="first"] [section title="second"] [section title="third"] I want to extract all title values (i.e first, second, third) from external ...
0
votes
2answers
36 views

Shortcodes in custom post fields without the_content()

I have created a custom post type which doesn't use the_content() to display anything in the front-end, just using echo's. The user enters data into a text-area field in the plugin admin back-end, ...
0
votes
2answers
11 views

How do I add an article to specific page?

Regardless of it being WooCommerce or WordPress, I want to add a couple articles to specific pages, so they show there instead of the images that are there now. Homepage I know, I'm supposed to use ...
1
vote
1answer
18 views

Forcing max-width for image captions

I've implemented a filter to my image captions based on this question I asked a few days ago. How can I slip into the caption the css style of max-width as well? I think it can be done with ...
0
votes
1answer
25 views

Correct way to pass information between seperate shortcode functions

I contain all my short-codes in (the equivalent of) functions.php. I want to have one short-code function share information in an object, and another able to access that object. The shortcodes may or ...
0
votes
1answer
28 views

Nested shortCode functions in the functions.php file

I'm trying to get a shortcode function (newStuff) to display inside of another function (oldStuff), but I'm running into trouble. Both shortCode functions are listed below, as well as what I've tried. ...
0
votes
1answer
48 views

the_content() shows shortcode instead of parsing it

I'm loading a given post data via Ajax. The problem is that a plugin's shortcode is not parsed. The plugin is "Ninja Forms". It outputs [ninja_forms_display_form id=5] Instead of rendering the ...