Tagged Questions

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

Custom Meta Boxes repeatable field show on single.php

I have some code that adds a Metabox, with repeatable fields to the edit screen of the WordPress backend. It looks like this: The code, I have in the functions.php, looks like this: function ...
0
votes
3answers
106 views

Inserting PHP inside do_shortcode

I am trying to use an existing shortcode for an accordion element in a custom template for my wordpress site. Basically, I need to insert PHP arrays inside this shortcode, like so: <php ...
0
votes
0answers
5k views

Uncaught TypeError: undefined is not a function (shortcode-box)

I have a Wordpress theme that the author is no longer maintaining, and has stopped functioning properly with the update to Wordpress 3.x. Over the past few months, I have been working to resolve the ...
0
votes
2answers
48 views

How to get the $atts of a shortcode

I have the following shortcode: [video width="400" height="400" mp4="http://xxxx.xxxx.xxx/uploads/2014/06/Facebook.mp4"][/video] I need to get every single atts a single variable, I mean, I need ...
0
votes
1answer
72 views

Shortcode Display From Wordpress Dashboard Page Without Using post_id

I have this code for showing recent posts on my home page custom theme and it works well. functions.php code: function my_recent_posts_shortcode($atts){ $q = new WP_Query( array( ...
0
votes
2answers
49 views

Using Shortcode to Grab Archive Listing, Separate by Year

Here's code I've modified to display an archive list of every month I've posted news. Each month of course links to the archive for that month. I can then include the shortcode wherever I like. ...
1
vote
1answer
48 views

How resource intensive is wp_register_script()?

I'm trying to use the has_shortcode() function to only load certain scripts when there is a shortcode in the post's content, with this code: wp_register_script( 'shortcode-js-file' , FILE_URI, array( ...
0
votes
1answer
102 views

Adding shortcode to the main menu

Is it possible to add shortcode to a main menu? I tried the following but no luck? add_filter('wp_nav_menu_items','add_nwadcart_widget_to_menu', 10, 2); function add_nwadcart_widget_to_menu( ...
3
votes
1answer
77 views

Using audio shortcode for .mp3 URLs with a query string

I'm trying to use the audio shortcode with an audio file with a query string on the end of the URL and it won't work. The reason is I'd like to use expiring signed URLs with Amazon S3. If I use a ...
2
votes
2answers
59 views

Strip shortcode from specific post types (formats)

I am trying to remove the shortcode from a specific post type, in this case link. I used this code on my functions.php but it removes the shortcode from the_content for every post type. <?php ...
0
votes
1answer
48 views

How to Modify WordPress Default Image Gallery Shortcode

I would like to be able to show 5 columns and only 10 images per page for the default WordPress image gallery. Visually I would imagine it to look something like the following: columns="5" ...
1
vote
1answer
291 views

Recent post display using shortcode

I am trying to display recent post in static page home-content.php. I've added this code in function.php function my_recent_posts_shortcode($atts){ $q = new WP_Query( array( 'orderby' ...
0
votes
0answers
33 views

How to show comments for a specific category of posts with a shortcode

Referring to this post category specific comments here Display category-specific comments in sidebar I need to ask 2 further related questions. 1/ Is this code still valid for WP3.9? 2/ How can I ...
-3
votes
1answer
36 views

How do write this type shortcode? [closed]

How do I write this shortcode or any alternative? echo do_shortcode ('[gviewer file="$att_url"]'); Any suggestions someone?
1
vote
2answers
86 views

How to create shortcode to show the 2 latest posts

I would like to create a shortcode that displays the last 3 posts to any page.... It should be laid out like this Title Excerpt...Read more I've added this code in function.php function ...
0
votes
1answer
88 views

How To Add Perfect Apostrophe And Quotation Mark In WordPress Posts?

I have a blog at www.exeideas.com where I am sharing codes snippet too. I am new to WordPress and migrated from Blogger. So now my all codes shared in posts stop working. When I check my codes then ...
0
votes
1answer
38 views

Putting a space between the buttons [closed]

<?php echo do_shortcode('[su_button url="http://google.com/checkout/" target="self" background="#2D89EF" color="#FFFFFF" size="3" wide="no" center="no" radius="auto" icon="icon: shopping-cart" ...
0
votes
1answer
26 views

Shortcode for a Series of Elevating Image Files, Excluding a Range?

I'm not sure if shortcodes have the capability of doing this and could not figure out how to do it on my own. Is this even possible? I have a series of images in several folders outside of WP. They ...
0
votes
1answer
46 views

On selecting shortcode generate selected shortcode table inside page editor worrdpress

i want to create a different different shortcode while choose particular shortcode relative table is show on page editor for example when user choose [some_random_code_sc] that shortcode then relative ...
0
votes
2answers
59 views

Capitalize Shortcode Value on Output

I wrote this shortcode to take a filename I specify and output it as an image with title and alt tags: function cwc_pkmn($atts) { extract(shortcode_atts(array( "name" => 'http://', ...
0
votes
1answer
78 views

Replace shortcode in substring

I've created these two functions to toggle between the first paragraph of the content and then everything but the first paragraph so when the user selects 'More' it slides out the article smoothly ...
0
votes
1answer
40 views

Content between shortcodes

I am wondering if there is a way to take content between shortcodes and input it into a string, for example, I want to be able to have [shortcode]Hello World![/shortcode] input to a string called ...
0
votes
0answers
29 views

Wordpress Plugin Shortcode Help

I am trying my best to get rid of this pain when creating a Chart Plugin. I have registered custom post type to add every single chart with specific meta boxes. Everything works fine except the ...
0
votes
0answers
23 views

PhotoPress Gallery plugin cannot retrieve my photos after overriding the gallery output

I am using PhotoPress Gallery plugin and PhotoPress taxonomy by padams to create a gallery using terms and keywords on my Stock Photo site. It's working well until I decide to override the Gallery ...
0
votes
2answers
125 views

Shortcode won't execute

I've created a shortcode using my limited knowledge, google, and stackexchange to do so. But when I load the page, it loads above the page contents and appears as html text. (shortocode text) ...
0
votes
1answer
33 views

Redirect loop upon installation of my plugin

I have created a plugin that uses a shortcode [MyCreditStatus] to display a form (multi-page form). This plugin uses an API that I also made. When I try to install the plugin, there are times that ...
0
votes
2answers
65 views

Shortcode for printing post titles

I am trying to make a shortcode to print a list of post titles. This is what I have so far: function test( $atts , $content = null ){ $args = array( 'posts_per_page' => 3 ); $lastposts = ...
0
votes
1answer
24 views

Call Shortcode on wp_footer

Is it possible to call shortcode outside of post/ page content area? I am trying to add it to wp_footer with the following codes but it's returning string: add_shortcode('eps_pop', 'init'); function ...
0
votes
1answer
54 views

Posting code inside the post instead of in the template file using shortcode

I am using two plugins one of which is Thumbs Rating which have have a shortcode like this for example in order to display the thumbs rating option: The code bellow is to be used in the templates ...
0
votes
0answers
12 views

Code formatting: Gists vs Embedded

It seems that there are at least a couple different methods of working with code in WordPress entries and posts: GitHub Gists (via the Gist Shortcode plugin, etc.) Inline formatting in a <pre> ...
-2
votes
2answers
99 views

Set variable in javascript and using in my shortcode

my script is function($) { var google_map_address = $('#address').text(); $(function () { $('#gmap').gmap3({ marker: { address: google_map_address }, map: { options: { ...
0
votes
0answers
36 views

Parse shortcodes from another site in WP Multisite

I'm retrieving a list of posts from various sites in a multisite installation using the following method: $posts = lc_main_eh_posts(); foreach ( $posts as $post ) { setup_postdata($post); ...
0
votes
0answers
31 views

User added CSS to alter shortcode

I am creating my first plugin and so far it has gone well. It is very simple thing that calls the css file up and allows users to add shortcodes which will then create different colored backgrounds ...
0
votes
0answers
23 views

Load post shortcode content into fancybox

I'm wondering if it's possible to load shortcode content entered into a custom field into a fancybox overlay? And if so, could anyone maybe point me in the right direction as to how I might go about ...
0
votes
0answers
79 views

Where to replace short code

Hey I am new to wordpress and web design in general. I just downloaded a plugin that helps edit navigation menus. The plugin is called Simple Responsive Menu. They are asking me to " Add shortcode in ...
0
votes
2answers
131 views

Add shortcode within the_content()

I'm trying to add a shortcode within the text of the_content(). It is possible to add it to the beginning or the end however I cannot figure out how I would get it to show after say 200 characters. ...
0
votes
1answer
29 views

Trying to the deduce shortcode from a function

I have a theme where the wysiwyg button to insert the shortcodes is not appearing. I am trying to manually type in the shortcode that would output the tabs that I need. I am looking at the function ...
1
vote
1answer
536 views

Rewriting WordPress Gallery Shortcode with Bootstrap Carousel

In a recently personal theme project for publishing travel posts, I desired a slider-style image gallery rather than the standard column/list-style one WordPress uses out of the box. I like the ...
0
votes
1answer
60 views

Parsing a shortcode through an author meta textfield

I have been using the UPME plugin to design a member profile website that allows me to take information and show each user different profiles depending on a shortcode I put into a textarea field. The ...
0
votes
1answer
41 views

OOP and WordPress shortcode

I tried to add a shortcode this way class MyPlugin { function __construct() { $this->make_shortcode(); } function ShowMsg($cls, $lst4) { $data = ...
0
votes
1answer
40 views

Echo out element to another page.

I have a small plugin that displays how many submissions are left on current ninja form. And writes it out as so <p id="submissions-left">hurry only 25 submission left. <\p> And tacks ...
0
votes
1answer
200 views

Adding YouTube button to TinyMCE editor

I found a code set to add a YouTube button to the WP tinyMCE editor that I am now trying to incorporate into a Thematic Child theme. The code already works in a non-Thematic theme however, when I add ...
0
votes
1answer
34 views

How to get my [shortcode] rendered on the home page, other pages are fine

I'm using a child theme of Pixlex. The theme has a options panel to let me choose wether I want 2 or 3 columns on the home page and if those columns are to be filled with a post or page. I have one ...
1
vote
0answers
77 views

wp_editor in thickbox

I am updating a shortcode generator that I made before and I want to add in addition to text areas inputs etc.. a tinymce editor, so I call wp_editor in the ajax content of the thickbox, the editor ...
0
votes
1answer
32 views

Checking post content for a shortcode, but content is being returned as empty

Alright so I am trying to check for a shortcode in the post content so that I can enqueue scripts as necessary. I have this: if( plugin_has_shortcode() ) { // Load CSS ...
0
votes
0answers
15 views

Check if shortcode is self-closing and then displaying it

I'm using this snippet: http://wpsnipp.com/index.php/functions-php/update-automatically-create-media_buttons-for-shortcode-selection/ which give me a list of all my shortcodes and always prints like ...
0
votes
0answers
100 views

How to use Shortcode Plugin with AJAX loading?

I'm using Wordpress 3.9.1 and a Theme that utilizes AJAX loading. (the site is here: http://phoenixwave.com/test/ ) I've installed a plugin to add more shortcode abilities. Problem is, once a page ...
3
votes
1answer
190 views

Make shortcode work with nested double quotes

I have following shortcode: function infobox_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( 'src' => '', 'title' => '', 'text' => '', ), ...
0
votes
1answer
71 views

Allow user to input shortcode into wordpress widget

This is my first widget, so I'm new to this, but I want the ability to add 6 different shortcodes to the widget that the user can set. The question is this, how do I get the plugin to allow the user ...
0
votes
1answer
32 views

the_time function inside HTML dom parser

I have recently bought a theme, where I want to modify some things. The theme makes use of shortcodes. One of these shortcodes is adding the most recent posts. In these most recent posts is the date ...