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.
2,764
questions
0
votes
0
answers
20
views
How do I preload a Shortcode in Wordpress [closed]
I have a shortcode [ws_form id="1"]. This shortcode is to display a fillable form on my website. This form is present on most of my webpages and I would like to preload it. How do I do that?
...
1
vote
1
answer
39
views
How to create a three column blog layout with a single query and with three different classes?
I am trying to achieve the following layout :
I have created a shortcode for this but I am not getting the desired result. Can anyone guide me where I am getting it wrong. Here is full shortcode. ...
0
votes
0
answers
11
views
How can I remove the wp_autop filter from a shortcode block in a block theme page template (twenty twenty-three)?
I am using a custom page template in the "twenty twenty-three" theme. I am using a shortcode block as part of the template. This results in the shortcode not running within "the_content&...
0
votes
0
answers
27
views
Shortcode to return data instead of outputting HTML?
I’ve got a shortcode plugin which allows me to output a block of HTML in one of a few different formats based on parameters.
[mm-postlinking]
[mm-postlinking id="281493" template="...
0
votes
0
answers
20
views
Add Shortcode functionality to a function that queries custom post type / taxonomy
How to output a UL of items and URLS for custom taxonomy?
The plugin 'CPT UI' (Custom Post Type UI) is very good at creating custom post types.
I have created a post type called 'Towns' that has a ...
0
votes
1
answer
77
views
Calling a function via a shortcode in javascript
I'm looking to dynamically change the page-comments option based on whether the user clicks a URL.
I have two functions to do this:
function psb_comment_listener_func(){
echo "
<...
1
vote
0
answers
15
views
Custom Plugin not Displaying in the Website Production environment (Divi)
I built a custom plugin for a website Using Divi and I am facing a problem right now getting it to display in the production environment of the website. Here are the details:
Since you can't really ...
0
votes
1
answer
41
views
Adding a css class to the gallery
I'm using WordPress 6.5 with the old editor, I'm trying to add a CSS class on the div gallery when it specified in the shortcode, the code doesn't work, can you help me ?
function custom_gallery_class(...
0
votes
1
answer
27
views
I have a php function with a shortcode to add share buttons, but I'm having an error!
I use a php function to create and add share buttons to specific places through a shortcode. It work's fine, but I'm getting this error:
Warning: Array to string conversion in ...142-custom-shortcodes....
0
votes
1
answer
18
views
Show shortcode output in menu
I would like to show shortcode output in menu like below.
How can I do that ?
0
votes
1
answer
23
views
Array to String Conversion warning in shortcode
I have a shortcode that I have been using for awhile that is suddenly causing a warning in WordPress 6.5 the error is "Warning: Array to string conversion in ... on line 109" - line 109 is ...
0
votes
0
answers
12
views
Product description is mixed in shortcodes
Product description is mixed in shortcodes I am trying to remove the shortcode in the google feed description. Descpription is not looking very good.If anyone can help , I tried searching on google ...
0
votes
1
answer
31
views
Why does my JavaScript work in the browser console but does not work in my shortcode?
I am trying to create a shortcode the user can just insert which creates a button that loops through an array and displays it or hides it. On page load I want every item with an index >= 1 to have ...
0
votes
1
answer
34
views
Getting the wrong featured image on archive page
I assigned my posts archive to a site on settings -> reading.
I added a post thumbnail to this site, and i want to show the image with a shortcode i have written in my plugin. The problem is, that ...
0
votes
0
answers
39
views
How to add button to WYSIWYG to insert shortcode with params (filled in system popup)?
It seems to me that there must be a solution, but I haven't found it.
During the theme development process, we create many shortcodes for inserting unusual html layouts into the text.
It would be ...