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

Remove specific shortcode from get_the_content()

I have a variable like this: $post_content = get_the_content(); Here i want to remove some specific shortcode from the $post_content variable e.g i want to remove only this [video height="300" ...
0
votes
1answer
27 views

Transform php shortcode into a widget [duplicate]

I have this bit of php that calls a short code with the date of today in the format i need. <?php $today = date('d.m'); echo do_shortcode('[table id=1 column_widths="10%|10%|80%" ...
0
votes
0answers
95 views

Set thumbnail from URL, by grabbing image in functions.php

So I've written a whole bunch of functions, which are used to display Vine videos. I then have a shortcode which outputs the code. The last thing I have to do is set the post thumbnail. I want to be ...
0
votes
1answer
27 views

Overwriting a Shortcode

I have a theme that extends the Visual Composer plugin with a slider on the front page. The slider will show five testimonials from five different customers. I want to add the featured image of each ...
0
votes
1answer
34 views

Shortcode to output get_header not working

I'm trying to create a shortcode that will output the contents of one of my template header files. I created the shortcode in my functions.php file function zoo_header(){ return ...
0
votes
0answers
17 views

Nested WordPress shortcodes

Can I pass attributes from a shortcode to a nested one. Example: [row $number_of_cols=4] [col] $width=total_width/$number_of_cols; [/col] [/row]
0
votes
1answer
45 views

How to create a custom shortcode for custom login form?

I am trying to create a shortcode for the login form to use on a page. I have manage to get a simple form, but am looking to add the "forgot password link" Here is what I have so far ... any way to ...
0
votes
2answers
25 views

How to find out what handler is registered to a shortcode

I would like to be able to programatically find out what handler is registered to a particular shortcode. I want to be able to find this so I can save it, change it, perform a do_shortcode, then ...
1
vote
1answer
62 views

Hide Default Video Shortcode Controls on PageLoad

In wordpress 3.6+ when we use default video shortcode [video], controls of video are always visible on pageload. How can we hide these controls on page load and show only when we hover over the video ...
0
votes
1answer
108 views

Get custom post type list for every category shortcode

I am trying to make a shortcode to list all custom posts under the category they are under. Here is my code and I am no expert of coding but i thought that this would work. If someone can tell me what ...
1
vote
1answer
47 views

Remove hyperlink on gallery shortcode

I use a gallery shortcode in my index.php (theme directory) to display 3 boxes of images. The images are fetched from my Media. <div class="well well-clear" style="padding-bottom: 0; ...
0
votes
0answers
57 views

do_shortcode via ajax

I try to call contact-form-7 via ajax with do_shortcode. But it shows just "shortcode code". function example_ajax_request() { // The $_REQUEST contains all the data sent via ajax if ( ...
0
votes
0answers
57 views

Using get_terms() as shortcode attribute

Hop you pepople would be fine. I'm creating a shortcode with the following code. $categories = get_terms( 'project-type' ); foreach ($categories as $category) { ...
1
vote
2answers
563 views

Stop WordPress automatically adding <br> tags to post content

Is there a way to stop WordPress from automatically inserting <br> tags when adding returns in the WordPress text editor. I would like for it to behave more like a code editor where I can ...
1
vote
1answer
30 views

Shortcode for latest -not expired- posts

I've made a short code (part of a plugin) to display the posts which aren't expired. For saving the expiration date, i made already a meta key called newsbox-date. Handy for micro-news, short ...
0
votes
2answers
40 views

Strange get_the_* behavior with php 5.4

Let me try to explain what happened to me : I have a shortcode plugin which display child pages of the current page (a mod of http://wpist.me/wp/child-pages-shortcode/, very useful). In the display ...
0
votes
1answer
29 views

How to show an image via shortcode

Can anyone tell me,how to show an image via shortcode.I mean when I use my shortcode,an image will displayed.(shortcode example: [smile] and image location mytemplate directory/images/smile.png)Sorry ...
0
votes
1answer
30 views

Adding a cover image to video shortcode

I'm looking for a way to allow the user to add a cover image (a.k.a. thumbnail) to an internal video, uploaded to WordPress and embedded with the shortcode [video]. So far everything I came up to is ...
0
votes
0answers
8 views

Widget not displaying in WMPU sites

I'm modifying a theme for a WPMU install, and I've hit a wall. In order to display a text widget in a specified area, I'm using: $args = array( 'before_widget' => '<ul ...
0
votes
1answer
66 views

How to load a plugin when doing an Ajax call? [duplicate]

I have posted this question: How to use shortcodes on a widget sidebar when doing an ajax call?, with no answers. Now I want to ask a more specific question. The problem seems to be that the ...
0
votes
1answer
71 views

Calling a shortcode in the backend

I'm using TablePress to make some backend tables. What I want to do is show these tables in a different admin menu than the TablePress menu, because they'll be available to lower user groups. So I ...
0
votes
0answers
50 views

How to use shortcodes on a widget sidebar when doing an ajax call?

I'm trying to use a shortcode from Promotion Slider Plugin inside a widget when doing an ajax call. As said here, I could achieve it doing: add_action( 'init', function() { ...
0
votes
1answer
64 views

Add an access code form to call a unique page based on page without registration

I've seen some other questions similar but not the totally the same. If I missed in the search, please forgive me. However this what I have so far: I've created a form that has the following: an ...
1
vote
1answer
66 views

Shortcode callback for add_action('wp_footer')

I am trying to build a Google Maps shortcode using the gMap plugin from Github, not a plain iframe. For which I have to echo a custom inline script for EACH shortcode, right before the closing body ...
0
votes
1answer
38 views

How to put a block of code between [shortcode][/shortcode] in do_shortcode()?

So I want to put a loop of post behind a 'like lock' thats created by a plugin that uses the shortcode [to_like ID="XX"]content[/to_like]. But instead of the plugin blocking the content, i just get a ...
0
votes
1answer
26 views

Have multiple loops on a page appear after/between page content

I created a function (in function.php) that allows me to put additional loops for different categories into pages: function custom_summary($atts) { extract(shortcode_atts(array( ...
0
votes
1answer
45 views

Manipulated shortcode output

I have a problem with a plugin I developed that registers a shortcode. The shortcode returns a string with valid HTML but some themes seems to manipulate the HTML returned by the shortcode, and I ...
0
votes
2answers
100 views

Passing a shortcode attribute to a sub-function

This is both a WordPress and a PHP question, since a PHP programmer may know a technique that the WP group doesn't. I have been attempting to write a shortcode that fires the Foundation Reveal code ...
0
votes
0answers
26 views

Automate post creation in wordpress

I have a database which has 2000 items. I would like to a) create a page for each item b) Create another page comparing two items. With 2000 items I can create thousands of pages. I am from java ...
0
votes
1answer
36 views

Modify a plugin function output from another plugin

I'm writing a plugin for a wordpress site using a page template using WP Types plugin. My plugin adds a shortcode tag. Shortcode tags inside 'the_content' get processed without problem. But this ...
0
votes
0answers
32 views

short code not working in custom post type listing, how to fix it?

Any activated plugin's short code not working while I listing all post from specific custom type, it's display short code as it is, but short code is not executing, my custom post coding is below: ...
0
votes
2answers
94 views

Shortcode: display list of created shortcode in popup

I want to create a popup shortcode in admin panel. I already create the shortcode button and a popup on button click. I want to display in the popup (not in the shortcode button), all my custom ...
0
votes
1answer
56 views

Passing variable in nested shortcodes

How can I pass style attribute of [boxes] shortcode to [box] shortcodes without using global variables? I don't want to use global variables, because I saw on a few articles that using global ...
0
votes
0answers
124 views

Gravity Forms Shortcodes not working on pages child pages

Am using gravity forms and am implementing on pages using shortcodes. I upgraded to the latest versions of both WP and GF and the forms stopped showing up for child pages, ie pages that have a parent ...
0
votes
0answers
17 views

How can I update the role of a newly added user when displaying the registration form with a shortcode?

Basically I have a shortcode that includes a registration form(among other things). The custom form itself is also included on wp-login.php and user-new.php if the default role is set to ...
0
votes
0answers
20 views

Where is escaped the shortcode?

I'm working with a function that returns a list of posts which has the same type as the actual post. Actually, it returns a list of links with title on anchor link and let to use it with a shortcode: ...
1
vote
2answers
58 views

Displaying a random user with a shortcode

I'm trying to setup a shortcode to show a single random user each time the page is refreshed. I've been successful in displaying all users or a select user by the user ID. Here is my shortcode as it ...
1
vote
0answers
99 views

Adding css to wp_head from shortcode

I'm trying to add CSS to wp_head, from within the method called to render a shortcode. I know that wp_head does not take any parameters, so I'm trying to figure out the following: The method called ...
0
votes
1answer
47 views

Youtube shortcode

I'm trying to make this shortcode work but without any success. All attempts gives me a white square. function youtube($atts) { extract(shortcode_atts(array( "value" => ...
0
votes
1answer
37 views

Using shortcode within shortcode with dynamic variable

So I've written a shortcode to generate a Loop (which shows the most recent posts), the shortcode is simply [loop]. Here's the code which outputs the content of each post (which is the bit causing me ...
1
vote
1answer
77 views

has_shortcode() - how to detect nested shortcode

I'm using has_shortcode() to detect a shortcode, it works but not at all. If I put this specified shortcode inside another one the has_shortcode() function stops working. has_shortcode( ...
0
votes
1answer
66 views

Form submission to another page returning 404 error [duplicate]

I'm modifying a form plugin, and trying to have it submit to another page chosen by the user. Right now the page it submits to is page_id=6. If I navigate to this page myself, it prints Array(). When ...
0
votes
1answer
70 views

Displaying shortcode in footer

Using SMOF as a backend admin and trying to include a shortcode in the text field for inclusion in the footer. I am generaing the shortcode as // Add Shortcode function copyright_shortcode() { ...
0
votes
0answers
14 views

How to change the title of google Analytics?

I am using google analytics in my wordpress site. I am showing the top viewed content using Google Analytics Top Posts Widget. I am using the shortcode to add them in my posts. My post titles were in ...
0
votes
0answers
16 views

WBR (word break opportunity) elements being inserted into shortcode $content in posts

Greeting all, I've written a simple WordPress shortcode which wraps inline $content in <code> tags. I see that sometimes the $content contains <wbr /> elements, which must be inserted ...
0
votes
1answer
75 views

I dont want to show shortcode in <pre> tag

I have a theme and I want to show vistors how shortcode format is in <pre> tag. But when I add shortcode in <pre>, it shows what shortcode does. I just want to show shortcode format in ...
0
votes
2answers
65 views

How to parse nested shortcodes?

The nested shortcodes won't parse correctly: [row] [col size="6"]...[/col] [col size="6"] [row] [col size="6"]...[/col] [col size="6"]...[/col] [/row] ...
0
votes
0answers
36 views

Shortcodes Ultimate pulse my widget in sidebar

I have create my website with sidebar is good for along time. In the recent day, I activate shortcodes Ultimate plugin with my website. I love this shortcodes but It effect with widget in sidebar. It ...
0
votes
1answer
43 views

How do I make a shortcode?

Learning as I go... I have this functionality built, but I need it as a shortcode. How do I do that? $args = array( 'taxonomy' => 'product_cat' ); $terms = get_terms('product_cat', $args); ...
0
votes
0answers
29 views

How to escape shortcode content? Do I even need to escape or validate?

I've written a small shortcode that wraps it's content into a HTML element, like so: [my_shortcode]The sun is shining today.[/my_shortcode] In my shortcode function, I basically return the string ...