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

Wordpress: Trying to echo taxonomy slugs of individual downloads, but limit them to the $atts[category] selected from shortcode from post

Note: I'm a reasonable newcomer to .PHP, starting with this project. I understand the concept of it, but I'm not yet skilled enough to figure out what functions I need to use for something a bit ...
0
votes
1answer
31 views

Onepage with shortcodes

i build a onepage wordpress theme , and for showing all my pages in one page i use a loop , but shortcodes don't work (Ex : contact form 7 : the form is showing but don't work at all) this is my code ...
0
votes
0answers
10 views

Displaying WP Job Manager Expired Listing

Anyone experience with the WP Job Manager? I tried to create the shortcode to display it, but seem not working. this is what i did: function jobexpired() { return '<div class="job_listings" ...
0
votes
1answer
32 views

Shortcode not working inside html input

I'm using Wordpress 4.2.3 The shortcode is added with the following: function upsellxid_shortcode() { return '9eaa86d1a36a126313aa752c2ff8e16c'; } function upsellxid_shortcode_2() { return ...
0
votes
2answers
65 views

Why do_shortcode is not executing the shortcode in data-* html attributes?

This is on Vanilla installation. I've made a shortcode:- /** * Creates a shortcode for shortcode_use_here * @author Omar Tariq <XXXXXX@gmail.com> */ function callback_banana_abc( $args ){ ...
0
votes
1answer
27 views

How to protect own PHP code from Wordpress updates

I have written several own shortcode scripts which I place in the shortcodes.php file. My Wordpress installation is set to update to new Wordpress versions automatically, which is a good thing. But ...
0
votes
2answers
15 views

How to pass parameter that ends up being part of a class name with wordpress shortcode

This is the resulting html I want to produce with a shortcode - when editing page content in WordPress: <div class="shadow-wrapper half-shadow im-centered"> <div class="box-shadow ...
0
votes
0answers
23 views

Modify content if has shortcode

I have a post or page , the content of that post or page is similar to the following Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et ...
0
votes
0answers
41 views

Visual Composer creating own shortcodes with vc_map() to return simple Image

I am using the Plugin Visual Composer with in a new Theme I develop. My question is about mapping shortcodes to Visual Composer arrays. The problem I get, when I try to make a custom element for an ...
0
votes
0answers
13 views

Is it possible to get Wordpress shortcode output with ajax

I'm trying to develop a booking system with a plugin. There is a couple of "book now" buttons with unique ids. What I want to do is to create a popup box (a div which shows when the "book now" button ...
-2
votes
1answer
22 views

Insert the Fun Facts plugin into a static page [closed]

I am trying to use the Fun Facts plugin to create an interesting FAQs page. Basically, my website is tied to a bigger website that has the FAQs listed there, and my employer wants to have a random ...
1
vote
1answer
25 views

Hide Post comments when displayed via WP_Query

I've written a shortcode which displays 'x' number of posts on the homepage of my site when I write [blog posts_per_page-"3"]. Here it is: function getBlogPosts($atts) { ...
-2
votes
0answers
27 views

All shortcode wordpress plugins not working [duplicate]

Installed all new and active plugins, their shortcodes are not working anymore. It only displays plain text shortcode in a page. This has happened, after I remove the existing WordPress files from a ...
0
votes
0answers
14 views

myCRED do_shortcode issue

i found a code to create a timer. I want to use it for delaying a do_shortcode commands but i don't work... the shortcode is execute when the timer is to 1:00 and i want to execut it when the timer is ...
0
votes
1answer
36 views

Shortcode not working after move wordpress website files

After I migrate the existing wordpress website files in public_html, the all new plugins installed, there shorcode are not working anymore on any pages. Here's the page that I put a shortcode from ...
0
votes
1answer
7 views

WooCommerce shortcode displaying strangely

I am working on a WooCommerce build at the minute, and I'm having trouble with the WooCommerce shortcodes (and potentially a clash with my theme). See this page: ...
0
votes
0answers
26 views

Shortcode At top of Page - PHP 5.5 vs 5.4 - ob_start();

add_shortcode( 'recent-events', 'recent_events' ); function recent_events( $atts ) { ob_start(); $atts = shortcode_atts(array( 'count' => '2', 'columns' => '1' ...
0
votes
2answers
25 views

how do you get the author's username?

how do you get the author's username? I'm using this code "get_the_author()" I wanted to change this into author's username, instead of author's name. Thankyou
0
votes
0answers
16 views

Add catagory attribute to custom shortcode

I have created a custom post type called "whiz_qt_quote". I have created a shortcode for display all the post . This is working fine. but I would like to display the post for specific category. I ...
0
votes
1answer
27 views

How to rewrite URL and get the values?

I created a shortcode by add_shortcode. where the shortcode placed in a wordpress page to display dynamic content. The dynamic content is based on the URL value. Example If URL is ...
0
votes
1answer
27 views

Formatting post content to exclude gallery

I have this code which takes the first gallery for a post's content, and formats it with more code preparing it for slideshow usage with css and js. $gallery = get_post_gallery_images( $post ); ...
-2
votes
1answer
30 views

Shortcode leads to white screen [closed]

I have this code to show news in block. but when include this code in functions.php to call it in shortcode. It show me white page and not show me any error. So where is my error? For some reason, ...
1
vote
0answers
31 views

How to prevent shortcode preview from breaking in tinymce editor?

I am creating visual preview for shortcodes (just like captions). I have don't most of the parts but my preview html is getting broke by the editor when post is saved. I have investigate it further ...
0
votes
0answers
29 views

return array when using shortcode

I create my own custom table and and retrieve data and save in to the array variable $take. now when i display this using print_r($take) it will show my all records. but i try a lot to return this ...
1
vote
1answer
25 views

Get new Wordpress slug from old wordpress slug

I have implemented a shortcode called post which contains an attribute src which has link of an of page [post src="http://www.listenmoneymatters.com/the-betterment-experiment/"] Currently, this ...
1
vote
2answers
31 views

Unable to the get the gallery inserted between shortcodes

I am customizing this theme . I am using get_the_gallery() function to get the gallery from the custom post . I am able to do so, but when the gallery is inserted between the shortcodes... For eg: ...
0
votes
0answers
19 views

Prevent WP from wrapping html in caption shortcode after 'image_send_editor' filter is applied

In my functions.php I have cooked up some functions to filter the attachment output code, when an attachment is sent to the editor. function filter_image_send_to_editor($html, $id, $caption, ...
0
votes
1answer
16 views

How to add conent (text) to Add New pages form of admin in WordPress

I am new to WordPress. I have created a Shortcode. Now I want to add description of Shortcode to Pages->Add New Page so the user can easily use the Shortcode which I have created. I want that text ...
0
votes
0answers
34 views

How to wp_redirect on 'init' hook on condition of current post id?

I have made a shortcode, because we can't redirect page within shortcode using wp_redirect so I used 'init' hook to check the $_POST/GET parameter and make system redirect. But I'm stuck in a ...
0
votes
1answer
41 views

change plugin shortcode function [closed]

i use a plugin that containing this code and i want to change the css and js and template.php location to be located in my template directory instead of plugin without editing the plugin files public ...
0
votes
2answers
22 views

do_action(), iFrame Gets Displayed Despite Password Protection [closed]

I'm using Advanced Custom Fields and Content Protector plugins in trying to protect an iframe for eventbrite ticket registration that gets displayed through Event Calendar plugin. I believe I'm ...
0
votes
1answer
33 views

$content not null in shortcode, even though it is self closing

I have a very simple setup like this: add_shortcode( 'code', function( $atts, $content = null ) { echo gettype($content); exit; } and contrary to the documentation, even if this tag is self ...
1
vote
1answer
117 views

Multiple loops on page only show taxonomy name of first loop

I have a page with a custom post type called 'books', with taxonomy 'booktypes'. The books are ordered/divided in a loop per taxonomy-item, and added via shortcode to the page editor like this: ...
0
votes
2answers
45 views

Add JavaScript in footer if shortcode used in page [duplicate]

I want to add javascript to page footer if the shortcode is used into the page content. add_shortcode('show-popup', 'show_aip_popup'); function show_aip_popup($args){ // HTML Comes here for ...
0
votes
0answers
24 views

How to use ACF fields inside bootstrap shortcode within template

I'm using ACF fields to setup a custom page template for my Custom Post Type. i am using the Sparkling bootstrap theme. Here is the code I am trying to use in my single-dest.php: <?php echo ...
-2
votes
1answer
21 views

Shortcode Output Always Before Content [duplicate]

I have the following. When I call it, in the page, the content within the page will always be AFTER the plugin rather than before. Please can some help? <?php function ...
0
votes
0answers
30 views

How do you load a stylesheet for just the page that contains a shortcode?

I am working on developing a pluginI've been really struggling with this task, mostly because I've seen so many different ways to do almost what I want, but not exactly what I want. So I've tried ...
0
votes
1answer
76 views

Embedding Instagram via shortcode doesn't work as advertised in official docs

I am coding up a simple Wordpress theme and I would like to embed Instagram images via shortcode as described on Wordpress.com and Instagram.com. (Both links point to the very pages that demonstrate ...
0
votes
1answer
42 views

Enabling shortcodes for custom fields

So, in this post it is explained how to supposedly enable shortcodes for custom fields in Wordpress. (Shortcodes are not enabled for custom fields by default.) What I dont understand is where to ...
0
votes
1answer
16 views

$wpdb returns duplicate posts

I have created a shortcode which shows the posts which were created after the user last logged in. The shortcode is working perfectly fine, but I am not sure why but I am getting 7 duplicate posts. So ...
0
votes
1answer
32 views

Shortcode output appearing at the top of the page only [duplicate]

I've found a few solutions to this but I am echoing some html and I have not been able to put those solutions (to return intead of echo, for example) to use. This is my function: function ...
0
votes
0answers
17 views

How modify gallery shortcode output for admin side

I've been modifying the gallery shortcode output, with remove_shortcode and add_shortcode function. Which works great for the front-end side. But in the admin side, when I edit some pages, the ...
0
votes
1answer
70 views

Shortcode display outside the div

I have created a shortcode that retrives and displays a form.The content of the attribute in HTML. function check_my_login( $atts) { return '<form action="" name="" method="post" ...
0
votes
1answer
30 views

Change shortcode output (filter?)

I'm new to filters and actions and I'm starting to see how useful they are. However I do need a bit of help with the following problem. I'd like to remove the html code from this <?php if ( ...
-1
votes
1answer
45 views

php code to shortcode [duplicate]

So, this is the php code that I have: <?php global $royal_profile;?> <div class="profile-img" data-key="profilepicture"> <?php echo get_avatar( get_current_user_id(), 64 ); ...
1
vote
1answer
101 views

How to use get_media_embedded_in_content function

I am trying to figure out how to use this new WordPress function. get_media_embedded_in_content (string $content); The documentation says, "a string that might contain media data" but that is too ...
-1
votes
2answers
44 views

I've broken the short code for Contact Form 7!

Well I should qualify that title. The shortcode is fine in itself, and no doubt nothing to do with the guys at CF7 causing this issue. I am sure it's me, but it just isn't working after I've added ...
1
vote
1answer
68 views

Set first oembed in post to a global variable or function

I have a function that gets the first oembed in the post. I got the code from this related post. add_filter('embed_oembed_html', 'my_function',10,4); function my_function( $cache, $url, $attr, ...
0
votes
1answer
13 views

Contact form field in wordpress menu

I am trying to insert a simple 1 field contact 7 form into my menu. I have this code working for just text, but if I try to insert the shortcode for the form, I get an error. What am I doing wrong? ...
0
votes
0answers
54 views

Add a product custom field's value to custom tab

I would like to add some custom tabs to the product screen. The values of these custom tabs would be the values of the custom fields assigned to the product. I'm using the following plugin to add ...