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
25 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
15 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
41 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
28 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
34 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
44 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" ...
0
votes
0answers
39 views

Override shortcode in child theme

I want to change a shortcode behavior in my child theme. The shortcode.php location is: /themes/xxxx/framework/helpers/shortcodes.php the code inside this file is: class SH_Shortcodes { ...
-1
votes
2answers
66 views

Enclosing shortcodes create line breaks

I created enclosing shortcodes like this: //[rezept] function rezept_func( $atts, $content = null ){ return '<div class="drl-rezept-wrapper">'.do_shortcode($content).'</div>'; } ...
-1
votes
1answer
34 views

woocommerce Product shortcode create

i am very new wooCommerce and WordPress. programming knowledge not strong yet. but for my project i need to do something. now i want to create custom short code for woocommerce product. i want to ...
0
votes
1answer
40 views

Change the default video shortcode

When I select a video file from media library and click on insert in to post button that time it goes like this : [video width="1280" height="720" ...
0
votes
1answer
50 views

Shortcode for Visual Composer Grid fails turning string to integer

I am working in a shortcode for visual composer grid. I want to show the list of terms of a taxonomy (portfolio_tag) associated to a custom post type (portfolio). The shortcode gets the ID from the ...
0
votes
0answers
28 views

TinyMCE custom button on post-new.php screen

Iam building a small slideshow plugin. For this I registered a new post-type which is called "prfx_slide". And also set-up a shortcode function so that I can use the slider as a shortcode. With the ...
0
votes
0answers
30 views

Override plugin shortcode declared as a Class

There is a class which is a shortcode from commercial plugin for WordPress I need override method /** * Rendering the shortcode this class is responsible for. * * @return string ...
0
votes
1answer
15 views

How to create an incremental list using shortcodes?

Right now I'm creating shortcodes like this: function short_code($atts) { $a = shortcode_atts( array( 'name' => '' ), $atts ); return '<div class="content"> <div ...
1
vote
1answer
35 views

Using API to generate short link

I want to use a shortcode that generates a short URL from API of Premium URL Shortener script. I added code from API to my template functions: // Main Function function shorten_url($url){ ...
0
votes
0answers
20 views

Ordering get_terms with ACF not displaying all terms

I'm making a shortcode to return all the terms in this taxonomy. The terms are sorted with krsort by the custom field 'height' made from ACF. I'm following this answer from here. The problem is it's ...
0
votes
1answer
49 views

Trying to Understand Shortcodes.

am completely stumped on this for some reason. I have block of code that I had in my header.php <?php if ( is_page("Home") ) { if( have_rows('slider') ): ?> <div ...
1
vote
2answers
47 views

shortcode_unautop shortcode not functioning

I have made my own theme with shortcodes to WordPress. In my filters I have: remove_filter('the_content', 'wpautop'); add_filter('the_content', 'wpautop', 99); add_filter('the_content', ...
1
vote
0answers
37 views

Is it possible to delay execution of shortcode output callback?

I have a problem : shortcode output callback triggered too early. /* Defined in plugin constructor */ add_shortcode( 'foobar' , array($this,'pre_render_routine')); function ...
1
vote
1answer
52 views

Different loop output every x posts in custom post type

I was following along in another StackExchange Question from a couple of years ago where there was a layout along the lines of: <div class=items active> <div class=row> ...
-1
votes
1answer
31 views

Insert shortcode in widget area

I enabled the Insert Pages plugin wich allows to create a shortcode for a given page e.g.: [insert page='7' display='all']. See my capture of the setting of the plugin: ...
1
vote
3answers
43 views

How to use shortcode in js url

Here's the code I'm trying to use. <input type="button" class="next-step" value="Adopt Now" onClick="parent.location='http://example.com/adoption-application/?Name=[Title]'" /> The shortcode ...
1
vote
0answers
68 views

wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query

I'm implementing a form for a frontend post with a shortcode. The form is processed in the same function, reloading the page: function adicionar_ninhada(){ $user_id = get_current_user_id(); if ...
1
vote
0answers
23 views

Shortcode: text content ends up outside html tags

I have a shortcode which loops through a custom post type. It is supposed to output a link and a title for each post. But the result is that the divs and link tags that are created are empty, while ...
1
vote
1answer
51 views

Shortcode for CPT post content in a page

I use the Wiz theme along with a plugin I'm coding. The Wiz theme comes with Visual Composer bundled and theme options for pages (header, sidebar, footer and the like). However those options are ...
1
vote
1answer
35 views

Shortcode returning localized HTML part

Here's my issue. I made a shortcode which makes a related article section in post content. Here's the content of this function: $a = shortcode_atts( array( 'id' => 0, ), $atts ); ...
3
votes
1answer
34 views

Wrap each shortcode in array to div

i'm trying to wrap each shortcode in div with special data attributes, but when i'm using nested shortcode they don't wrapped, where i'm wrong? thanks public function wrapShortcode( $content ) { ...
1
vote
0answers
75 views

Displaying recent posts on static page with template-part via shortcode

So, I'm taking my first shot at creating my own custom Wordpress theme with Underscores. I have everything straightened out, with the exception of one last thing I want to add. I would like to add a ...
2
votes
1answer
33 views

Remove HTML content if attribute is not set / variable attributes

So I'm creating a shortcode that uses the standard bootstrap carousel. It works completely fine as long as all the 3 slide attributes are entered correctly but obviously if only 2 are set and the ...
1
vote
0answers
43 views

What's the best way to render Visual Composer in posts, not pages?

I have a page with layout and ui content I'd love to use in my posts. Is that possible without running through all the shortcodes with do_shortcode?
1
vote
1answer
32 views

Custom Shortcode, functions PHP WP_Query loop

I have the following code in my functions.php file:- function featured_properties_func( $atts ) { $args = array( 'posts_per_page'=> -1, 'post_type' => 'properties', ...
2
votes
0answers
40 views

Can I create customizer setting that can handle plugin shortcode?

Can I create a customizer setting which will handle a shortcode from a plugin? Do I violate and rules or guidelines in WordPress theme development? If it's possible what is the best way to sanitize ...
0
votes
0answers
18 views

woocommerce no shortcode for all products in one page

I like a list of all products on one page. So only per category. I have going through the shortcodes, but can not find the code for it. Looking into: ...
4
votes
1answer
103 views

Change appearance of shortcode text inside editor

Is it possible to change appearance of shortcodes in editor or in whatever way make it more distinguishable from surrounding text? For example if the content of a post is like this... Reference ...
2
votes
1answer
36 views

Why does WP not like my <a> container?

Lately I've been working on some shortcodes where all the elements the shortcode produces are wrapped inside an tag. Unfortunately this is not rendered like wanted, because of the filter wpautop on ...
1
vote
0answers
35 views

Edit shortcode in post content programatically

Let's assume there is a simple post. It has some content and a few [gallery] shortcodes in it. I need to add (or modify) attribute to specific shortcode and save in database (not temporarily modify ...
1
vote
0answers
33 views

Creating shortcodes in plugin

First time creating a WP app, so please bear with me. Essentially, I want to be able to input a value in a form, which gets processed and put into the database. Once that is done, I was trying to use ...
0
votes
1answer
45 views

How to show in front End images using Visual Composer attach_images?

$gallery = shortcode_atts( array( 'post_gallery' => 'Gallery', ), $atts ); $img = wp_get_attachment_image_src($gallery["post_gallery"], "large"); $output = "{$img[3]}"; I ...
0
votes
0answers
29 views

get author id outside loop for posts showed by shortcode in a page

i have a page (like: site.com/PAGE), and this page address will display all posts from all authors(posts are custom post type). if address contain the author slug like: site.come/PAGE/USER, display ...
1
vote
2answers
106 views

Change link in get_terms if there is only one post in the category

I created a shortcode that will list the categories in my custom taxonomy and will return a list of all the categories that have at least 1 post (not empty). The result is that when someone clicks on ...
1
vote
0answers
106 views

Visual Composer shortcode for child theme dir

I have a site using VC that is running on localhost and also on a staging environment. I need to access the child theme directory to call images from within raw-html sections of visual composer ...
0
votes
0answers
17 views

Plugin download monitor always links to same file

I installed the download monitor plugin to generate download-links for videos. I have created a couple of downloads and created a widget to display them. I can see the correct shortcode, when I use ...
1
vote
1answer
35 views

Having issues with a foreach inside of a shortcode with ACF gallery

Normally I would just put this type of content in a template, but the way I'm pulling in the content is a bit different. I made a shortcode which I've been having issues with. It's using Foundation ...
0
votes
0answers
34 views

Shortcode returns nothing

I have this shortcode, which for some reason returns nothing: function youtubes( $atts, $content = null ) { global $post; $ttt = get_field ( 'video_code', $post->ID ); $ttt = ...
1
vote
1answer
135 views

How to pass “get_the_terms_list” as shortcode to Visual Composer Grid Builder

I am trying to create a shortcode that returns the term list inside of Visual Composer's Grid Builder. I have read the docs here. My code is as follows: add_filter( 'vc_grid_item_shortcodes', ...
0
votes
1answer
18 views

Stop truncation of shortcodes in custom text fields?

I have a custom theme that a third party developed for me and I’m trying to get to the bottom of a problem with shortcodes. I’m fairly new to Wordpress and PHP so please let me know if there is any ...
1
vote
1answer
31 views

get_post_title is not working on homepage

My simple shortcode works on all pages except for the homepage (static) in Wordpress 2016 Theme. All content I can read except for the post title. It comes back empty. I want to display posts on ...
5
votes
2answers
130 views

Allow Shortcode in Theme Customizer

All theme dev who follows the wp guidelines properly, now uses ability of default wp customizer to customize their themes, instead of making a different theme option section the admin panel. But what ...
1
vote
0answers
43 views

Displaying Login form with Shortcode

So I am trying to display a working version of the default wordpress login form on one of my pages. There is code in the functions.php file that creates the shortcode and as far as I know it works ...
3
votes
2answers
67 views

Legacy Audio Shortcode

I have recently redone a site that was originally created in 2011. Of course there were a few big development issues and one of them is the usage of an old audio shortcode: ...