The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
16 views

Paginate product variations during product edit

I have a client who has a large number of variation for some products which is causing admin to hang when editing any of the affected products. I have increased max_input_vars to 5000 but this didn't ...
0
votes
0answers
21 views

Need help to show content dynamically based on a products meta/taxonomy [closed]

I have a site based on woocommerce. What i'd like is to be able to show ads based on the products attributes. IE. if product attribute is $attribute1 show the $attribute1 ad-code from external file ...
0
votes
0answers
13 views

Shortcode displays only default attribute values

For some reasons every shortcode, that I try to add to functions.php, displays only default attribute value and ignores what I specify in a post. E.g.: function my_shortcode( $atts ) { extract( ...
0
votes
0answers
61 views

Using get_terms() as shortcode attribute

Hop you pepople would be fine. I'm creating a shortcode with the following code. $categories = get_terms( 'project-type' ); foreach ($categories as $category) { ...
0
votes
1answer
57 views

Passing variable in nested shortcodes

How can I pass style attribute of [boxes] shortcode to [box] shortcodes without using global variables? I don't want to use global variables, because I saw on a few articles that using global ...
0
votes
1answer
41 views

How to hide a custom field from admin?

I created a custom field that I would like to hide from the wp-admin (because the system generates it and I don't want user to change it; Hidding it with CSS should be OK in this case), Like this, ...
0
votes
0answers
211 views

Woocommerce slider for related products based on category

I'm using the theme scrollider on a Woocommerce site. I want to display a slider with related products at the top of each category page, before the content. At the moment I've done it manually by ...
0
votes
0answers
146 views

Adding Custom fields to woocommerce edit order page

I have a woo commerce shop selling dated courses... as the courses vary in content slightly (even if they are similar in content) and because we need to have courses listed in date order, (we have ...
0
votes
0answers
32 views

Filter posts with missing attributes

I'm doing house-keeping on my posts, and a lot of IMG tags in my old posts do not have class="alignnone size-full wp-image-xxx" or width="xxx" height="xxx". The attributes are needed for responsive ...
2
votes
1answer
146 views

Get multiple shortcode attribute values

I'm trying to get several values from a shortcode. I tried several things without success. The shortcode looks like this: [myshortcode metakey="<field_key:key1, title:Title ...
0
votes
0answers
81 views

Create attribute for woocommerce on plugin activation

I want to create attribute on plugin activation.By below code,i'm able to create attribute in database table prefix_woocommerce_attribute_taxonomies but these attributes are not showing (or listed ) ...
2
votes
2answers
393 views

Pass boolean value in shortcode

In WordPress shortcodes, how can I pass boolean attributes? Both of [shortcode boolean_attribute="true"] or [shortcode boolean_attribute=true] are giving string values. EDIT There would be no ...
0
votes
0answers
26 views

How can I make a widget to work only for the products from the current category?

I have an ecommerce wordpress website with Woocommerce plugin. On category pages, I have a widget that filters the products by attributes. But the problem is that the filter works for all the products ...
0
votes
1answer
67 views

Show or hide lang=“ur” in main <body> element

I have RTL website in URDU language. lang="ur" is hard coded in main body i.e. <body lang="ur" <?php body_class(); ?>>. Now I want to replace attribute with some PHP code that will show or ...
1
vote
0answers
129 views

Add ALT attribute to Pin It Button image to pass HTML5 validation

I am using the Pinterest "Pin It" Button plugin so I can add to my posts/images. However, part of the Pin In button uses this code: <img border="0" class="pib-count-img" ...
0
votes
0answers
70 views

Remove “align” attribute on images

I'm trying to get rid of the non W3C compliant "align" attribute generated with any images. For that, I'm using the simple_html_dom library. Here's the code i'm using : add_filter( ...
2
votes
2answers
83 views

How to handle valueless attributes in shortcodes?

Some HTML elements accept valueless attributes such as <input disabled /> or <video autoplay /> How do I handle this case with shortcodes where I want to disable autoplay by default (= ...
0
votes
1answer
75 views

Saving a post, content filtering and user levels

I wrote a function to add and insert additional metadata to images. It looks like this: function add_image_orientation_fields_to_edit($form_fields, $post) { $current_value = ...
0
votes
2answers
843 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 ...
2
votes
2answers
908 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
3answers
888 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
64 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
1k 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
44 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
605 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
539 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
782 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
2k 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
220 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
2answers
510 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
3answers
496 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
1k 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
541 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
1k 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.
1
vote
1answer
653 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
105 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
3k 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