Tagged Questions
1
vote
2answers
68 views
Automatically add this attribute to the gallery shortcode
When inserting a gallery it adds the following shortcode:
[gallery columns="6" ids="18,150,146,23,147,17,21,20,22"]
I would like it to automatically add link="file" as the last attribute, whenever ...
0
votes
2answers
79 views
Escaping quotes from shortcode attributes
I have been trying to figure out how to escape quotes (single and double) from shortcode attributes.
Basically the content is written by the user and therefore can potentially include " and ' quotes. ...
2
votes
1answer
46 views
getting values from a shortcode with an include
I have a checked a few links but nothing seems to for me in getting the attribute value of a shortcode so that I can use it in a condition.
function bf_shortcode_slideshow($atts) {
...
2
votes
1answer
138 views
wpautop() when shortcode attributes are on new lines break args array
I have a custom shortcode tag with a few attributes, and I would like to be able to display its attributes on new lines - to make it more readable to content editors:
[component
attr1 ="value1"
...
1
vote
1answer
220 views
Caption shortcodes not including caption as attribute
I recently installed the bonpress theme and am having trouble with the captions showing correctly. The more I try to understand how captions are supposed to work in Wordpress, the more I suspect ...
1
vote
2answers
521 views
Remove width and height attributes from [gallery] output
WordPress automatically adds the width and height attributes to [gallery] shortcode images.
How to delete these attributes? Something like this but for [gallery] output.