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

Call Shortcode on wp_footer

Is it possible to call shortcode outside of post/ page content area? I am trying to add it to wp_footer with the following codes but it's returning string: add_shortcode('eps_pop', 'init'); function ...
0
votes
1answer
56 views

Posting code inside the post instead of in the template file using shortcode

I am using two plugins one of which is Thumbs Rating which have have a shortcode like this for example in order to display the thumbs rating option: The code bellow is to be used in the templates ...
0
votes
0answers
12 views

Code formatting: Gists vs Embedded

It seems that there are at least a couple different methods of working with code in WordPress entries and posts: GitHub Gists (via the Gist Shortcode plugin, etc.) Inline formatting in a <pre> ...
-2
votes
2answers
107 views

Set variable in javascript and using in my shortcode

my script is function($) { var google_map_address = $('#address').text(); $(function () { $('#gmap').gmap3({ marker: { address: google_map_address }, map: { options: { ...
0
votes
0answers
41 views

Parse shortcodes from another site in WP Multisite

I'm retrieving a list of posts from various sites in a multisite installation using the following method: $posts = lc_main_eh_posts(); foreach ( $posts as $post ) { setup_postdata($post); ...
0
votes
0answers
31 views

User added CSS to alter shortcode

I am creating my first plugin and so far it has gone well. It is very simple thing that calls the css file up and allows users to add shortcodes which will then create different colored backgrounds ...
0
votes
0answers
25 views

Load post shortcode content into fancybox

I'm wondering if it's possible to load shortcode content entered into a custom field into a fancybox overlay? And if so, could anyone maybe point me in the right direction as to how I might go about ...
0
votes
0answers
87 views

Where to replace short code

Hey I am new to wordpress and web design in general. I just downloaded a plugin that helps edit navigation menus. The plugin is called Simple Responsive Menu. They are asking me to " Add shortcode in ...
0
votes
2answers
149 views

Add shortcode within the_content()

I'm trying to add a shortcode within the text of the_content(). It is possible to add it to the beginning or the end however I cannot figure out how I would get it to show after say 200 characters. ...
0
votes
1answer
30 views

Trying to the deduce shortcode from a function

I have a theme where the wysiwyg button to insert the shortcodes is not appearing. I am trying to manually type in the shortcode that would output the tabs that I need. I am looking at the function ...
1
vote
1answer
648 views

Rewriting WordPress Gallery Shortcode with Bootstrap Carousel

In a recently personal theme project for publishing travel posts, I desired a slider-style image gallery rather than the standard column/list-style one WordPress uses out of the box. I like the ...
0
votes
1answer
64 views

Parsing a shortcode through an author meta textfield

I have been using the UPME plugin to design a member profile website that allows me to take information and show each user different profiles depending on a shortcode I put into a textarea field. The ...
0
votes
1answer
41 views

OOP and WordPress shortcode

I tried to add a shortcode this way class MyPlugin { function __construct() { $this->make_shortcode(); } function ShowMsg($cls, $lst4) { $data = ...
0
votes
1answer
40 views

Echo out element to another page.

I have a small plugin that displays how many submissions are left on current ninja form. And writes it out as so <p id="submissions-left">hurry only 25 submission left. <\p> And tacks ...
0
votes
1answer
213 views

Adding YouTube button to TinyMCE editor

I found a code set to add a YouTube button to the WP tinyMCE editor that I am now trying to incorporate into a Thematic Child theme. The code already works in a non-Thematic theme however, when I add ...
0
votes
1answer
34 views

How to get my [shortcode] rendered on the home page, other pages are fine

I'm using a child theme of Pixlex. The theme has a options panel to let me choose wether I want 2 or 3 columns on the home page and if those columns are to be filled with a post or page. I have one ...
1
vote
0answers
86 views

wp_editor in thickbox

I am updating a shortcode generator that I made before and I want to add in addition to text areas inputs etc.. a tinymce editor, so I call wp_editor in the ajax content of the thickbox, the editor ...
0
votes
1answer
34 views

Checking post content for a shortcode, but content is being returned as empty

Alright so I am trying to check for a shortcode in the post content so that I can enqueue scripts as necessary. I have this: if( plugin_has_shortcode() ) { // Load CSS ...
0
votes
0answers
15 views

Check if shortcode is self-closing and then displaying it

I'm using this snippet: http://wpsnipp.com/index.php/functions-php/update-automatically-create-media_buttons-for-shortcode-selection/ which give me a list of all my shortcodes and always prints like ...
0
votes
0answers
120 views

How to use Shortcode Plugin with AJAX loading?

I'm using Wordpress 3.9.1 and a Theme that utilizes AJAX loading. (the site is here: http://phoenixwave.com/test/ ) I've installed a plugin to add more shortcode abilities. Problem is, once a page ...
3
votes
1answer
218 views

Make shortcode work with nested double quotes

I have following shortcode: function infobox_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( 'src' => '', 'title' => '', 'text' => '', ), ...
0
votes
1answer
75 views

Allow user to input shortcode into wordpress widget

This is my first widget, so I'm new to this, but I want the ability to add 6 different shortcodes to the widget that the user can set. The question is this, how do I get the plugin to allow the user ...
0
votes
1answer
35 views

the_time function inside HTML dom parser

I have recently bought a theme, where I want to modify some things. The theme makes use of shortcodes. One of these shortcodes is adding the most recent posts. In these most recent posts is the date ...
0
votes
1answer
30 views

Loading shortcode stylesheet only when shortcode is in text widget [closed]

I would like to load shortcode stylesheet only when it will be put in text widget. Please help somebody.
0
votes
1answer
60 views

Wrapping shortcodes in another shortcode

I'd like to wrap existing shortcodes in post content inside a new shortcode that I'm adding to my plugin. The existing content looks like this: Some text - could be <span>HTML</span> or ...
-1
votes
1answer
191 views

Convert my php code into shortcode

I have this type of 8 block of <div> so I want to convert it into shortcode : <div class="homebx01 clearfix ani-1"> <div class="homebxhead clearfix"> <div ...
0
votes
1answer
1k views

How to add class or id to shortcode HTML elements?

I have a row elements and 3 columns inside : [row] [one_third]1[/one_third] [one_third]2[/one_third] [one_third]3[/one_third] [/row] How can I add a custom class or id to [row] element ? I need to ...
0
votes
1answer
17 views

Is there a way I can return terms by name using a shortcode?

I want to create a shortcode to return a string of values, which are the term names. So I can use it to pass data inside a plugin. Anyone cracked this one before? /** * Custom shortcode to get terms ...
0
votes
1answer
97 views

Shortcode in my childtheme is not working

function get_employee_func(&$totalCount) { global $wpdb,$_POST; $query=''; $sql=''; $query="Select * from wp_users as U left join wp_company_user as CU on U.ID = CU.user_id LEFT ...
0
votes
0answers
82 views

Infinite Scroll plugin works but no [shortcode]

On my blog I use the Infinite-Scroll plugin. Works properly, but in the new post loaded I didn't see shortcodes (ex. [jwplayer ..]), or the galleries created by the editor (appears "This slideshow ...
0
votes
0answers
156 views

Working with “Event Manager” Plugin and “lightbox plus colorbox” plugin for featured image

currently working with "event manager" & "lightbox plus colorbox plugin" for featured image, I have loaded image using featured image but on output side when clicking on that featured image ...
1
vote
3answers
177 views

Checking if an attribute exists in a shortcode

I've written a small plugin that spits out html for a button. It works great, except for one thing: If the user doesn't specify an image, the image appears broken. Is there a way for me to check and ...
0
votes
1answer
27 views

How to use shortcode of any plugin to show it visually where i want?

I don't know much about shortcode. I have a countdown plugin with this plugin i'm displaying 'countdown timer', i can post it with shortcode E.g [countdown event="Event with hour &amp; minutes" ...
0
votes
1answer
129 views

Including Custom fields within the_content

I’m designing a site for a client and I’m using custom fields for buy links to her books. I only want buy buttons to appear for fields that contain a URL, so I’ve hooked this just below the_content: ...
0
votes
1answer
31 views

Defining the output of a Wordpress Att

I have this code where I'm trying to define how those attributes (ptid, ptle, pge ) will behave once the code runs. I would like to be able define them so to get them to execute functions before ...
0
votes
1answer
57 views

TinyMCE strips content while pasting. Possibly a bug

I have a shortcode that has a 'style' attribute for a theme that I'm creating, which looks like this: [shortcode_name type="normal" style="fixed"] Now if I paste this in the TinyMCE editor, I get ...
0
votes
1answer
44 views

Featured image with link to post shortcode, image displaying above the post

I have created a shortcode to display the featured image linking to the post: function ck13_post_image($atts){ extract(shortcode_atts(array( 'ck_img_size' => 'full' ), $atts)); ...
0
votes
1answer
62 views

Shortcode / WP_Query in post changes context

We have a shortcode that causes WP_Query to be executed, retrieving an instance of a custom post type. In our single.php this changes the context (after the call to the_content()) from the original ...
1
vote
2answers
274 views

Custom Shortcode and Button not Working after 3.9 update

I have added a new button that creates a short code but it seems that after the newest WordPress update, the button is not working any more. The button is visible but when someone clicks it, nothing ...
0
votes
1answer
35 views

Is it possible to include the add_filter() function within a shortcode function

I am trying to pass content to the 'google_dfp_ad_slot' filter. Can this be done within a shortcode funcion? /** * Shortcode function to dynamically add google dfp ads to inline content and ...
0
votes
1answer
43 views

How to display class name in this shortcode post query

I need help with this as it's my first project of my new job & I'm stuck at this point. I'm retrieving custom post types portfolio using this code as a shortlist: extract( shortcode_atts( array( ...
0
votes
1answer
35 views

How to use extract shortcode in loop?

Actually I need to gallery in any new post so i use shortcode for making gallery for every new post. I use images and videos in slider. problem is that I have custom html slider need to convert ...
1
vote
1answer
78 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 ...
1
vote
1answer
106 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
16 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 ...
0
votes
1answer
230 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 ...
0
votes
1answer
174 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 ...
1
vote
2answers
162 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. ...
0
votes
0answers
57 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
14 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