The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
3answers
935 views

Filter to hook into menu <li> items and add a custom attribute

I'm using Foundation as a base and starter theme. I'm trying to build and I can't seem to figure out how to hook into the menu that WordPress outputs and add a custom attribute to that menu's ...
-3
votes
0answers
7 views

How can I extract all products (and their attributes), and display+order them as text/links in a table? [on hold]

My client is giving courses/training, and his customers can order their place through Woocommerce I made the attributes 'date' and attribute 'time'. For 'date' there are 3 values; august 4, august 8, ...
0
votes
1answer
200 views

Delete all per-product attributes in WooCommerce

Is there a method to find & delete most/all attributes for products in WooCommerce when these attributes are unique to each product, that is they don't appear under the Product->Attributes menu? ...
0
votes
0answers
9 views

WP REST API - Remove Style attr after updated post

Like I want to put some content like : <div style="background-image:url(example.jpg)"></div> So after saved : <div></div> I using something like : function ...
-1
votes
1answer
40 views

Pragmatically adding product attributes to WP / Woo commerce

I am inserting a quantity of products, categories and attributes to a wordpress database. My method is to copy a selection of source data tables from my off-line database (not in wordpress format) ...
0
votes
0answers
25 views

Cloning terms for an attribute

I am trying to duplicate terms for a product attribute. I was able to set up a "Clone" link from my previous question. I can successfully clone the attribute, but I am having trouble assigning ...
3
votes
3answers
75 views

How to add 'class' attribute into shortcode [audio]?

I would like to style two MediaElement players on the same page differently, and figured out the easier way to do this (compared to adding a completely new shortcode and enqueueing a new stylesheet, ...
0
votes
1answer
50 views

Check if CTP category taxonomy is set in shortcode

I have created a custom post type with the ability to add categories (taxonomy). Taxonomy function create_cat_tax() { register_taxonomy( 'cpt_cats', 'cpt_faqs', ...
0
votes
0answers
22 views

Parent Under The Page Attribute WordPress 4.2.2 Is Missing

Parent under the Page Attribute panel of WordPress 4.2.2 is missing. At first I thought because I am using Child Twenty-Fourteen theme instead of the parent might be be the cause it. But the problem ...
1
vote
4answers
2k 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, ...
0
votes
1answer
41 views

How to add first and last CSS class for Woocommerce layered nav widgets

I need to add first and last ccs class for woocommerce_layered_nav widgets. // Add "first" and "last" CSS classes to woocommerce_layered_nav widgets function widget_layered_nav_first_last_classes( ...
2
votes
1answer
33 views

Remove HTML content if attribute is not set / variable attributes

So I'm creating a shortcode that uses the standard bootstrap carousel. It works completely fine as long as all the 3 slide attributes are entered correctly but obviously if only 2 are set and the ...
0
votes
1answer
29 views

Add the title attribute to links

I want to add a title attribute to my link like this: <a href="#" title="here is the title">LINK</a> I know how to do this in html but I can't expect this from my users. I can't find ...
0
votes
0answers
394 views

Woocommerce: custom product attribute sorting not working (backend)

I am having a problem sorting the product attributes in the backend. I have a product attribute called "size" which has numerical and string values (36, 37, 38 .. XS, S, M, L). Because they were not ...
1
vote
1answer
344 views

How to set value/term of a Woocommerce attribute text field in admin panel?

I am developing a plugin which is supposed to auto-fill the attributes text field. There is a URL text field where user enters URL, on focus out I trigger a AJAX call through which I am able to save ...
0
votes
0answers
13 views

Shortcode Attribute contains clone of all shortcode attributes

This is easily the strangest thing I have see wordpress perform. I have a shortcode, we'll call it my_foo . We'll say it has several attributes, bar_one, bar_two, bar_three . This shortcode is part ...
4
votes
1answer
72 views

How can I allow for multiple template views on the Gallery Settings page when using the Visual Editor?

I'm trying to extend this answer by making it possible to switch shortcode attributes from the UI and alter the gallery markup based on those attributes. [gallery owl="true" link="none" ...
-1
votes
1answer
145 views

language_attributes for two languages?

I'm looking for option to change language_attributes manually without hardcoding it like html lang="en-US" in html it self. The reason for this is I have three language site, using same WP engine ...
1
vote
3answers
1k views

How do I add a custom HTML attribute to get_avatar?

I'm trying to add Pinterest's nopin="nopin" HTML attribute to the comment avatar image tags on my blog. Here's the function I'm using to call the avatar on each comment: get_avatar($comment, 50, ...
0
votes
2answers
58 views

Pass Shortcode Attribute to footer Script

i am trying to generate a wordpress shortcode which will display a (bx)slider. The shortcode function itself works like a charm, i can pass my data and the shortcode gets rendered well. The problem: ...
0
votes
1answer
26 views

WooCommerce Attribute Display Issues

am using WooCommerce for a website however I have an issue with the products attributes. I haven't seen this issue before, the attributes and variations have all been created however on the frontend ...
0
votes
1answer
65 views

Add data-id attribute to child page links

The should be simple but I just can't figure it out nor find an answer. I need to add a data-id attribute to the <li> parent container of the respective child page <a> links. The HTML is ...
0
votes
2answers
110 views

Get product details by url key in Wordpress woocommerce

I want to load products deatails on my custom page.Is there any way that i can use the url key like http://localhost/mysite/product/samsung-1.In this url samsung-1 is the key for that product.I want ...
0
votes
0answers
56 views

Add custom dynamic attributes to menu items

Hello I would like to add a data-hover attribute to each element in a specific Wordpress menu. I found the following on the codex. However I don't know how to call each specific nav item to have the ...
0
votes
1answer
63 views

Woocommerce: Any way to list all products *without* a specific attribute?

We're going back through an existing site and adding attributes to the products, but we need a way to verify that every product has gotten them. Is there any method or function call that will give ...
2
votes
1answer
546 views

Adding HTML within an image title attribute

I am using some jquery which applies an overlay on an image on hover. The script uses content from the image's title attribute to display over the image. When I tested this locally, it seemed to work, ...
0
votes
1answer
385 views

WooCommerce - Adding Product Attributes to CSV Export

I'm trying to customize the WooCommerce CSV Export plugin to add additional columns for two standard product attributes ("fund" and "appeal code"). I'm able to add the actual headers, but can't get ...
0
votes
0answers
49 views

Add custom attributes to the individual blog table in multisite

I am adding custom product attribute to a multisite network. Currently the added custom attributes save on the default WordPress database. I have to store the data in corresponding blog database table ...
0
votes
0answers
137 views

TinyMCE editor for woocommerce product attribute

I am creating a custom product attribute by a use of a plugin, but there is a problem that it outputs a simple textarea. What I need is either a TinyMCE editor or some simple editor with a possibility ...
0
votes
1answer
111 views

Woocommerce Product attribute not imported with wordpress Importer [closed]

I used the WordPress Importer plugin and successfully imported all content but woocommerce product attributes are not imported. Tried a few different tests, and few different servers. Same result. ...
0
votes
1answer
97 views

Remove all link title attributes

After reading this and this, I want to remove the title attribute from all links of my blog, as that is good from accessibility point of view. How this can be achieved? UPDATE I found a solution how ...
-1
votes
1answer
425 views

I want to filter my products with attributes [closed]

I have ebook store, where all the books are listed, everything is done.. In products, publisher and author added as a custom attributes. Now I want to filter the products on the basis of ...
1
vote
1answer
104 views

How can I make all post image uploads have data-width and data-height attributes automatically by default?

Right now all my images automatically have width= and height= when someone adds an image to a blog post. But what if I also want every image to have a data-width= and data-height= and have it equal to ...
0
votes
0answers
37 views

how to manually change the loop to just show images and their attributes?

I want to change the behavior and styles of the Wordpress default image gallery. I mean, I don't want to just call the loop to show all images in a post/page gallery with default attributes and ...
-2
votes
2answers
71 views

Woocommerce linking variations

So I have this array (just taking an example, it's dynamically built up): $v_values = array( array("C1","C2"), array("F1","F2") ); $v_name = ...
2
votes
2answers
140 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="" ...
1
vote
1answer
254 views

Add attribute to shortcode dynamically

I'm looking to add an attribute to a shortcode used in a post dynamically. For example, say we start with: [shortcode-name] I'd like to add the "attribute=xxx" portion to the shortcode so it is ...
0
votes
1answer
19 views

Wordpress shortcode Issue!

Hi I have developed a shortcode that lists posts from a custom post type depending upon taxonomy terms. But I am having an issue. It's displaying all posts from all terms instead of the terms being ...
0
votes
1answer
160 views

How can I define the output of shortcode attribute value?

I would like to create a shortcode that has predefined output for attribute values. For example: [shortcode att="value1"] output = <div id="value1">Predefined content for value1</div> ...
0
votes
1answer
387 views

Input with spaces in Shortcode attributes overwritten by defaults

question seems to be similar to the one asked here but the answer went down a different path. Pretty much if a user enters a shortcode attribute with a space it will get overwritten by the default ...
2
votes
1answer
1k 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 ...
3
votes
1answer
2k views

How to add a “data-” attribute to the image tag of native gallery output

While trying to make WordPress and Galleria to become friends I already have a good result. Galleria can easily be used to display native WordPress Galleries. I'm using a plugin but that's not ...
0
votes
1answer
962 views

Add image custom attribute [closed]

Im want to use Advance Custom Fields module with Gallery add-on http://www.advancedcustomfields.com/add-ons/gallery-field/ I need to add custom attributes to all images. Like for example paper type, ...
1
vote
2answers
282 views

How to add a rel attribute to images that contains their categories?

I've added categories to images, so that I can use them to filter images within a portfolio page. Now I'm thinking I need to add the rel attribute to each image that contains its assigned categories. ...
5
votes
5answers
5k views

How can I add title attributes to next and previous post link functions?

For some reason a title attribute is not appended to next_post_link and prev_post_link calls in WordPress. How can I add one?
0
votes
1answer
152 views

Which wordpress function is the caption shortcode linked to?

I have used this code in my page content to try and output an image + caption with a custom caption class and id... [caption id="my-caption-id" class="my-caption-class" align="alignnone" ...
0
votes
2answers
207 views

Remove image height/width attributes from Image Widget

The Image Widget includes width and height on the images which I've unsuccessfully have been trying to filter out so I can have fluid width. I've tried the following, which seems to be the most ...
2
votes
3answers
1k views

Checking if an attribute exists in a shortcode

I've written a small plugin that spits out html for a button. It works great, except for one thing: If the user doesn't specify an image, the image appears broken. Is there a way for me to check and ...
1
vote
1answer
127 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
237 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) { ...