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.
3
votes
1answer
365 views
Change behavior of “Insert into Post” based on attachment metadata
For a custom plugin I'm working on, I have added a checkbox element to the attachments editor in a manner like the answer provided here:
How to add a checkbox element to attachments editor with ...
2
votes
1answer
1k views
Customizing gallery shortcode in 3.5
I'm trying to customize the gallery shortcode using the new gallery system in 3.5 and I'm having a bit of trouble and can't figure out where I'm going wrong. This is what I've got at the moment (in ...
1
vote
1answer
14 views
Plugin Handle URL With Custom Theme
I need to develop a plugin in which a special page needs to be created. This page will have a completely separate design from the rest of the website, and will be located at a specific URL.
I realize ...
1
vote
1answer
58 views
wp_specialchars and wp_specialchars_decode in a shortcode plugin
I have written my first plugin, a shortcode plugin. I have read about wp_specialchars and wp_specialchars_decode but I'm not sure how to use them.
The plugin read a shortcode allowing some parameters ...
1
vote
1answer
93 views
Processing shortcodes in groups (separated by line breaks)?
The Project
I'm working on a plugin to resize and embed rows of images using shortcodes that will be converted into <img> tags. In most cases there will be multiple images per row, and the ...
1
vote
1answer
57 views
Should I cache default WordPress gallery shortcode output?
I'm overriding default WordPress gallery like so:
add_filter( 'post_gallery', 'my_gallery_shortcode'), 12, 2 );
function my_gallery_shortcode($output, $attr) {
// some modifications ...
1
vote
1answer
70 views
other shortcodes in Contact form 7 MAILS
How to use other shortcodes inside Contact form 7- forms? indeed explains how to use other shortcodes inside Contact Form 7 forms. But that doesn't make them usable in the mails that Contact Form 7 ...
1
vote
1answer
220 views
Caption shortcodes not including caption as attribute
I recently installed the bonpress theme and am having trouble with the captions showing correctly. The more I try to understand how captions are supposed to work in Wordpress, the more I suspect ...
1
vote
1answer
150 views
do_shortcode() doesn't work if shortcode contained in variable, works if shortcode passed as string
I'm developing a plugin, wherein one of the features is to switch out forms on a specific page by changing the shortcode within a custom field.
within my plugin file:
function getShort()
{
...
1
vote
1answer
65 views
Single post content custom order
In my post I have a shortcode for [video] than text content. Single post page displays first entry-meta, than title, than content [video] + text.
What I need is to add some condition in single.php so ...
1
vote
1answer
182 views
Google Map Shortcode for Custom Taxonomy/Post Types
Calling all WP Stack Exchangers!
I am currently using Alain Gonzales' Google Map Shortcode plug-in on a site I'm developing, and it's worked just fine:
Google Map Shortcode plug-in on wordpress.org
...
1
vote
1answer
397 views
get_the_content(“more…”) returns full text
I'm creating shortcode [latest_post] and want to show post date, title and short content. (content has "more" separator). Here is code:
function shortcode_latest_post() {
global $post, $more;
...
0
votes
1answer
38 views
Custom wysiwyg editor doesn't execute shortcodes?
I encounter this weird problem.. I'm trying to create a simple & easy website for a client. He wants to embed video's into the page.
I use different customfields assigned to specific elements in ...
0
votes
1answer
20 views
Prevent Menu Shortcode From Formatting
I'm trying to insert shortcodes into menu links (as I need to display a latest post link). I've figured out how to get the do_shortcode part done.
However, when I insert a shortcode as the menu link ...
0
votes
1answer
31 views
Custom Fields - Boolean Display of True/False to Yes/No
I am importing fields from a Real Estate site.
The Import of one Custom Field looks like this...
Field Name after Import ---> assistedLiving Field Value ---> false
to output the display in ...
0
votes
1answer
37 views
How to wrap a text with shortcode into php file?
I want to wrap a text with shortcode into the single.php file.
The shortcode is: [box type="note" align="aligncenter" ][/box] and
the code is:
Διοργανωτής διαγωνισμού: <?php ...
0
votes
1answer
36 views
Change the default video URL in a post to shortcode format
I want to add video from youtube/vimeo to my post.Whenever i add a video to my post ,there will display a link like https://www.youtube.com/watch?v=dsUXAEzaC3Q in my admin(Add new post ),and in the ...
0
votes
1answer
35 views
Create Short code dynamically
I want to generate short code for my gallery dynamically. For a single gallery, it is easy to create a short code for my gallery using
add_shortcode( 'image-gallery', 'gallery' )
Now my question is ...
0
votes
1answer
45 views
Multi-part form and wp_redirect()
For starters, it's a plugin (with a shortcode) or at least I would prefer it to be.
I've got two issues both related to wp_direct.
If form 1 validates I want to redirect to form 2, and continue the ...
0
votes
1answer
81 views
How to change the output of gallery shortcode
I would like to add the media description as a data-attribute to each image of the gallery. All the other answers favour the solution to copy the whole code from media.php to functions.php and change ...
0
votes
1answer
53 views
Create a short code that inserts js
Note: People are assuming this question is already answered when in fact it is no where close to being the right answer.
I have created tons of short codes, How ever I am using Jquery plugin TOC and ...
0
votes
1answer
112 views
Wpautop stops working after get_the_excerpt
function pre_process_shortcode($content){
global $shortcode_tags, $shortcodes;
// Backup current registered shortcodes and clear them all out
...
0
votes
1answer
127 views
How do a put a form with php code into a variable or shortcode?
I'm trying to put my frontend form into a variable or a shortcode so I can wrap another shortcode around it (specifically Bainternet Post Creation Limits).
My form has PHP code in it so I'm not ...
0
votes
1answer
49 views
Custom taxonomy in short code
I am using short codes in theme for grid display. Code only considers category ids. I also want to add custom taxonomies so it give output as both category posts as well as custom taxonomy posts.
...
0
votes
1answer
98 views
Gallery shortcode numerical sorting
When I try to sort a Gallery created through the [gallery] shortcode by numerical titles I get them sorted in alphabetical order. That means that they are sorted like so:
1, 3, 34, 4, 56, 6, etc.
...
0
votes
1answer
65 views
Remove some tags from shortcodes output? Trying to fix autop
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 99 );
add_filter( 'the_content', 'shortcode_unautop', 100 );
Work for almost all my shortcodes excluding one that ...
2
votes
0answers
90 views
Possible to create placeholder images in Wordpress editor that are clickable (should bring up uploader)?
Working on a project where I would like to have buttons within the actual visual editor area where the user can click on the placeholder image and it brings up the upload dialog.
I've seen that ...
2
votes
0answers
145 views
TinyMCE popup windows using WP functions
In my editor I would like to use a TinyMCE generated popup to insert in the textarea some complex shortcodes. I use the TinyMCE API to show the popup (bottom of this question). The popup is a PHP file ...
1
vote
0answers
30 views
Complex Slider Shortcode Help
I have a PHP-Code for Slider which I found. Now I want to transform it into a Wordpress shortcode.
Here's the Code:
<!-- Slider -->
<div class="big-slider-wrapper block-full ...
1
vote
0answers
122 views
Stop wptexturize from texturizing my shortcode
I have a script outside of Wordpress that generates an HTML file a few hundred times a day. I figured the best way to get the contents of this file in to a specific page would be a shortcode. I ...
1
vote
0answers
271 views
Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it
I'm trying to output a custom post type archive using a shortcode. Everything works fine except for the get_next_posts_link part. The weird part is that it's right next to a get_previous_posts_link ...
1
vote
0answers
61 views
Using shortcode to display array in array
I am using a widget, U more recent posts. Seems to work with custom taxonomies when you input the correct data into it in a widget form, but the suggested shortcode doesn't work (and I am trying to ...
0
votes
0answers
22 views
Custom field for default gallery
How I can add custom field in default WordPress gallery? in visual editor and in shortcode.
0
votes
0answers
26 views
Can't seem to get [shortcode]s to work
function register_shortcodes(){
add_shortcode( 'my_shortcode', 'my_shortcode' );
}
add_action( 'init', 'register_shortcodes');
function my_shortcode( $atts ) {
return "--my_shortcode--";
...
0
votes
0answers
12 views
<?php wp_register(); ?> Display logged in user as “Site Admin” apposed to Logged in user
I'm just working on a little hobby word-press site I have;
<?php wp_loginout(''); ?>
<?php wp_register( '',''); ?>
In the top rite corner of my site, <?php wp_loginout(''); ?> ...
0
votes
0answers
23 views
Run function from parent on child site
I'm running a Multisite wordpress installation and have a couple of child sites.
Im trying to run a script from the main page on one of the child sites. It can be a shortcode [pro_display_zone ...
0
votes
0answers
36 views
Creating a costing calculator plugin. How can the user create the calculations without coding?
I am relatively new to php & wordpress development. I am trying to create a plugin that allows the user to create an unlimited number of costing calculators. Users will be able to add fields ...
0
votes
0answers
27 views
show shortcodes in editor
Is there any way in which i can show custom shortcodes inside the editor panel, I have a bunch that I've created and thought it would be a good idea?
Not found anything online other than tutorials on ...
0
votes
0answers
47 views
How can I join the two key with the two value of a custom field?
I am using wp add custom field with images and text multiple time .. how can join to have the key and value in the same div ?
<div id="Caption-custom" class="">
<?php
$text = ...
0
votes
0answers
37 views
Custom field to Rich Text Area
My requirement is
Top content
[shortcode]
Bottom content
i write a shortcode and place in a post...It always in top...so i decide to used custom field for top and bottom content and how to change ...
0
votes
0answers
29 views
Shortcode returns parts of the code twice?
I have a shortcode that lists custom type posts, like:
while ( $loop->have_posts() ) : $loop->the_post();
$output .= '<a href="#">';
$output .= '<div><img ...
0
votes
0answers
38 views
Customize wp-caption output
I'd like to customize the output for the wp-caption shortcode. I need to put the attachment full-size URL wp_get_attachment_image_src($post->ID, 'full')
function custom_img_caption_shortcode( $a , ...
0
votes
0answers
26 views
Figure element with multiple image short code
I have a short code I developed that goes like this:
[figure description=""]
[image src="" title=""][/image]
[image src="" title=""][/image]
[image src="" title=""][/image]
[/figure]
What it does ...
0
votes
0answers
120 views
Some filter adding custom post types to my WP_Query
I have a strange problem. I am using WP_Query inside a shortcode callback. Say I have 10 custom post types and I want to show the most recent post from 4 of them. I specify them as
'post_type' => ...
0
votes
0answers
46 views
I need to create a dashboard widget with input field and will display the text as shortcodes in posts
Hi I need to make automated price updater of my learning materials (e-books, videos, posters etc.) and it's such a drag every time I need to change prices on them to open every single posts because ...
0
votes
0answers
32 views
Gallery inside posts
I'm looking for a solution to a certain type of gallery I want to use inside posts. These posts have tons of content, including pictures. I want to create a gallery like the one in this image I made ...
0
votes
0answers
56 views
Shortcode not working
I am using calendar plugin but the short codes are not working.
I tried various other plugins, but none of them works. They provide me a shortcode and when I implement them in my page, nothing ...
0
votes
0answers
37 views
How to create a shortcode that lists products by category
Hi I d like to create a shortcode that lists products of a certain category.
I ve used the following code to register products and categories:
add_action('init', 'catalog_init');
function ...
0
votes
0answers
339 views
Trigger shortcode after submit button pressed
I need to execute a shortcode after the user will press the submit button. I am using Contact form 7 and have inserted the form by a shortcode in the Post edit section.
It's basically a form ...
0
votes
0answers
746 views
Get post ID by default in a shortcode
I'm trying to create a shortcode to display child pages, so far works like charm, however, I passing a value called 'parent' as response for 'post_parent', by default I need to display the current ...


