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

Custom Info Box at end of posts?

I'm pretty new to WordPress so there are some parts of it I have difficulty working with. I run a small scale gaming niche website which focuses on just a small group of video games, and what I'm ...
0
votes
1answer
17 views

Wordpress Short code for List style

Hi I am using following short code to generate a list [ul style="5"] [li]Surgical Internship: Yale University – New Haven, Connecticut, 2001 [/li] [li]Orthopaedic Residency: Yale University – New ...
0
votes
1answer
83 views

Is there a good way to load tiny_mce_popup.js through editor.windowManager.open?

I need to load tiny_mce_popup.js in my page video.php. The page video.php is a popup. {text:'Video', onclick: function() { editor.windowManager.open({ title: 'TinyMCE', ...
0
votes
0answers
26 views

Enqueue script in ajax shortcode call

I load a template part via ajax which contains a shortcode, which needs a javascript file to draw something. How do you enqueue it? Should I echo <script></script>? But what if it's ...
0
votes
1answer
327 views

Adding shortcode inside Visual Composer raw HTML [closed]

I am using Visual Composer and have entered HTML into a Raw HTML element for a custom pricing table - I now would like to be able to use the World Currency plugin to show prices in different ...
0
votes
0answers
23 views

WordPress core playlist function not showing artist and album info

On my test environment, all the information from the ID3 tags show up just fine on the playlists using the core MediaElement.js player. ...
1
vote
1answer
74 views

How to display the comment_form with a shortcode while removing it from its default position?

I was already able to have the comments form show in the post content area with this code, which allows me to use the [wpsites_comment_form] shortcode: add_shortcode( 'wpsites_comment_form', ...
0
votes
2answers
49 views

Custom shortcode not displaying categories and correct date

I wrote a short code to work with an event plugin (the plugin creates the custom post type of event). I want to pull all future events from the database that use a specific category and list them on ...
0
votes
1answer
30 views

Syntax error in a shortcode function

I'm trying to implement a taboola ad unit in a shortcode function, but I'm getting a syntax error. Below is the function that creates the shortcode. The code is in my functions.php file. Can someone ...
0
votes
1answer
34 views

How to create shortcode for auto login after registration

I've a code for auto-login after registration which is: function auto_login_new_user( $user_id ) { wp_set_current_user($user_id); wp_set_auth_cookie($user_id); $request = ...
0
votes
0answers
16 views

Split on self closing shortcode and retrieve args,

I'm writing a custom lesson post type for teachers that may or may not be technically minded. I want to make it as simple as possible for them to divide their lesson into segments that will be ...
0
votes
1answer
39 views

Gallery with shortcode not showing

I've created a gallery in a static page of my wordpress site, like this: [gallery type="rectangular" ids="129,13,126,34,130"] This page has ID=63, so I'm trying to display this gallery in my ...
0
votes
1answer
50 views

Some doubts about gallery shortcode in Wordpress

I'm using Jetpack with Wordpress and creating a gallery. The thing is that I don't want all the images from that gallery to be shown, only the last 50 of them. Is there any solution to this using just ...
0
votes
1answer
41 views

Multiple instances of the shortcode on the same page

I have this shortcode: function fm_requestebook ($atts) { $atts = shortcode_atts(array( 'cf7' => null, 'filename' => null, 'event' ...
0
votes
2answers
30 views

Access the resized images generated by `add_image_size()`

I have set up some shortcodes to make things simpler for the user. It wraps up some bootstrap markup and just lets you put the h1, some img urls, etc in it without getting too close to the markup. ...
3
votes
2answers
62 views

Audio or playlist shortcode condition according to the amount of files on attachment page

My reason for doing this is for a music & entertainment site where users will have the ability to share music and videos on other websites via embed code. I'm using the audio.php and video.php ...
0
votes
1answer
32 views

get_pages() Returns Only One Item

I'm trying to list the children of a specific parent page for use in a shortcode using get_pages(). Unfortunately, only one page is being displayed though there are many more that should be displayed. ...
0
votes
0answers
22 views

Do a summary based on sections in a post

I wonder if it's possible in wordpress to create a summary, let's say at the begining of the post, that displays links to all the post section ? Example: [summary title="Summary"] [section]Title ...
-2
votes
1answer
49 views

Shortcode conversion to hrml when post is published

I am creating posts in wordpress using shortcode. When user looks at post, the data is displayed by pulling from database. But we also send email to users when post is published. In this post, we sent ...
0
votes
2answers
217 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
64 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
34 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
24 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
13 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
54 views

Call/Run a Shell Script from Wordpress Page/Blog

Is it possible to run a Mathematica 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 ...
0
votes
0answers
22 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
72 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
58 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
26 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
82 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
37 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
18 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
53 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
65 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
22 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
57 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
113 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
21 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
46 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
129 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
112 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
43 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
139 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
62 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
22 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
91 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
60 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
53 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
240 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
97 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 ...