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

wordpress Shortocode running twice?

I developed a plugin for my citrus payment gateway.I created a shortcode to manage it. It was running absolutely fine some days ago.Now I don't know who changed what, now that shortcode is running ...
0
votes
0answers
12 views

Cannot send session cache limiter - Headers Already Sent

Error Messages is as follows : Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ...
-1
votes
1answer
17 views

Php inside the shortcode is getting commented

<?php echo do_shortcode('[learn_more caption="ancila"] <p> <?php echo get_post_meta($postid,principal_1,true)"; wp_reset_query(); ?> </p> ...
0
votes
1answer
21 views

Next Post links not working in custom post type shortcode

I'm trying to paginate some custom posts types, and the previous link works, but not the next link. I tried several ways but I'm not able to find the correct one... if anyone could help :) This is ...
0
votes
0answers
15 views

template_redirect to accompany with a shortcode

In one of my plugin's shortcode I'm handing user login / registration on the fly with a post submission. So the whole thing is happening within the shortcode like: <?php function this_shortcode() ...
0
votes
0answers
28 views

Short codes not working - not rendering

I have a brand new (few weeks old) Wordpress blog for my lake house. I downloaded a nice theme (Bentuestu) suitable for rental properties and then tried to use the short codes from that theme on the ...
0
votes
1answer
12 views

Iterate through each menu item into a shortcode

Since i cant easily use short-codes in the menu, is there a simple way to iterate through all a menus label through a short-code? For example say i created a few custom link menus with labels of ...
0
votes
0answers
14 views

add_filter post_gallery and do_shortcode

I'm attempting to swap out short codes on the fly but having an issue that I'm hoping someone can help with. Basically I've added a "Gallery Type" option to the wp.media library and am using the ...
0
votes
0answers
12 views

Shortcode and return value? [duplicate]

I have made a shortcode that works fine except that it's always displayed on top of everything. If I for example add som text or images it will be displayed under the shortcode on page where it's ...
0
votes
1answer
10 views

Is there a function to search for a wildcard value when calling a shortcode?

I'm using a plugin to generate a form and rather than inserting the form on to the page using the content editor I'm adding it directly to my template. The problem is that on my local version the id ...
0
votes
0answers
11 views

image map in a widget

I have an image that is inserted in a widget via shortcode. You can see on the bottom-right of footer that the image is actually an image map. My problem is that I have no idea how to hook the map ...
1
vote
1answer
17 views

do_shortcode with custom field

Ok I suck at PHP, so I'll explain this in "English" first then proceed to code. I've got a custom field in my WP DB called ecpt_imdb - this is the numeric value of a movie from the imdB. For example: ...
0
votes
1answer
27 views

How to make shortcode which returns HTML?

I need to make a shortcode button to TinyMCE editor which, in the moment i click it fills up the content part with HTML. When i click on button i need something like: <div> ... </div> ...
0
votes
0answers
20 views

Serializing URL via wp add_shortcode to auto select from option list onload

first time in the wordpress stackexchange community! Great that there is such a thing... Scope: Use of the add_shortcode method to use url string to automatically select options in a scraped table on ...
0
votes
1answer
22 views

Shortcode in a blog post, footer and related products stop working

I have a problem, I develop a shortcode, and it works fine just that when I put it in a blog post, footer and related products stop working. I show you my code I hope you can help me. <?php ...
0
votes
1answer
10 views

How do I use “while” and “end while” inside of the echo do_shortcode with ACF Repeater?

I feel like I’m so close, but just need someone to help assist me with getting this working. I’m using a repeater field with Advanced Custom Fields and am using the echo shortcode, but only need part ...
0
votes
1answer
30 views

Where are theme codes located for WordPress?

New to WordPress. Searched this site and google for an answer to this question; can't even find a mention of what theme codes are. I'm being told by a plugin to alternatively add a line of code to my ...
0
votes
3answers
60 views

php string inside shortcode does not work

I want to automatically get products from woocommerce for a chosen brand, inside a brand's listing on a other part of the site using Sabai Directory. this <?php ...
0
votes
1answer
20 views

Overriding shortcode $atts for featured products

Hi – in my theme (mystile) i am limited to determine the number of featured products displayed on the homepage. But I cannot assign the columns. Shortcode does not apply because the homepage is ...
0
votes
0answers
17 views

Create dynamic content in Wordpress Shortcode

can i create content (mean html markup with my data) dynamically, and place this in my shortcode? i have Visual builder where i can add some html elements inside my shortcode, shortcode looks like ...
0
votes
0answers
4 views

Jetpack Post by Email at specific Date and Time?

Currently, I can post by email using the Jetpack plugin and I can use the [delay] shortcode to set the date it should be published. However, I need to set the time of day it should be published as ...
0
votes
1answer
19 views

How to Output HTML tags in do_shortcode?

i want to output html tags in do_shortcode(); function <?php echo do_shortcode($content); ?> is it possible? thx!
0
votes
1answer
13 views

Shortcode tags appear on mobile themes

I want to use a mobile theme plugin for mobile formats. I tested five different mobile plugins and they all display my shortcode tags upon rendering on a mobile device. The user will see the ...
0
votes
1answer
29 views

Create dynamic content from one WP page to multiple other pages

I want to create dynamic content that is taken from a specific paragraph from one page and writes to a paragraph on multiple pages that feature that same content. I am new to PHP and not sure how to ...
0
votes
1answer
19 views

How to show the view more on my display of pages shortcode

I want to show the list of childpages under a certain parent page & set how many childpages to display & show the "View More" link below the last child page displaying. What was missing from ...
0
votes
1answer
22 views

How to echo an array returned by a function

I am trying to display a list of items retuned by an array by using do_shortcode(). The problem is I have to use echo statement with do_shortcode and in my function I have to a foreach loop which ...
0
votes
1answer
30 views

Easy way to show excerpts of specific posts on a page

Suppose I have 3 posts on my wordpress site titled: Test_post_1 with tag test_tag Test_post_2 with no tag Test_post_3 with tag test_tag Suppose now that I have one page titled page_1. On that page ...
0
votes
0answers
19 views

How to display the 3rd & 4th level children only, using get_children()?

I found this code & edited it for my needs. How can I only display the 3rd & 4th level child pages of "Home"? I just want to display the 3rd & 4th level child pages because that's the main ...
0
votes
0answers
8 views

TinyMCE Custom Styles or Shortcode Components?

One of the WordPress theme projects I'm working on for a hiking and travel blog adds additional facts and notes in small info boxes about the particular topic being discussed. For instance, on a post ...
0
votes
0answers
17 views

Shortcodes on instagram

I want to embed my instagram picture using a shortcode, I don't want to copy the link and paste it as other forums suggest because our editors will be the ones adding embeded links. I also do not ...
0
votes
0answers
24 views

Content Section Custom Anchor Not Working

I purchase WP theme (Techwise) and I found an issue with content menu sidebar in post page. that content not working as same (toc) Table of Content. it's not working with Arabic letters but working ...
0
votes
0answers
16 views

How can I to add css or js to wp_head from shortcodes or widgets? [duplicate]

How can I to add css or js to wp_head generated from shortcodes or widgets?
1
vote
2answers
64 views

Extending Shortcode attributes

I've searched many places and tried many ways for this but no success. I have a shortcode in my WP Theme like; [recent_posts layout="thumbnails-on-side" columns="4" number_posts="4" offset="" ...
0
votes
0answers
25 views

Plugin Error on activating

I'm building theme. but for custom post type, custom taxonomies and shortodes . I created the simple plugin. just plugin info and then functions to create CPT CT and shortcode. here is the example: ...
0
votes
0answers
16 views

Get the excerpt length to return attribute

I am writing a shortcode where I would like to set a number to an attribute and then return it in the excerpt. So the shortcode [excerpt_test=10 another_option=something] gets me the excerpt length of ...
0
votes
1answer
23 views

Nesting shortcodes results in the inner shortcode being placed AFTER outer shortcode

I'm trying to use nested shortcodes, but i'm having problems with it. Everytime i try to nest two shortcodes created by me... First declared in functions.php (the inner): function ...
0
votes
1answer
15 views

shortcode which is introduced into entry the blog, and appears in side bar

I have the following shortcode plugin, it works perfectly, nothing more I want to put you in the blog and appear in the sidebar, how I can accomplish this? I want not put a widget in the sidebar, ...
0
votes
1answer
92 views

How to insert HTML/CSS/JS into my iframe plugin?

I currently have an iframe plugin that displays on a WordPress page by shortcode. Currently I have been displaying websites in my iframes "src" but I recently came across an issue to display my very ...
0
votes
1answer
40 views

Create a shortcode to use in visual editor

I'm using Visual composer and i can't use php code inside boxes but i can use shortcodes. I know i must use function inside my functions.php file I need only a example/help for one and i will ...
1
vote
1answer
35 views

Can't understand $atts in functions?

I'm not sure if I don't fully understand the basics of functions in php or maybe it is WP convention that I am not sure of. My question is why use an argument in a function when it is not going to be ...
0
votes
1answer
35 views

Using $this from child class inside shortcode function

I am building many custom shortcodes and to off load a lot of reusable code I created an abstract base class for all my shortcodes classes to extend. However when I try to use a reference to $this ...
0
votes
0answers
71 views

Limit the number of successful logins

I would like to retrieve the number of successful logins of a user and act accordingly. If user logged in more than 10 times, then log out user automatically with wp_logout() or similar. I would ...
0
votes
2answers
66 views

Ajax not returning anything on form submit

I am working in wordpress and on pressing the submit button I want the function to return result through ajax and result should be shown as an alert on the screen. But when I press submit nothing ...
0
votes
2answers
40 views

how to create shortcode in wordpress

So I have the following code: <span class="delete"><a onclick="return confirm('Are you sure?');" href="<?php echo wp_nonce_url( add_query_arg( array( 'action' => 'my-delete-product', ...
0
votes
1answer
63 views

Woocommerce Filter Main Loop by Tag [closed]

Two questions: How can I modify the query results of the archive and search pages exclude the product-tag "audio"? How can I make the Recent Products shortcode of Woocommerce exclude the product-tag ...
0
votes
1answer
24 views

How to trace shortcode to its functionality

I am trying to modify a plugin and I need to trace its shortcode to the functionality page(s). Is there a way to parse a shortcode?
1
vote
1answer
74 views

Execute Closing Shortcode After the_content

I need to execute a short code on thousands of posts which don't already contain the short code as i've added some manually. I'm using another function to add the opening short code after the 2nd ...
0
votes
1answer
21 views

Saving post content to database with do_shortcode?

I'm working on a project where I use WordPress admin hooked up with Laravel. I use WP to edit and create posts and Laravel to query the database. I also use shortcodes. Is it possible to call the ...
0
votes
1answer
29 views

How to convert query sql to shortcode in wordpress?

I want to make a shortcode like this [myshorcode:2:drinks], and query-wrangler I have managed to get the following query that shows me 2 products of a certain taxonomy PHP WP_Query: $query = array ( ...
0
votes
1answer
32 views

Shortcodes: override a shortcode / change shortcode on the fly

I've done a plugin where you can add shortcode like this: [myplugin xx] (where xx is a number which calls a specific content xx). I have to do a multilingual version of my plugin, so here's my trick: ...