Questions tagged [shortcode]

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.

Filter by
Sorted by
Tagged with
0
votes
1answer
56 views

Correct way to pass information between seperate shortcode functions

I contain all my short-codes in (the equivalent of) functions.php. I want to have one short-code function share information in an object, and another able to access that object. The shortcodes may or ...
0
votes
0answers
382 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
878 views

Calling function from within functions.php returns unwanted value

I am trying to customize the output of the [gallery] shortcode to include comment count by this plugin: Facebook Comments for WordPress plugin I found a function by Zack Austin (shown below) that ...
0
votes
1answer
289 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
1answer
564 views

How to list all active and specific shortcodes in wordpress

I wonder how you can list specific shortcodes, for example with this code you get a list of all active shortcode tags: <?php global $shortcode_tags; echo '<pre>'; print_r($shortcode_tags);...
-1
votes
2answers
667 views

shortcode doesn't work

I made my first WP plugin, it is a contact form - here is the code: <?php /* Plugin Name: Example Contact Form Plugin Plugin URI: http://example.com Description: Simple non-bloated WordPress ...
-1
votes
1answer
51 views

Dynamic HTML not displaying at respective place

Dynamic HTML not displaying at respective place I have a created shortcode in function.php and my code is, function Post_home(){ $data='<div class="cp-seeWrapper"><div class="container">&...
-1
votes
1answer
241 views

How I make a shortcode for this code?

I wrote a script to display recent posts from a specific category in wordPress. <?php $catquery = new WP_Query( 'cat=3&posts_per_page=10' ); while($catquery->have_posts()) : $catquery->...