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

Shortcode not accepting atts

i have been working on a shortcode and I am having trouble passing $atts to it. i can't figure out what i am doing wrong. To say it another way, i cannot update 'input_product_image_ID' to a ...
0
votes
1answer
17 views

Is it important to sanitize inputs in a shortcode that will be used in site that only I will post to?

Is there any security risk in not sanitizing shortcodes in a wordpress site if I am the only one who has access to the admin panel?
0
votes
0answers
11 views

display-posts shortcode attributes have no effect

I need to list some specific posts on a page. I discovered the [display-posts] shortcode feature but it doesn't seem to work. Here's what I'm trying to do: [display-posts posts_per_page="2"] ...
1
vote
0answers
36 views

Wordpress Shortcode callback function with a plugin

I am working on a plugin and the plugin currently works great on the admin section but I'm trying to extend the functionality to the front end and using a shortcode to use the same functions. I have a ...
1
vote
1answer
41 views

How to create a shortcode with 1 parameter (atts)

I am having trouble getting a shortcode to work with 1 attribute. Here is my shortcode [sme_user-email userID="2"] Here are my scripts - none of them work. function getUserEmail_func($atts) { ...
0
votes
1answer
20 views

How disable checkbox when listbox value changes in tinymce

I'm creating a custom popup in tinyMCE for WordPress, to insert video shortcodes, so I have a list of websites (YouTube, Vimeo, Vine, and others) in a listbox, and a checkbox to let the user decide to ...
0
votes
1answer
22 views

Shortcode and whitespace formatting problem

I'm having a problem with shortcodes on a website, currently you enter a shortcode in the post edit screen like the following: [tab name=Itinerary] This will output a tab such as: However as ...
0
votes
1answer
14 views

Video Shortcode Only Returning a Link

I am trying to dynamically load a video in the media library using the built in MediaElement player. To do this, I am using the do_shortcode() function to run the [video] shortcode and build up the ...
0
votes
0answers
12 views

Create a random list of html items within a shortcode in the functions file.

I'm trying to create a function that randomly pulls lines of code for a list of HTML items. Basically, I'm going to have a list of 50 or 100 images with hyperlinks associated with them. I'd like a ...
0
votes
1answer
32 views

Extract attribute values from every shortcode in post

I have multiple shortcodes in the post: [section title="first"] [section title="second"] [section title="third"] I want to extract all title values (i.e first, second, third) from external ...
0
votes
2answers
28 views

Shortcodes in custom post fields without the_content()

I have created a custom post type which doesn't use the_content() to display anything in the front-end, just using echo's. The user enters data into a text-area field in the plugin admin back-end, ...
0
votes
2answers
8 views

How do I add an article to specific page?

Regardless of it being WooCommerce or WordPress, I want to add a couple articles to specific pages, so they show there instead of the images that are there now. Homepage I know, I'm supposed to use ...
1
vote
1answer
9 views

Forcing max-width for image captions

I've implemented a filter to my image captions based on this question I asked a few days ago. How can I slip into the caption the css style of max-width as well? I think it can be done with ...
0
votes
1answer
18 views

Correct way to pass information between seperate shortcode functions

I contain all my short-codes in (the equivalent of) functions.php. I want to have one short-code function share information in an object, and another able to access that object. The shortcodes may or ...
0
votes
1answer
22 views

Nested shortCode functions in the functions.php file

I'm trying to get a shortcode function (newStuff) to display inside of another function (oldStuff), but I'm running into trouble. Both shortCode functions are listed below, as well as what I've tried. ...
0
votes
1answer
31 views

the_content() shows shortcode instead of parsing it

I'm loading a given post data via Ajax. The problem is that a plugin's shortcode is not parsed. The plugin is "Ninja Forms". It outputs [ninja_forms_display_form id=5] Instead of rendering the ...
0
votes
1answer
34 views

How to create a shortcode for embedding pdf in iframe?

General information I am creating a site with WordPress. For the content I want that the PDF files can be embedded inside an iframe. So I first created a WordPress function to hook in ...
0
votes
1answer
20 views

Multiple level shortcodes

I am working on a plugin and stopped in a situation, I hopesomeone can help me with a solution. I want to have a shortcode structure like : [shortcode_1] [shortcode_2] [shortcode_3] ...
2
votes
1answer
64 views

How best to apply do_shortcode in media.php for captions

I wanted to be able to put shortcodes in an image caption. I've successfully done this by modifying the media.php file with the following just prior to return. $atts['caption']= ...
0
votes
1answer
22 views

Class variables in shortcodes

Don't know what I'm doing wrong but, I have the following code: class the_shortcode { //Define Class Variables private $var; public function __construct() { ...
0
votes
1answer
19 views

Visual Composer integration

I've installed Visual Composer on my own template. The thing is that is not rendering all it's shortcodes. <?php $post = get_post( $post->ID ); echo $post->post_content; ?> Is that ...
0
votes
1answer
27 views

shorthand syntax for custom fields

I'm trying to write a shortcode and am sorely out of practice with this stuff. It's for a plugin Full Width Audio Player and I'm trying to query all tracks within a certain playlist so it will output ...
0
votes
0answers
21 views

Shortcode display CPT Query only showing 1 post?

Ive seen similar questions on here but I am already using WP_Query and wp_reset_postdata. In short I wrote a shortcode that queries our Custom Post Type to display posts specific to a category. ...
-1
votes
1answer
19 views

Display function from functions.php in tag.php

I've added several functions to the functions.php file. I call those functions using a shortcode [shortCode] while in posts, pages, and widgets. But the [shortcode] will not work outside of posts, ...
0
votes
2answers
42 views

Shortcode not passing variable to included file

I set up a shortcode which includes a standard php/html form file. In the form I have a hidden field where the value is a variable which is meant to be available in the form via the shortcode ...
0
votes
0answers
9 views

Ouput rel attribute on links in Gallery Shortcode within template file

I've added a gallery into a template file using echo do_shortcode('[gallery link="file" ids="1,2,3,4,5"]' ); When I use just the shortcode within a post I get a rel attribute on the links to the ...
0
votes
0answers
26 views

Add custom image size to shortcode

I am using WP-Views by WP-Types, to list WooCommerce category images in a page. WP-Views doesnt support category images by default, so i found this code to make category images available by shortcode. ...
0
votes
1answer
11 views

Render shortcodes with get_post_custom

Wondering if anyone knows how to get a toggle shortcode to render when using: get_post_custom <?php $post_customs = get_post_custom(); //$post_customs = the_sub_field('project_items'); ...
0
votes
1answer
22 views

How wp maps urls into files

I am trying to understand how wordpress works. I have found this line of code in my theme: <?php echo get_permalink(get_option('Theme_search_page_id')) ?> If I get the that option from mysql ...
0
votes
0answers
22 views

Problem in creating a shortcode form custom post type slider

I am trying to build a shortcode of my custom slider. The following is my code : add_shortcode('teresa_stories_courage_slider', 'teresa_stories_courage_slider_shortcodes'); function ...
0
votes
1answer
23 views

Display title of child pages in shortcode

I'm having a hard time figuring out how to display the title of the childpages as the id of a div. Assuming that 'news' & 'othernews' are siblings of the parent page home (39) I want something ...
0
votes
1answer
21 views

custom page or standalone page?

I'm new to WordPress. I have a requirement to implement a live calculator(results updated as you type) in a WordPress site. The site has a simple theme. What is the best way to implement this? ...
0
votes
0answers
30 views

return wp query results in a shortcode

I am using wp query results in a shortcode, and right now I am echoing out the stuff I need, or just using wp functions (title(), the_content() etc.). The problem is, if I put that shortcode in a ...
0
votes
2answers
59 views

Get shortcode from the content and display it in other place (in sidebar, for example)

I have a shortcode: [content_block] If that shortcode exists in content and has the attribute position=top, I would like to remove it from the content and display it in other place. For example, in ...
0
votes
1answer
162 views

Load Gallery Images with Title on Homepage BX Slider

I need to display all thumbnails of a gallery on the homepage using the Roots theme with links to one page with a shortcode. The gallery has to be loaded as list items using BX Slider's jQuery to ...
0
votes
1answer
41 views

sql query in shortcode not working

I have a custom table 'wp-products' in wordpress with the following fields id (primary key) e.g 1 make e.g. ford model e.g. mustang price e.g. 17500.00 id ...
0
votes
0answers
18 views

Should too many attributes make shortcode fail?

I have been working on a full scope GUI shortcode generator. It is pretty much finished but I am having some weird things happen on testing out the end product. The shortcodes seem to fail if more ...
0
votes
0answers
28 views

How to build shortcode for tabs

i made a tabbed widget to display recent post , comments, and popular posts, but now i want to take out tab function from this and make a shortcode of it, so i can add it to wp posts and use it there. ...
2
votes
1answer
66 views

How to link to a page that has a shortcode?

I am building a calendar plugin that can be added within a page via shortcode. I am trying to find how I can build a link that links to the page the shortcode for the calendar is in. So another words ...
0
votes
0answers
17 views

Simple Dropbox - Dashboad Widget ( Call as funchtion or do_shortcode() )

Hello I'm looking to use the simple dropbox plugin, on my dashboard as a secure upload widget, but it uses shortcode to be displayed on a page or post, not so much the dashboad. [simple-wp-dropbox]. ...
0
votes
0answers
19 views

wordpress plugin admin area save settings

I am brand new in wp plugin development and i need your help cause throw web the answers that i find confused me. So i would like to make a countdown timer wp plugin for my website that will display ...
0
votes
0answers
27 views

Hide shortcodes “code” when using the “editor” the same as wordpress do with “gallery”

i have question, how to hide the "shortcode code" when using the "editor" the same as wordpress do with "gallery"? my clients hate to see shortcodes as "code". And the truth, not only him, but a lot ...
0
votes
0answers
46 views

How to edit classes inside shortcode with jQuery

Please someone help me to do this .. I want to add FontAwesome shortcode to my theme I have a shortcode that is generated: add_shortcode( 'sh_icon', function( $atts, $content=null ){ $atts = ...
0
votes
1answer
26 views

How to list all active and specific shortcodes in wordpress

I wonder how you can list specific shortcodes, for example with this code you get a list of all active shortcode tags: <?php global $shortcode_tags; echo '<pre>'; ...
0
votes
0answers
20 views

Unique ID for WordPress shortcodes when used more than once on a page?

I’m currently coding a WordPress shortcode and it has some javascript involved. For javascript to work properly I need to use a div with a unique #ID. If the shortcode is used once, it works fine, but ...
0
votes
0answers
40 views

Plugin calling HTTP_X_REQUESTED_WITH

I'm writing my first WP Plugin. I have a form that saves the input data after the data is entered without having to submit. Everything is working but I am unsure if I am calling HTTP_X_REQUESTED_WITH ...
1
vote
1answer
47 views

How to get shortcode working from custom meta field

I've created a simple text custom meta field for pages. I can successfully enter plain text which prints on the frontend of the site with no problem. I want to add shortcodes also. If I add a ...
0
votes
0answers
48 views

Custom shortcode with dynamic rewrite

I'm trying my hands at developing a plugin but have run into an issue I can't seem to find any good answers to. I want users to put a shortcode on any page they want, and the shortcode is replaced ...
0
votes
0answers
57 views

More efficient query to display posts in same sub-category?

[EDIT: See my comment below, I may have been fooled by Chrome caching an earlier version of this code. It now seems to run quite quickly. Leaving the question up in case anyone sees a better way but ...
0
votes
2answers
79 views

Passing variable as add_shortcode argument

I'm trying to pass a variable into the add_shortcode function to be used as the shortcode name but it does not seem to be working. Is there a way that I can pass a variable similar to this? foreach ...