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.
0
votes
0answers
17 views
Custom field for default gallery
How I can add custom field in default WordPress gallery? in visual editor and in shortcode.
0
votes
1answer
20 views
What makes a placeholder resizable in Tinymce?
It's not that hard to make a plugin to TinyMCE, similar to what the Wordpress gallery is doing in WP 3.5. Unfortunately, these custom placeholders are always non-resizable, although they show the ...
1
vote
1answer
24 views
Allow users of my plugin to define their own shortcode rather than use mine?
I'm creating my first plugin. So far everything is great, but my shortcode is something like this [BIMS] and that acronym might not be easy to remember, or appeal to everyone. I'd like to include an ...
1
vote
3answers
40 views
Nested shortcodes
I'm using 2 plugins in my wordpress blog - WP-Members and Dropbox Folder Share. I want to do something like this:
[dropbox-foldershare-hyno link="[wp-members field="some_link"]" ver_como='lista']
...
0
votes
2answers
31 views
How to handle shortcodes through plugin
I learned that I can only put in the code for handling my shortcode through the theme's functions.php
But I was thinking of making it a plugin rather than a theme. How can I achieve that?
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
2answers
61 views
Shortcode adding p and br tags
I apologize as I realize this has been asked before and I believe the issue is with wpautop function adding closing p or br tags but every solution I've found has not worked so I'm at a loss for ...
1
vote
1answer
18 views
What does extract( shortcode_atts( array( do?
The codex says 'Combines user shortcode attributes with known attributes and fills in defaults when needed. The result will contain every key from the known attributes, merged with values from ...
-1
votes
0answers
18 views
Shotcode error on functions
Hello i have this shortcode that is generating a error.
Can someone help?
add_shortcode('do-action', 'do_action_shortcode');
function do_action_shortcode($atts, $content = '') {
ob_start();
...
0
votes
2answers
46 views
How should I approach changing the template & $query as part of a shortcode's execution?
I am working on a project where I need to be able to change the template being used if a given shortcode is used. To complicate things more, the plugin must also be able to rewrite $query if this same ...
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
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
0answers
35 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
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
30 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 ...
2
votes
1answer
30 views
shortcode for logo image
I have the following code for showing images using the shortcode image but the shortcode is [image name=logo] to load an image from /uploads/ directory called logo.png; changing the name I can load ...
1
vote
2answers
41 views
How to use/enable Pagination?
I'm creating a shortcode to display the list of users with a particular profile in WordPress.
But I can not enable or display the pagination. I have 25 users on my site and would like to display 5 ...
0
votes
0answers
40 views
Shortcodes not working in just posts [closed]
I am having issues with my shortcodes not working in posts but working in pages.
Here is a page with shortcodes working:
http://174.120.222.98/~shutter1/amos-southend/
Here is a post without the ...
1
vote
1answer
25 views
detect when shortcode ran for the last time
I'm wondering, given this code:
add_shortcode( $tag , $func );
Is there a hook I can use that will always be called AFTER the last time $func was called, but soon enough, so I can still call ...
0
votes
2answers
56 views
Place the page title into the short code
I have created a short code called [contianer-narrow][/container-narrow] which wraps your content in a twitter bootstrap class: .container-narrow the issue is that the page title is not included. is ...
-1
votes
1answer
26 views
Creating Features List in Wordpress Post
I want to create features list in wordpress post. I know how to do in CSS but I was wondering if it can be done by using a short code or a plugin?. Like
[features_list]
Item 1
Item 2
[/features_list]
...
-2
votes
1answer
55 views
How to include custom field in shortcode (do_shortcode) in theme file
To cut out a few steps and make it easier for authors, I have included a custom field for authors to enter details (may include HTML).
I want to add the custom field to a shortcode in the theme.
...
0
votes
2answers
52 views
Get shortcode attributes outside shortcode function
I'm writing a slideshow shortcode and need to grab the shortcode attributes in an external function so I can add the javascript to the footer.
For example:
add_shortcode('test','test_function');
...
0
votes
0answers
17 views
[solved]shortcode not executing in query [closed]
For my site, I found that it was a lot better to go ahead and put my queries into a shortcode instead of using page templates. The process is working out better than expected. So I have some queries ...
0
votes
1answer
85 views
wp-query Shortcode in Gravity Forms Notification
I have the following code that runs two wp-query loops upon form submission to display specific posts depending on the users choices in the form (The form fields are radio buttons with values that ...
0
votes
1answer
29 views
Display meta data from a custom field within plugin Category Grid View Gallery
I am using this plugin, which creates a gallery of posts, fetching a thumbnail and the titles of the posts displayed in it.
I have enabled Custom Fields, and have created (and filled in values) a ...
0
votes
1answer
34 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
34 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
36 views
wp_query in a shortcode
I am trying to put several queries in a shortcode so that I can call them in a page instead of using custom templates. I got my query going but I only see some of the content on the page. The image ...
0
votes
1answer
23 views
Filter everything from content except output of a shortcode
Is it possible to filter the output of either the content or excerpt so that I only get the the shortcode output and so that if a user enters more than the shortcode the rest of the content for that ...
1
vote
2answers
67 views
Automatically add this attribute to the gallery shortcode
When inserting a gallery it adds the following shortcode:
[gallery columns="6" ids="18,150,146,23,147,17,21,20,22"]
I would like it to automatically add link="file" as the last attribute, whenever ...
0
votes
1answer
41 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 ...
1
vote
1answer
27 views
Shortcode for a link and thumbnail
<?php
// Add Shortcode
function blog_shortcode( $atts ) {
// Attributes
extract( shortcode_atts(
array(
'id' => '',
), $atts )
);
// Code
if (has_post_thumbnail()) {
$url ...
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 = ...
1
vote
1answer
32 views
Showing a different gallery in a seperate post
i am using the [multigallery] function and I was wondering if there is a way to use the function to call attachments from another post.
For example if i was writing a post about taylor swift and I ...
0
votes
1answer
36 views
How to use shortcode inside of shortcode in theme
I am trying to place a shortcode inside another shortcode within a page template, however the various attempts I've made seem to not do anything.
Here's how my code looks now -
<?php echo ...
0
votes
2answers
48 views
IF Custom field value equals ZERO
I am trying to use the following code to check for my custom field for a value of ZERO to then display my div
<?php
$mp_price_sort = get_post_meta('mp_product_price');
if ($mp_price_sort == '0') ...
0
votes
1answer
46 views
Adding Image Count to Multigallery
Ok so I am using the [multigallery] function and it works fine, but one thing I want to add.
Here is the code that I am using for the multigallery in my functions.php file
function ...
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
28 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
1answer
32 views
shortcode change variable base on user
How would I put this together.
For plugin Contact Form 7 Data Base how would I add in the "Submitted Login" (user display name) to the search="name"
Original Shortcode
[cfdb-table form="Contact ...
0
votes
0answers
37 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
45 views
Shortcode $content not showing in Custom Post Type [closed]
I have an enclosing type shortcode that includes $content. The shortcode works fine in regular Posts/Pages however in a custom post type it breaks. The shortcode still "works" but insofar as to return ...
0
votes
1answer
34 views
Custom short code not doing as I tell it too? [closed]
So I built a short code as follows:
if(! function_exists ('aisis_toc') ){
function aisis_toc($atts, $content = null){
extract(
shortcode_atts(
array(
...
2
votes
1answer
44 views
Using get_option() in JavaScript
Previously, I used the get_option() function to get an option in PHP, like this:
$width = get_option('my_width');
This is inside a shortcode function.
Now, I want to have an option in JavaScript. ...



