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

How to get URL param to shortcode?

I can't find solution for this ... URL: www.foo.com/some_page/?name=John Page content: Hi [Name]! Worpress still redirects back to www.foo.com/some_page/ I tried everything ... I need ...
0
votes
0answers
11 views

Plugin to encrypt url in base64 [on hold]

hello friends hope to help with this plugin created for decoding base64 urls ... The problem is that encrypts urls. I hope I can help change it. <?php /* Plugin Name: Links Plugin ...
0
votes
0answers
8 views

Getting categories from DataBase & WP Favorite Post

I am trying to create a shortcode that pull the most saved posts (using WP Favorite Post) and displaying them by YEAR, MONTH or CATEGORY. So far I have been able to get the year and month working ...
0
votes
1answer
22 views

Wordpress Short code with additional parameter

I am using twitter boostrap in my recent project . I want that the post or page content will split into columns. For doing this I am declaring several shortcode like this function ...
-1
votes
0answers
28 views

How can I pass a foreach variable into a do_shortcode function?

In my functions I created a shortcode, note the "$array_single": <?php add_shortcode( 'my-shortcode', 'my_custom_query_shortcode' ); function my_custom_query_shortcode( $atts ) { ob_start(); ...
0
votes
0answers
22 views

Show Custom Post id in shortcode button on tinymice editor

I have created a custom post Testimonial for my custom theme and i have to display posts using shortcode , i want a shortcode button on tinymice editor so i create a js file for shortcode button Here ...
-1
votes
1answer
45 views

Add the results of a custom query into a do_shortcode

I'm trying to add the post list from a custom query while ( $the_query->have_posts()) : $the_query->the_post(); into the content of a do_shortcode. How can I do this?
0
votes
1answer
30 views

Preserve shortcode content formatting

How can I preserve the formatting of the content within a shortcode block when I switch back and forth between the visual and text editor in TinyMCE? As in, the stuff between [myshortcode] and ...
0
votes
0answers
26 views

Content not showing when using my self-programmed shortcode in a custom sub field (ACF) [closed]

I'm using Advanced Custom Fields with a Repeater-Field to display the Content of my page. So I made three fields per Row (Left Content, Middle Content and Right Content). In my Template I get the ...
0
votes
1answer
20 views

do_shortcode close

I am using the jscrollpane plugin on WordPress along with the advanced custom fields plugin. The jscrollpane plugin uses the following shortcodes: [vr_jsp] [/vr_jsp] I have two different custom ...
-1
votes
1answer
22 views

Custom fields doesnt work well with any postTAB plugin

Here is my problem: I tried to implement custom fields (text) within a post tab. I tried many post tab plugins and the imlementation to template was succesfull... Unfortunately, the content of the ...
0
votes
1answer
45 views

Passing postid of Testimonial Custom Post in Shortcode Parameter

I am trying to create Testimonial custom post and display using shortcode function create_post_type() { register_post_type( 'testimonials',//new post type array( ...
0
votes
1answer
58 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()) : ...
0
votes
1answer
12 views

Why can't I display attachment_image_src with Custom Size?

I'm trying to display an attachment with a custom size that I created with add_image_size called "custom-size-01" What the code returns is the word "Array" I've looked at the wordpress reference and ...
0
votes
0answers
15 views

Shortcode to get child pages of multiple parents (using parent slug)

I'm using a nice shortcode to get the child pages of a specific page, using just the parent page slug. [getChild name="page-slug"] This is done using this code: function getChild_function($atts){ ...
0
votes
1answer
41 views

Change Spaces to Dashes?

I'm using this shortcode function to make flag icons. When you do [flag name="United States"], it outputs United States.gif and "United States" in the alt and title tags. However, I was wondering if ...
-1
votes
1answer
28 views

Why is my ajax live search not working when i use a shortcode to call it?

I've finally managed to get my live search in Wordpress working, but it only works when i directly call it in the class. I want to put it in a shortcode, so i can call it on every page i want. But ...
0
votes
0answers
16 views

shorcode to integrate into wordpres adfly?

Just one Just one shorcode implmentar adfly to integrate into wordpres The thing is that if someone can change so that users can use their own ID? implmentar adfly to integrate into wordpress ...
0
votes
2answers
60 views

Get a post's thumbnail url or display default image in shortcode

I'm trying to get my code to: Get a post's thumbnail url or (if no thumbnail there) to Echo a default url I'm not sure if I am going the easiest way or right way about this. This is the code so ...
0
votes
1answer
12 views

How to pass an array as attribute of shortcode to work properly shortcode parser?

echo '[test attr="'.json_encode(array('test'=>'my[][dfd]dfds[][][')).'"]'; //How to safe pass the array as attribute in shortcodes ?
0
votes
2answers
28 views

How to have Function of a plugin using global vars into a shortcode?

I am trying to convert this piece of code into a shortcode so it can be used inside my posts. Is it possible? I cant think of how to do it as I am beginner in wordpress and learning via books/youtube ...
0
votes
1answer
37 views

Custom Post Type vs Shortcode: Which one is more performant?

I am designing a Wordpress blog where I will have two types of posts: a. Normal posts; regular posts with a number of text paragraphs b. Posts with table content, where the table structure will be ...
0
votes
1answer
37 views

How can I run shortcode after click with ajax

I have a little problem and need your help. I have tabs on my page and in one tab i have google maps. This tab is hidden by default and when i clik on it, i can see only small piece of maps. Map it is ...
0
votes
0answers
49 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
34 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
170 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
40 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 ...
-1
votes
0answers
13 views

Integrating a back-end plugin to the front end

I'm trying to take a plugin which is only accessible through the admin panel backend and bring it to the frontend. Specifically, I want users to be able to access the RSP Sharing plugin front the ...
0
votes
1answer
32 views

Shortcode Display From Wordpress Dashboard Page Without Using post_id

I have to code for showing recent post on my home page custom theme it works good function.php code function my_recent_posts_shortcode($atts){ $q = new WP_Query( array( 'orderby' => ...
0
votes
2answers
29 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
27 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
19 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
35 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
36 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
24 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
39 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
18 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
33 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
44 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
51 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
22 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
25 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
40 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
1answer
46 views

CF7 Shortcode with PHP

Using Contact Form 7 DB plugin I am able to run the shortcode [cfdb-value form="List Store" filter="store-name=my store"] But I want to use like [cfdb-value form="List Store" ...
0
votes
2answers
49 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
27 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
36 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
28 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
14 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
112 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) ...