The attribute tag has no wiki summary.
0
votes
2answers
121 views
Slider do not add alt attribute. Cant get alt attribute from a media library!
I use a slider to show my post thumbnails. But the problem is that the slider adds thumbnails without the alt attribute:
<img src="http://example.com/wallpaper-791556-1180x500.jpg" />
But I ...
1
vote
2answers
63 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
0answers
28 views
Adding New attribute in wordpress
I'm using Wordpress to implement the website:
The pages in my templates should be sliding vertically, so there is a 'Next' button in the end of each page. Now my problem is in the admin section ...
0
votes
2answers
73 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) {
...
0
votes
1answer
183 views
Remove image classes from post thumbnail output
I wish to remove the image classes generated by default in the output whenever post_thumbnail() is called -
<img width="1024" height="768" ...
0
votes
1answer
35 views
Problem Locating and Changing Alt Attribute Of Link
I'm a totally amateur so please dumb it down for me.
My WP them has a Social Links in the header of the theme and I want to change the Linkedin link link to a Pinterest link and change the Alt ...
1
vote
1answer
305 views
Remove 'rel' attributes from the_category() output
I am trying to get the categories associated with a post in it's meta section by using the following code:
<div>FILED AS: <span class="gf-post-meta-result"><?php the_category(' ...
0
votes
2answers
138 views
Stop wordpress from removing HTML attributes
I try to insert a post with html tag with class attribute, like this: <dl class="dl-horizontal">, but after saving the post, WP removes an attribute.
How can I fix it?
The only way I've found, ...
1
vote
2answers
302 views
Removing width and height attributes from wp-get-attachment
I'm using this http://www.ghosthorses.co.uk/production-diary/removing-inline-img-dimensions-for-responsive-wordpress-websites/ to remove the height and width attributes of images. Everything works ...
1
vote
1answer
518 views
Adding width and height to wp_get_attachment_image_src
I'm trying to add the width and height attributes to the wp_get_attachment_image_src. Why is this returning width and height:0?
<?php
$image = wp_get_attachment_image_src( get_post_thumbnail_id( ...
2
votes
1answer
137 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"
...
0
votes
1answer
229 views
Remove height attribute from wp_get_attachment
I found this great solution: Stop wordpress from hardcoding img width and height attributes
But I was wondering if I could do it only in one specific case and not in all the site because it messes up ...
1
vote
1answer
211 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 ...
0
votes
2answers
502 views
Replace image attributes for lazyload plugin (data-src)
I want to apply jquery lazyload plugin. For this to work I have to create a new attribute which is data-src place there the src value and then replace the src value with a specific value ...
0
votes
1answer
337 views
Echo title attribute php
I have the following in functions.php:
function twentyten_continue_reading_link() {
global $id;
return ' <span class="readmore"><a href="'. get_permalink($id) . '" title="' . ...
1
vote
2answers
511 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.
0
votes
1answer
438 views
How to retrieve alt attribute for an attachment (uploaded image)?
I have some IDs of attachments (images, not from current post). How to I get the alt attribute for those images?
I have tried to look into wp_get_attachment_image_src and wp_get_attachment_metadata ...
0
votes
1answer
78 views
WordPress strips some attributes for author posts
I added template to my WP posts, so when you click Add New content area alreday with text.
Template smt. like this
<div id="myDiv"><p>Add your text here</p></div>
If user ...
4
votes
7answers
2k views
How can i add title attributes to next and previous post link functions
It's a pretty simple question really! For some reason a title attribute is not appended to next_post_link and prev_post_link calls in Wordpress.
Anyone got any tips on this?
Thanks