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

do_shortcode in page-home.php not executing plugin shortcodes [on hold]

I'm using Wordpress Ad Manager's short codes to place ads on the home page via a custom theme options page that I made. [video] works, [audio] works, [revslider MySlider] works. [ad s7] doesn't.. ...
1
vote
1answer
41 views

Making Quote Plugin more efficient

I've been working on this plugin the past couple of nights and have been jotting down idea's of how to improve it. My knowledge of php isn't the strongest and I'm learning as I go along most of the ...
0
votes
1answer
28 views

Adding body class when post contains a specific shortcode

Simple shortcode function : function my_shortcode_function($atts,$content=null){ // Do something return $content; } add_shortcode('my_shortcode','my_shortcode_function'); I wonder how to add ...
0
votes
0answers
15 views

HTML output on shortcode [duplicate]

I am using Olevmedia Shortcode plugin and I created my custom shortcode. When I included the custom shortcode inside a column shortcode of the plugin, the content of the shortcode is on the outside of ...
-1
votes
0answers
15 views

WooCommerce order by “rating” [on hold]

I have this shortcode, to show the featured products, but I want to order them by the rating, anyone know how can I do this? Shortcode: function featured_products_shortcode($atts, $content='') { ...
0
votes
1answer
32 views

How to extract the variables out from “add_shortcode” function?

In Wordpress, lets say i have a custom Shortcode function, like: function foobar_func( $atts ){ //whatever required processings here... $foo = "the value is foo!"; $bar = "the value is ...
-1
votes
0answers
15 views

What is the best code highlighter plugin for blogger site [closed]

i have a blogger site.i want add a code highlighter plugin at my blog post. Some can be tell me ,which one is best??
0
votes
0answers
36 views

short code function stopped working when switching to php 5.4

I developed a wordpress site on a remote staging server (running php 5.3) and everything was working as expected. When I migrated the site to the live website server (running php 5.4), my short code ...
0
votes
1answer
30 views

HTML Inside of Shortcode Breaks Shortcode Output

Lots of Googling has still not yielded a solution. Here is the problem: I have created a custom Wordpress shortcode to use inside my Thesis theme. The goal of the shortcode is to allow users to wrap ...
0
votes
0answers
16 views

Shortcode error using PHP [closed]

I am trying to insert a button that links to the contact page in the header of a site i am working on. I am not to up on php but this is the code i have entered but it does not work : <?php ...
1
vote
2answers
29 views

(solved) how to have the gallery shortcode output one single UL list instead of several DL?

I need the built-in gallery shortcode to output UL instead of DL. How can I do it? I know I can use the 'post_gallery' filter, but that means almost duplicating the media's gallery_shortcode function. ...
-1
votes
0answers
12 views

How to link to blog posts?

I have a custom page which is the home page of the site. I display 4 articles on the page using - [blog_list number="4" columns="2" show_style="0"] I want to add a button below this which will ...
0
votes
0answers
29 views

Members only Passthrough

So I made a members only site with wordpress by redirecting everything to the homepage and adding a registration/login page to my homepage. This was added as a plugin: /* Change Login URL */ ...
1
vote
0answers
13 views

Getting the number of nested shortcodes [duplicate]

[slider] [img] [img] . . [img] [/slider] Is there a way that I can get the number of nested shortcode in a parent shortcode Thanks
0
votes
0answers
14 views

Create shortcode in Child Theme?

I have created a child theme, and I am trying to add a shortcode to its functions.php file, by doing this: // functions.php of child theme <?php include(WP_CONTENT_DIR . ...
-1
votes
1answer
18 views

Overwrite functions.php of a theme - What if the theme is updated?

I have added a shortcode inside a functions.php file of my a Theme. I am wondering that if the theme changes, it might overwrite the current functions.php file. So, is this true? If so, where should ...
1
vote
1answer
37 views

Custom shortcode being executed when saving page in wp-admin

I'm working on a custom shortcode: [abuzz-store slug="woolworths" fields="description,level,phone" more="true"] The shortcode is working correctly on the website frontend. However, I can no longer ...
0
votes
0answers
28 views

apply_filters to content but ignore shortcodes

I want to prepare my content added via wp editor so it displays nicely, so I use apply_filters like so: $ld = apply_filters('the_content', $ld); That works fine for the page, but in the backend ...
-1
votes
0answers
11 views

Show entries in a category

Help with the following code. sirbe this code to display thumbnails untimas tickets. what I want is to do is to display the entries in a single category. function shortcode_recientes($atts, $content ...
-1
votes
1answer
29 views

How to read a page's “Shortcodes” from the Template File?

Lets say i have a Page, and it contains some shortcodes like: [myshortcode foo="bar" bar="bing"] [anothershortcode foo="bing" bing="bar"] Then how do i read those from my custom Template File, to ...
1
vote
2answers
55 views

Change Wordpress Shortcode added in to post

Problem: I am using a plugin that turns the wordpress gallery into a cool slide show. How ever, every time I make a gallery - Wordpress add this code to the post . [gallery ids="334,332"] I need ...
0
votes
1answer
16 views

'&' causes an error in my shortcode when I list the content of the page

I would like to list the specified pages with my shortcode, but the problems are with the '$' charachters. function get_page_func( $atts ) { extract(shortcode_atts( array( ...
1
vote
1answer
26 views

Can I wrap an unordered list inside a shortcode?

So, I created an events page for my client that holds lots of details about events. We found no particular event plugins to be helpful for their purpose, so I built a a custom template using advanced ...
-1
votes
0answers
23 views

How to make a shortcode for returning HTML Value using condition inside a function.php?

I'm practically new in Wordpress Development and currently trying to make a shortcode for displaying condition user_logged_in by returning HTML format. Its not working very well and deteriorating the ...
1
vote
2answers
94 views

Generate Shortcodes by Taxonomy

Check this code: function slide_group() { register_taxonomy('Group', 'slides', array( 'hierarchical' => true /*visualizza come le categorie*/, 'label' => ...
0
votes
1answer
30 views

How to copy [gallery] shortcode between posts using polylang [closed]

We're using the excellent polylang to translate our website content and themes , there are a range of options about which fields and settings are duplicated between paired pages. We've selected to ...
0
votes
2answers
44 views

How to display data from custom fields in my custom shortcode?

This is the shortcode I have come up with, according to a tutorial on Dig WP (http://digwp.com/2010/01/custom-query-shortcode/) in order to display list of songs on specific albums. [loop ...
1
vote
0answers
29 views

Curly bracket shortcode in header.php [closed]

I am using a plugin which uses a short-code format with curly brackets { I want to display this short-code in the header.php. Usually the following code works: <?php echo ...
0
votes
2answers
36 views

Return vs Echo Shortcode

Ok, so I've created a short code which echo's some of the output; the problem I discovered is that the values must be returned instead of echo'd. I'm having problems converting the shortcode to return ...
0
votes
1answer
31 views

Space in WordPress Attribute Causing Problems

I'm trying to write my first caption plugin and having some difficulties. I'm setting up a shortcode like so: function Shortcode_Caption( $atts, $content=null ){ // DEFAULT ARGUMENTS ARRAY ...
0
votes
1answer
24 views

Basic do shortcodes question

I used WordPress codex page to code. As you can see I have 2 PHP codes in my line. The page is able to get the code's value but it doesn't obey the CSS rules, which I believe, because I inserted my ...
-1
votes
0answers
15 views

how to write shortcode inside another shortcode? [duplicate]

I want to add a shortcode inside another shortcode. i.e [dt_sc_tab title="Tab 1"] [SHORTCODE] [/dt_sc_tab] Any possibility?
0
votes
1answer
40 views

How to call Shortcode categories for custom post types?

Hi I'm trying to do something rather tricky in my Wordpress Theme I'm more of a designer front-end developer so its a bit of a guess work with php. Anyone have any ideas why this code only displays ...
0
votes
1answer
40 views

shortcodes - style them or change/remove the square brackets?

I sometimes use for the clients, plugins that are based on wordpress shortcodes,they do offer a lot of options for the clients to play with like adding tabs galleries and so on. But I see that the ...
0
votes
0answers
20 views

Custom Loop Using Shortcode in Custom Page Template

I am trying to output a custom loop created using shortcode in a custom page template. Here is the code I am using to generate the shortcode: function archive_sc( $atts ) { // Attributes ...
0
votes
0answers
12 views

Custom Shortcode that includes filtering by tag

Within a custom shortcode, how do I filter the posts that come back from get_posts() such that only posts with Tag = "xyz" are returned? Here is what I have in my shortcode currently: $args = array( ...
0
votes
0answers
43 views

Shortcode issues in wp job manager plugin

I need to display job listings as per job types using shortcode in posts/pages. For that i have installed http://wordpress.org/plugins/wp-job-manager/ plugin. The issue is, when i place two shortcode ...
0
votes
1answer
21 views

Change font-size within a shortcode

I have a simple shortcode like this.... function myshortcode( $attributes, $content = null ) { extract( shortcode_atts( array( 'class' => '' ), $attributes ) ); return ...
0
votes
1answer
46 views

How to get specific string in explode array?

I have a shortcode where I'm trying to get a specific string from the $args array below. Query: <?php $args = array( //'post_type' => $posttype, 'post_type' => explode( ', ', $posttype ), ...
0
votes
1answer
61 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
1answer
27 views

Echo HTML in custom shortcode

I wrote a shortcode that I am trying to refine. It basically just gets a list of bookmarks and prints them. But I need to to add HTML around it depending on the type that is defined. ...
0
votes
1answer
13 views

Activate short codes for all post queries?

I need to use shortcodes on widgets and various plugins. For widgets I simply used: add_filter('widget_title', 'do_shortcode'); add_filter('widget_text', 'do_shortcode'); However I cannot figure ...
1
vote
1answer
24 views

How can I whitelist only specific shortcodes for processing in text widgets?

I know that I can use the following filters to enable processing of shortcodes in Text Widgets: add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode'); How can ...
0
votes
1answer
33 views

Shortcode inside <a><span> WP wraps in in a <p> and shortcode is done after

I want to do this: <a href="/wp-login"><span style="pointer-events:none">[shortcode]</span></a> The Shortcode should be disabled but linked to a loginform. but wordpress ...
0
votes
1answer
33 views

Passing html tags as shortcode parameters

I want to let the user of my plugin define html tags to use before and after the text output by the shortcode, so I am using parameters where they can enter the tags. However the tags are being ...
0
votes
0answers
27 views

Woocommerce Messages Not Appearing with product_page Shortcode [on hold]

I am displaying a single product page via a shortcode above a custom product loop on a WordPress page: http://dublab.com/donate It would be ideal to have the Added To Cart Message appear at the top ...
-1
votes
1answer
16 views

How to display Feedburner subscription count as plain text via a shortcode in post/page editor of my Wordpress blog?

I would like to create a shortcode like [feedcount] in my wordpress blog to display Feedburner subscription count as plain text on some of my posts/pages. Moreover, I'd prefer in the case that the ...
0
votes
1answer
110 views

Show contact 7 form in popup

I am creating map link on a image and it has two links to open video and contact form. I am making popup with lightbox but its not working. here is my code.. HTML <div class="map"> <img ...
0
votes
1answer
15 views

Using _e() on text inside video tags prints that text, instead of only showing when html5 <video> element is not supported

I'm creating a wordpress theme in which I'm creating a shortcode for a video. Part of the output of this shortcode is something like this: $result .= '<video class="fullWidth" width="auto" ...
-1
votes
1answer
16 views

echo a shortcode in a shortcode code?

I have a code for shortcode like this [mt_ptcolumn size="pricing-3-col" title="Bronze" price="$99" period="1 domain" button="Purchase" url="#"] and I want to add a shortcode inside button="" like ...