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

function of parent not working in childtheme

I have a plugin used on a parent theme which uses shortcode. The plugin (shortcode) works on the parent theme but when I switch to child theme it no longer works. I've only added the child theme code ...
0
votes
0answers
45 views

Adding a query string to product links

I need to add a query string to the end of the links generated by a [products] shortcode from WooCommerce. Each product appears with three links. The image, the title and the add-to-cart button. I ...
1
vote
3answers
62 views

How do I apply style to each category of a list?

I need to create a simple plugin to show a list of categories inside the body of the post and, as I am new to coding, I searched for the basics and started to make little changes; it looks like this, ...
3
votes
2answers
135 views

Search & Remove Specific Shortcode From All Posts

Question Is there a way to remove a specific shortcode, say [print_me] from all the posts where it appears in one shot. And I don't mean mask it or filter it so it doesn't show up while it stays in ...
0
votes
1answer
41 views

Add custom shortcodes to the Welcome Mail

I need to add a custom shortcode to the welcome email of my website. I'm not expert; what I need is in plugabble.php file? I tried a lot of plugins for edit email template but nothing seems work. ...
0
votes
1answer
24 views

How to enable shortcodes in text retrieved from get_theme_mod

Is there a way to enable shortcodes in text saved in the customizer and retrieved using get_theme_mod? I'm guessing there's a filter in a similar manner to enabling shortcodes in widgets.
0
votes
2answers
73 views

Why 'do_shortcode' doesn't work in a REST request?

Why do_shortcode doesn't work in a REST call ? In the example below, do_shortcode exists, but the shortcode isn't interpreted. Route declaration /* Adding a route with callback is ...
0
votes
0answers
40 views

Make shortcode work in all posts displayed by loop, not just the first one

I have a post archive displaying post and author meta at roadtripsharing.com/road_trip I added a do_shortcode(); in the loop, specifically related to the "New Message" button which opens a dialogue ...
0
votes
2answers
29 views

Push Shortcode parameter to template

I'm trying to push a shortcode parameter value to a template file but for some reason I can't get the array value that I'm targeting into a single variable. Here is my code and the shortcode I'm using:...
0
votes
2answers
36 views

Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?

This is my first go at making my own shortcode. What I am trying to do I have 11 different outputs for star ratings I want to be able to use in posts. I want to wrap it all into one shortcode, and ...
0
votes
2answers
26 views

How to handle multiple nested shortcodes with different tags?

Hi I'm fairly new to Shortcode programming and was wondering if it is possible to process the following nested shortcode with different shortcode tags: [review] [title]Sample Review[/title] [...
0
votes
1answer
17 views

How to reuse php templates as shortcodes?

I want to have a structure like: wp-content |themes |myTheme |page.php |contact.php |break.php In a page from WordPress admin, I want to ...
0
votes
1answer
21 views

Is it possible to get a shortcode generated by a plugin, then, using a function, create a new post using that shortcode?

I am planning to purchase a plugin that allows users to create polls and then embed them via shortcode into posts. It looks like a great plugin all around; however, the functionality I would like is ...
0
votes
1answer
48 views

Load next post by ID on a single page

I hope this topic is not duplicated. I see some similar topics but non of them can solve my problem, so I decided to put a new one. Here's the case. I have a single.php post with the defualt ...
0
votes
2answers
35 views

Shortcode templates

I don't know if this is the correct way to approach this, but here it goes. I'm working on Visual Composer (but could be vanilla WP), and I'm trying to implement a shortcode which generates another ...
0
votes
1answer
16 views

How do I require a file in a shortcode?

I have a shortcode that is working and displaying the problem is that it jumps to the top of the page. If I have any text or other shortcodes above it in the page editor they will be displayed below ...
0
votes
1answer
37 views

latest posts shortcode with image

I am trying to make a shortcode that will take my latest 5 posts and render them on page. I get all the posts rendered correctly except for the image source, I receive it blank. Is it something I'm ...
1
vote
2answers
17 views

Create a widget to use shortcode?

I have a plugin (Social Warfare) that I love. But, there's no widget available. What is involved in creating a widget so that I can use the shortcode that seems to work fine on the pages and posts?
0
votes
1answer
37 views

How can I create another instance of my custom shortcode

I've created a custom shortcode which takes category slug and number of posts as parameters and creates a loop with WP_Query and outputs the posts from db. But I'm unable to use it more than one time ...
0
votes
1answer
34 views

Woocommerce products shortcode specific order

Is there a way to get products in the order of the IDs in the shortcode parameter: e.g [products ids="53,68,1"] Display block with 3 product, where 53 on first place, 68 on second...? Now I get ...
0
votes
1answer
41 views

PHP/WordPress — How do I check if Shortcode returns content?

What I'm basically trying to do is check if a shortcode is returning any content, I'm using a plugin called Ninja forms and they have default content posting using their own shortcodes which look like ...
0
votes
1answer
52 views

WordPress shortcode display as plain text

I have a custom templates and I used custom shortcodes to displayed it in the page. But the shortcode is not working, its displayed as plain text only. I already deactivate and reactive the plugin but ...
0
votes
1answer
52 views

caption shortcode using image alt as caption

The img alt attribute is dsplaying as caption and laos the caption is displaying, I do not want to display the img alt attribute as caption , how can I remove it. my code <p> [caption id=...
0
votes
1answer
33 views

Basic custom Shortcode not working

This is the simple version of what im trying to accomplish //add display_name shortcode function name_shortcode( ){ return "testshortcode"; } function register_shortcodes(){ add_shortcode('...
0
votes
0answers
40 views

Change Gallery Shortcode Image Size

I am developing a WordPress theme and have a few posts with galleries (displayed via Jetpack slideshow). Gallery example: [gallery type="slideshow" size="full" ids="1672,1682,1674,1670,1676"] ...
-1
votes
1answer
20 views

Custom shortcode not being included in content paragraph [duplicate]

Ive created a custom shortcode via functions.php to display a phone number in the content when the shortcode is used in the WYSIWYG field. function contact() { $contact = get_field('contact',...
0
votes
1answer
28 views

Using shortcode to stop post content from displaying

Is there any way to use shortcode to block the display of the post content? What I want is to use the shortcode to pull the post content directly from the database, manipulate it, and then display it ...
-1
votes
2answers
40 views

shortcode doesn't work

I made my first WP plugin, it is a contact form - here is the code: <?php /* Plugin Name: Example Contact Form Plugin Plugin URI: http://example.com Description: Simple non-bloated WordPress ...
3
votes
3answers
95 views

How to add 'class' attribute into shortcode [audio]?

I would like to style two MediaElement players on the same page differently, and figured out the easier way to do this (compared to adding a completely new shortcode and enqueueing a new stylesheet, ...
0
votes
1answer
66 views

Replace custom gallery shortcode with default gallery shortcode

I want to replace my custom gallery shortcode in my post content with the default Wordpress shortcode (in pre get posts). I will be doing this in only a certain instance where it will need to be ...
-1
votes
1answer
115 views

Modify Blog Module layout in Child theme

I need to adjust how the featured image is displayed in their blog module. I need to change the display of the Featured Image from an IMG tag to a Background Image. So I can modify the frame (DIV) of ...
0
votes
1answer
55 views

Check if CTP category taxonomy is set in shortcode

I have created a custom post type with the ability to add categories (taxonomy). Taxonomy function create_cat_tax() { register_taxonomy( 'cpt_cats', 'cpt_faqs', array(...
0
votes
2answers
30 views

Change post type depending on shortcode

Is it possible to use 2 shortcodes with the same function and change only the post type in the function depending on what shortcode it is? For instance, when I use all_faq shortcode the post type ...
0
votes
1answer
29 views

Custom Post Type for Shortcode Use - Prevent it display as a post (with slug)

I've developed a series of plugins which can display categorised custom post types via shortcodes, along the lines of: [myshortcode myshortcodegroup="groupname"] This works just fine, however, I ...
1
vote
1answer
71 views

Remove &nbsp; from shortcode

I'm not sure why I can't get this to work. I'm trying to remove the &nbsp; that is added inside this shortcode... [box] Text [/box] Which results in this HTML output: <div class="box">&...
1
vote
2answers
101 views

How can I get the [video] shortcode to allow query string parameters?

Using WordPress 4.4.2 (latest version as of writing this) I'm trying to use the [video] shortcode to show a video on my site. If I provide a url ending with the filename.mp4 it works fine: [video ...
0
votes
0answers
32 views

Wordpress not responseing headers to download a file

I have a WP plugin that sends a link to an email to download a file in hidden location. User selects a file, then a token containing the file ID etc. is written to a database, and a link is sent. Upon ...
0
votes
1answer
70 views

Create category post shortcode

I'm trying to create a shortcode for my theme without using plugins. I tried this http://wpgeneratetool.com/short-code/ but i can not figure out how to create. I want to create something like the ...
1
vote
1answer
66 views

Is it possible to ignore the first Line Break in a preformatted Div from a shortcode?

I created a shortcode of [pncode] that lets me enclose some programming syntax and apply some styling. Notably, it preformats the text and makes it monospace (full CSS below, if it helps). In the ...
0
votes
0answers
18 views

Choosing what Shortcodes should render

So I am working on a mobile app that pulls from a WordPress JSON API, I've coded our own end point and it's delivering content just fine. I need a way to be able to pick and choose what shortcodes ...
0
votes
1answer
23 views

Gallery IDS and Captions: hide/show on a per ID basis

I am aware of hiding captions in a gallery via css on figcaption, like .wp-caption-text/.gallery-caption for example. What I am looking for is a way to have custom control of hiding captions on ...
0
votes
1answer
73 views

Check if the current shortcode is being used in a widget

How can I check if the current shortcode is being used in a widget? I need to disable some shortcode options that are not allowed in a widget. Someone know how?
0
votes
2answers
50 views

How can I fix those issues generated by the Themecheck plugin

I've got the following error messages on the themecheck plugin in my WordPress theme. REQUIRED: The theme uses the register_taxonomy() function, which is plugin-territory functionality. ...
0
votes
1answer
36 views

how to add acf value to other plugins shortcode?

Hi I am creating site with ACF and other plugin (WP-Appbox). WP-Appbox allow me to add little download box of app with shortcode. shortcode is as follow. [appbox storename appid]. If I want to show ...
0
votes
1answer
27 views

Do not show child pages of child pages

I'm looking (without having to copy the whole code) that when the child page has child pages of it's own that it wil not show those child pages but still the parrent page 2 levels up. i played with it ...
1
vote
0answers
22 views

WordPress TinyMCE : Get value of popup button

I'm developing a shortcode plugin, with a main button and sub-menu buttons for each shortcode, I create bootstrap thumbnail shortcode with a popup button for parameters like : Thumbnail Title Insert ...
1
vote
1answer
64 views

accessing wp.media api from a tinymce plugin

I'm trying to create a tinymce plugin that generates a shortcode containing two image ids: [image-fade old="xx" new="yy"] I would like to let users select images directly from the media selector ...
0
votes
1answer
31 views

Correct usage of scripts with shortcodes

I'm not sure I correctly "insert" scripts in my pages. Concrete example: I need to generate a map with the google API, and decided to write a plugin to do that. Question now is what is the correct ...
-3
votes
1answer
35 views

Create a shortcode to display the “the_content ()” in my post [closed]

I should create a shortcode to display the contents of the post in my template. Could someone help me? I made a shortcode to display the form of comments, this just can not unfortunately. Thanks ...
0
votes
1answer
50 views

tax query shortcode

Configuring my shortcode with tax query is proving dificult. When i omit the params for taxonomy/terms i get nothing back. This returns 1 post back as expected [loop post_type="website" taxonomy="...