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

why full page is being feedbacked when using ajax?

Having kind of strange problem. The code i'm using in the plugin is as below //user login form add_shortcode('ajax_login', 'atest'); function atest(){ global $load_js; $load_js = true; return ...
0
votes
1answer
10 views

Shortcode for showing childpages

I found this code snippet that shows childpages only. It works great, doing exactly what i intend it to do. I want to be able to place this around the site, but i cant place PHP inside the Rich-text ...
0
votes
1answer
13 views

How to Get Shortcode in Excerpt to follow Document Flow

I have the following Post - Excerpt: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sagittis augue sed orci efficitur convallis at sit amet lectus. [my-short-code] I have the ...
0
votes
1answer
21 views

Problem in shortcode outputting content

I`m trying to make a shortcode that output the a div containing content from Custom Post type . I'm able to output the content but content does not output within div . the shortcode output the div and ...
0
votes
0answers
17 views

Placing PHP inside Theme Accordion

I have already posted this on Wordpress.org support (with no response yet) however on the advice from someone they thought this website maybe better suited. I realize that short codes should probably ...
0
votes
1answer
30 views

Shortcode to get featured image of specific id post

So I'm trying to create a shortcode to get specific id and its featured image to display it in a specific page. I want to use shortcode to make it easier for the user to add any post in this page. ...
0
votes
0answers
25 views

Modify shortcode to work with custom taxonomies and slugs

I am using this code which works fine with posts but I am looking to modify it so that the user can specify in the shortcode: custom post type name taxonomy name slug of taxonomy category For some ...
0
votes
0answers
10 views

Replacing Gallery Shortcode with Foundation's Clearing

Using wordpress 4.1 and Foundation 5, and attempting to replace the stock gallery shortcode with foundation's clearing. In debugging mode, I get a notice of: Strict Standards: ...
3
votes
0answers
53 views

Insert Images at Master Uniform Height

I'm trying to figure out a way to insert images from the media library into the post editor at a uniform height... but by selecting one option. For example, I set a height like "300" somewhere (like ...
0
votes
1answer
74 views

Catchable fatal error: Object of class stdClass could not be converted to string

I am trying to get the slug of a custom taxonomy for the current post that this shortcode is embedded in if the user doesn't define the slug he wants explicitly in the shortcode. function ...
0
votes
2answers
26 views

Shortcodes Keep Wrapping in <p></p>

I've been ripping my hair out for hours and now I'm almost bald! :p Any time I try to insert any shortcode into the visual editor (on its own line), it wraps them in <p></p> tags. This ...
0
votes
1answer
18 views

Shortcode not getting replaced

I used this to obtain my post: $the_slug = 'kontakt'; $args=array( 'name' => $the_slug, 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' ...
0
votes
1answer
22 views

Shortcodes won't work on live environment

I am currently developing a plugin that uses shortcodes. On my localhost everything works fine just using the shortcode, for example: [bbit bandname="Lady Gaga"] This shows a list of ...
0
votes
0answers
52 views

Get Current CPT taxonomy category in shortcode

I am calling my shortcode like this which works fine but I would like to avoid defining the slug, and instead picking it up automatically from the current custom post type that the shortcode resides ...
0
votes
1answer
19 views

Cant fix this Warning: Invalid argument supplied for foreach() in [closed]

I dont know what i have doing wrong. everything work fine. but i receive a warning in page Warning: Invalid argument supplied for foreach() in /public_html/wp/xtheme/wp content/themes/tab.php on line ...
0
votes
0answers
9 views

Shortcode displaying content at top of post [duplicate]

I've got a simple little shortcode plugin which should return the contents of a php file via object buffering. The code is an email form which was supplied by a third party. Here's take one: ...
0
votes
1answer
33 views

Automating the process of shortcode generation in a plugin - how is it done?

Automatic short code generation is a technique that I see many plugin authors use but unfortunately, I have yet to come across a tutorial that details this subject so I am hoping that someone in this ...
0
votes
0answers
15 views

How to display the comments_template with a shortcode and only on that location (remove from default location)?

How can I mimic the code below in order to display the comments list (comments_template) with a shortcode? add_shortcode( 'wpse_comment_form', function( $atts = array(), $content = '' ) { if( ...
0
votes
1answer
17 views

find shortcode inside content of post

I've a post with a video, contained inside the content. So, the content of my post is like: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur aliquam quam sed imperdiet viverra. In ...
0
votes
2answers
34 views

Is shortcode_unautop() broken?

shortcode_unautop() in /wp-includes/formatting.php is supposed to find shortcodes in a block of text and remove wrapping paragraph tags from them. I've been having issues with paragraph tags making ...
0
votes
1answer
62 views

Modify shortcode to work with custom post types

I have this shortcode which works fine with posts but I need to modify it to take arguments for custom post type and custom taxonomy. <?php // [blog_posts] function ...
0
votes
1answer
24 views

Does registering multiple shortcodes impact performance?

There are a range of plugins that register multiple shortcodes, sometimes up to 30. What are the performance implications of having multiple shortcodes registered? I would assume that having a huge ...
0
votes
0answers
12 views

Wp-editor box within options page

I'm trying to put together a quick plugin where I have a Options menu with a wp-editor box, and than content gets output via a shortcode. So far I've added a menu, created an option page, and setup a ...
0
votes
1answer
24 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
13 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
63 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
23 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
137 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
20 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
46 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
42 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
26 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
28 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
31 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
48 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
29 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
22 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
47 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
26 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
21 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
46 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
135 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
44 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
12 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
41 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
18 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
60 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 ...