Tagged Questions

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
6 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
7 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
0answers
12 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
13 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
18 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
1answer
17 views

Execute LoginRadius Social Share in Single.php

I'm helping a friend of mine add social share buttons to individual blog posts and he asked if I could add the same plugin to the blog home page (single.php) - When I try to add it via <?php ...
0
votes
0answers
25 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
51 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 ...
-1
votes
0answers
6 views

Automatic detect my website url in the post and replace it with shortcode for embedding

I've already followed the official doc to add support for custom shortcode and it seems pretty simple. Now I would like to add another feature to my plugin in order to automatically detect links to ...
-2
votes
0answers
5 views

Creating custom woocommerce's custom shortcode for login form [on hold]

Hi i am looking to create a custom shortcode for woocommerce's my account page that will only call in the login and registration form and want to implement that to ubermenu plugin for a drop down form ...
0
votes
1answer
118 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
26 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
17 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
17 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. ...
0
votes
0answers
14 views

How to add shortcode into twitter bootstrap popover? [closed]

I want to add contact form 7 shortcode like <?php echo do_shortcode( '[contact-form-7 id="10" title="Untitled"]' ); ?> into bootstrap popover. Here is my popover code data-toggle="popover" ...
1
vote
1answer
56 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
12 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
14 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
17 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
30 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
22 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
17 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
31 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
30 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
45 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
37 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
58 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 ...
0
votes
1answer
20 views

Output html source tags inside shortcode

I have made a custom popup tiny mce button to add source code.This put shortcode like this [source] <h1>Hi</h1> [/source] To capture output I used function caption_shortcode( $atts, ...
2
votes
1answer
56 views

Enqueue Scripts / Styles when shortcode is present

What is the idea way to register/enqueue scripts and/or styles for use in plugins? I recently made a plugin simple plugin to add the user avatar/gravatar with a shortcode. I have different style ...
0
votes
0answers
16 views

video not displaying in template page by shortcode

I am working on WordPress 4.0.I am new to WordPress. I have created a template page to show single post by their post id for this functionality I have created a template page where all the posts are ...
0
votes
1answer
28 views

Shortcode from admin textarea to page

I've added shortcode to a page via a custom textarea in my Wordpress admin, but the shortcode is seen as text and gets wrapped in quotation marks, so it doesn't work. This is basically how I ...
0
votes
1answer
14 views

Only execute specific shortcodes

For my wordpress content editor I need to specify the shortcodes I want to get executed. Is there a chance to define an array of shotcodes which get executed and all other shortcodes in the content ...
0
votes
1answer
22 views

How can I define the output of shortcode attribute value?

I would like to create a shortcode that has predefined output for attribute values. For example: [shortcode att="value1"] output = <div id="value1">Predefined content for value1</div> ...
0
votes
2answers
37 views

check if the user is owner of current page

I am struggling with this little problem. I have a user profile page and I want to change some of the content based on whether it is my own profile og someone elses. This is my code to add a shortcode ...
0
votes
0answers
31 views

How to add codes to wordpress editor using jquery

I am learning how to write plugins. I am new to it. I have a shortcode generator that is used to insert shortcodes. It inserts codes (HTML/CSS/JQERY/PHP) inside shortcode and plugin highlights in ...
0
votes
1answer
58 views

Enable a short code in the custom meta field

I was wondering if there is a filter that allows me to enable short codes to work inside the custom meta fields in my posts. I know the following code enables it in widgets: ...
0
votes
2answers
37 views

How can I extract a word from page/post URL using shortcodes

I have this URL: www.example.com/dog-to-cat I have this Title: "Dog-to-Cat" In the post/page I would like to insert 2 images, dog.jpg and cat.jpg Also, in the text I would like to use the words "Dog" ...
0
votes
0answers
20 views

template redirect is not working from within a shortcode

I am new to WordPress. I want to show a custom template of a plugin using a shortcode. This template has my own login form with my own header and footer. I am using the following code: add_filter( ...
2
votes
1answer
84 views

Extending the Audio Shortcode

At the moment, the audio shortcode only allows four attributes, src, loop, autoplay and preload. When you upload an audio file however, it comes with pretty useful meta data such as the album art, ...
0
votes
2answers
87 views

What is wrong with my rewrite rule for a page URL with query parameters and short codes?

I'm new to WP programming and I am having trouble with what would be a simple problem in other environments. I created a page (cdl-manual) using the normal WP admin UI. Then I added some functions to ...
0
votes
1answer
27 views

How to prevent tabs from opening all at once

I'm stuck on a plugin I'm writing to show and hide content in large texts. The html below is loaded using shortcode in the text editor. <p>Completely synergize resource <a href="#" ...
0
votes
0answers
13 views

Post content obtained via get_post has shortcodes in html form

I have a plugin that fetches the content of a post and displays it inside a form for editing. It works well with a wide range of plugins but Nexgen Gallery is causing a weird issue. When I use ...
0
votes
1answer
51 views

Trying to write shortcode with get_post_meta but isn't working

I am trying to write a plugin with a CPT and have a shortcode to display the data. I can get 'the_title()' to work and display the title of the post type but using 'get_post_meta()' I can't seem to ...
0
votes
0answers
14 views

Custom caption/image shortcode disappears after switching between text-editor and visual-editor

I've written an custom shortcode for images. I use the filter image_send_to_editor to modify the inserted html. My code (mostly copied from the core) looks like this public function send_to_editor( ...
0
votes
0answers
15 views

Manage Custom Gallery Shortcodes using Media Manager

I would like to create multiple gallery shortcodes (ie [gallery],[gallery-grid],[gallery-slider],[gallery-simple],etc.) I know how to create custom gallery shortcodes, but I was would like to use ...
0
votes
1answer
103 views

Multiple do_shortcode in page template

Is it possible to nest multiple shortcodes with do_shortcode? Using visual composer and easytable with the visual editor, the classic editor displays: [vc_row][vc_column ...
0
votes
1answer
54 views

run shortcode in excerpt of single custom post type

Hi because of the way my theme is set up, I need to run a shortcode inside the excerpt of a custom post type (services). This is the code I have so far... function ...
0
votes
0answers
21 views

Splitting content into two columns and shortcode-slideshow above

I am working on a custom template that will allow me to display a shortcode gallery in full width, and below that, the text from the content of the post in two different columns. I have been able to ...
-2
votes
1answer
33 views

PHP error in shortcode [closed]

Can anyone help me see the error in this code? I'm trying to implement a function via shortcode which I found here: <?php if (function_exists(‘wooslider’)) echo do_shortcode(‘[wooslider ...
0
votes
1answer
43 views

Shortcodes (with a space) added to php Sample

I have found only a small handful of posts from around the internet regarding Shortcodes and allowing them to work / execute within Admin Pages. So, I have made several admin pages in Wordpress, and ...