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

Get post content from outside the loop with plugin shortcode usability

This is great for showing just the raw content... Get post content from outside the loop But i'd also like to apply shortcodes from various plugins to my content to affect the content. What would I ...
0
votes
3answers
61 views

Shortcode not showing anything

I am using this code, but nothing is being shown on the front page. It seems the shortcode is registered correctly though. function choose_ashtopbar() { ?><img src="/images/flag_globe2.png" ...
0
votes
0answers
19 views

Shortcode sort by category

I have created my own slideshow plugin. When a user adds a slide he/she can also add a category for that slide. I want by shortcode to sort by categorys sort of like [shortcode category="awesome"] ...
0
votes
1answer
73 views

Order Woocommerce Products by Latest Reviewed

In my Woocommerce site, I have: [recent_products per_page="16" columns="4"] which as the shortcode infers, orders products by the most recent. If I wanted to order my products by the ones latest ...
0
votes
0answers
27 views

custom widget plugin work but will not ouput html code on frontend

this custom widget plugin works but on the frontend if i input html codes in the form it will not show on frontend meaning on the frontend none of the html code will work nor show but the text will ...
0
votes
0answers
20 views

Take image from post content, which is image from shortcode slider

I have slider plugin which is added to a post with shortcode. I need to make the first slider image appear as post thumbnail on a home page of the site. First I check if the post has slider shortcode: ...
0
votes
0answers
27 views

Pinterest Pin it shortcode isn't working

function get_pin($atts) { $pinterestimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); return '<a href="http://pinterest.com/pin/create/button/?url=' . ...
0
votes
1answer
82 views

FontAwesome Shortcode isn't working properly

function addscFontAwesome($atts) { extract(shortcode_atts(array( 'type' => '', 'size' => '', 'rotate' => '', 'flip' => '', 'pull' => '', 'animated' => '',...
0
votes
0answers
21 views

How to sort by meta value, then by other meta value

I've been tasked with creating a 'fully automated' agenda for my client. The goal here is to create an agenda for a conference. The idea is that one shortcode will automatically populate the entire ...
0
votes
0answers
53 views

wp_query with shortcode do_shortcode out of while

I have a theme that uses an accordion that needs nested short codes. I'm trying to get it to work in my wp_query. [av_toggle_container initial='0' mode='accordion' sort=''] [av_toggle title='Toggle ...
0
votes
1answer
49 views

Wordpress plugin shortcodes not outputting anything

I'm in the process of creating a WordPress plugin that retrieves information from a Minecraft Server. I have the script to do this working fine as just a PHP script, however, when I try to convert ...
0
votes
2answers
103 views

How do I pass custom shortcode-extracted variables (taxonomy) into a query function for WordPress RoyalSlider?

Plugin in question: http://dimsemenov.com/plugins/royal-slider/wordpress/ Background: This is a great plugin, and it features a 'post' version where the slider pulls content from posts. However, the ...
0
votes
0answers
11 views

What Will Happen If I do This Hook-ing Pattern?

I am creating a custom hook inside a shortcode like this: do_action("my_custom_hook", $param_1, $param_2, $param_3); I then creating a file containing a class and hooks like the following: class ...
0
votes
1answer
57 views

Run PHP Results inside WP Shortcode

How would I put the below results into the WP Short code? PHP Results: <?php function endsWith($haystack, $needle) { // search forward starting from end minus needle length characters ...
0
votes
0answers
49 views

Conditions to run shortcode from plugin at theme

I´m new to WordPress developing and haven´t figured out, what is needed to run a shortcode from a plugin at the theme. The shortcode is registered at the plugin and the template code <?php ...
0
votes
0answers
52 views

Create custom shortcode inside short code

@toscho answered a similar question here: Shortcode return $content vs do_shortcode($content) There are other answers that are also close, but nothing has been helpful...hope someone here can help. ...
0
votes
1answer
59 views

Alternate text if shortcode returns no data

I'm using some plugins like beer list from Rescuethemes, and an event list, that use a shortcode to display a list of items. I put the shortcode into a Page, and it shows the data. If the shortcode ...
0
votes
0answers
64 views

How to use shortcode in Javascript?

I wrote a script that adds current user name to my button URL. To get current user, I use a plugin. When I use shortcode of plugin, [currentuser_username], then it displays the current user name. So I ...
1
vote
0answers
40 views

Adding a colorbutton in tinymce dialog with current api

I'm trying to add a colorbutton in a tinymce dialog box, which i was able to do with the help of using this stackoverflow question here: http://stackoverflow.com/questions/23511566/adding-a-...
0
votes
1answer
22 views

Hide some shortcodes on posts from back-end

I searched everywhere on the web and I didn't find something that could really help me. Here is my problem; I use a plugin that provides shortcodes to show a file in a page or a post. For each file I ...
-2
votes
1answer
55 views

How Do I create a shortcode to dispaly a go to top button on any page or post

I am creating a wordpress site, and on every page I would require go to top button. So I was thinking to get some shortcode to do this so that I can insert anywhere. Thanks
0
votes
2answers
64 views

What is the proper way to include Bootstrap when executing a shortcode

I am trying to include bootstrap only when the short-code function executes. It gets included but it affects the other tags of the theme. The only way I can get around this is including bootstrap ...
5
votes
1answer
139 views

Tinymce - How to hook before or after live shortcodes rendering?

When the edit post page loads in WordPress admin, I launch a js process which alters the TinyMCE editor’s contents. Recently I've come across the WordPress live shortcode previews which break my code,...
0
votes
2answers
83 views

How to make a conditional statement within $output in shortcodes.php?

I've got a shortcode that's got HTML in an $output field that's lovely. I just want to add one paragraph to it at the bottom that's conditional on this statement: <?php if ( get_post_meta( ...
0
votes
0answers
105 views

How to output a PHP file values by shortcode?

I'm trying to output the values of two custom fields created by ACF plugin in a custom post type. I actually need this to be displayed in a popup window. wordpress popup plugins don't support php code,...
0
votes
1answer
108 views

Insert shortcode between '<div>'

I would like to insert a shortcode in the code just after "$cb_post_views" so the shortcode appears on the same line if ( ( $cb_meta_onoff == 'on' ) || ( $cb_posts_on == true ) ) { $cb_byline ...
1
vote
0answers
31 views

Tinymce shortcodes within shortcode contents

I am using wp.mce.views.register to create a simple view for my shortcode in the tinymce editor, this works fine but i am looking for a way to have "nested" shortcodes e.g. [column_3] [info_box] ...
0
votes
1answer
182 views

Hook WP_Embed run_shortcode

I want to hook run_shortcode inside WP_Embed, but I can't figure out how to pass $tag argument to add_filter global $wp_embed; add_filter( '$wp_embed->run_shortcode' , 'my_run_shortcode' , 0); ...
0
votes
0answers
112 views

Navigation (wp_nav_menu) refuses to nest within parent element

I have a shortcode that (among other things) echoes out a menu using wp_nav_menu like so if ( ! function_exists( 'foundationPress_main_nav' ) ) { function foundationPress_main_nav() { ...
0
votes
1answer
76 views

style css to header for shortcodes

We have some shortcodes which are generating CSS styles. there are like options ("Title color, Title box border color,font-size, font-weight"). When user setup the options, it will be generated ...
0
votes
1answer
115 views

How to call a post's metadata in shortcode.php?

I'm not a terribly advanced WordPress developer, but I can kind of futz my way into a solution most of the time. This time, no such luck: I'm trying to write a shortcode to display a custom post type ...
0
votes
1answer
47 views

How to create a custom taxonomy using a shortcode?

I want to create a custom taxonomy using a shortcode. I don't want to use any plugin. I use this code in my plugin: add_shortcode('taxnomy','project_taxonomy_init'); add_filter( 'widget_text', '...
0
votes
1answer
301 views

How to add and submit input fields using a shortcode?

How can I add and submit the post without user login? By that I mean an offline user can add some content on WordPress and submit it, like simple forms in PHP. I tried this code: public function ...
1
vote
1answer
95 views

Searching in shortcode contents

Can WP search be extended to search in shortcode generated contents? If it is not a possibility please guide if replacing default WP search with Google Custom Search will solve the problem of ...
0
votes
1answer
52 views

Put php variable in shortcode

I want to put the variable in the shortcode, but it is not working. What i have done wrong. <?php $calendar = getCalendarTag();?> <?php echo do_shortcode( '[ai1ec tag_name=".$calendar."]"]' )...
0
votes
1answer
39 views

Pull in excerpt with shortcode

I am working with a plugin that provides a shortcode with only a couple of parameters. I'm using [list-shows] shortcode. I would like to also pull in an excerpt of the content. I was able to add in ...
0
votes
0answers
119 views

How to show single post from custom post type with shortcode

I know the topic have been around before, and have read extensively on the subject, without finding a complete solution. My goal is to have a shortcode that calls a single post, from my custom post ...
0
votes
0answers
33 views

Duplicate short code duplicating some values only

I've created two short codes which are used as follows: [foo_tabs] [foo_tab]{Tab 1 Content}[/foo_tab] [foo_tab]{Tab 2 Content}[/foo_tab] [foo_tab]{Tab 3 Content}[/foo_tab] [/foo_tabs] ...
0
votes
1answer
42 views

WordPress Payment link will not transform PHP vars into values

My WordPress site runs with WP 4.3 + Avada 3.8.6.1 Theme. On a subscription page there are several payment buttons with links to a PsP. I have to know the ID - Name - Email from each user. The page ...
0
votes
1answer
44 views

Trouble implementing python on WordPress

I followed all the directions in this post and I still cannot get a result to display. I know PHP is doing something, because there is no text displayed whatsoever. The result has a header and no body ...
0
votes
0answers
36 views

Review plugin configuration

I bought the Reviewer Plugin addon I want to display list of reviews and review form but I don't know why it doesn't work. Here are the docs. I try to use shortcode like this: [rwp-review id=“…”] ...
0
votes
0answers
18 views

Is there a way to tell if a shorcode's handler is being run before or after the content formatting filter?

Apparently (based on what I observe) WordPress runs every shortcode handler twice for every time that shortcode appears --- once, preliminarily, before the output is processed (and the output of the ...
0
votes
1answer
109 views

Where to find the code used to render a page that has a shortcode and a template defined?

I'm new to WP and trying to configure the 'My Account' page on a WP site. The site uses the Paid Memberships Pro (PMP) plugin. In the WP admin console > Pages, there is a page called 'My Account'. ...
0
votes
2answers
374 views

Can you add shortcode as a menu item link?

I want to use the Ninja Forms pop-up modal from a link in my menu. I used this plugin to make shortcodes work in the menu but couldn't get it to work: https://wordpress.org/plugins/shortcode-in-menus/ ...
0
votes
2answers
168 views

Showing content from one page on another

There are many posts that seem to strike around this area, but I'm more and more confused by each one I read. I have a page that shows the "Terms of Service" (id = 1086). I would like to display the ...
0
votes
1answer
22 views

Combining similar shortcode functions?

function customfield_1_shortcode( $atts ) { if ( get_post_meta( get_the_ID(), 'customfield1', true ) ) { $customfield = get_post_meta( get_the_ID(), 'customfield1', true ); ...
0
votes
0answers
292 views

How to retrieve sticky post with Visual Composer's loop builder?

So I have a simple custom shortcode function build under Visual Composer with vc_map. <?php /** * Blog Posts * */ if( function_exists( 'vc_map_get_attributes' ) ) { $atts = ...
0
votes
1answer
226 views

Reload wordpress shortcodes

Let's say I have a page, and inside that page, I have inserted shortcodes/plugins for a chatbox, twitter feeds, fb feeds, tumblr, etc. The shortcode accepts parameters for different hashtags to ...
0
votes
0answers
261 views

Pagination of Custom Query inside a Shortcode on a Custom Post Type Page (singular)

I've done dozens if not hundreds of searches regarding my problem, but didn't find a solution anywhere. I really hope you can provide me a solution, that would be great! Thanks for reading. Heres ...
1
vote
1answer
111 views

creating shortcode to pull json array

Frankly - this may be a duplicate of another question I have out there. Sorry if it is. I'm learning this site and PHP/Wordpress development. I have partnerships with local sites that use JSON and we'...