taxonomy

display product attribute and taxonomy in woocommerce product page

隐身守侯 提交于 2021-02-19 07:33:13
问题 I want to display the Brand attribute from the Additional Info on the product page. Is there a way to create a shortcode because i have a specific location to display it or even in php. This is for woocommerce 3.6.5 Thank you in advance 回答1: You can add the follows code snippet in your active theme's functions.php to do the above - // to display product additional info in product page add_action( 'woocommerce_single_product_summary', 'show_additional_info_product_summary', 45 ); // To diplay

Why am I getting a 404 error when trying to reach the taxonomy.php page without any terms, (Wordpress don't see taxonomy page)

一曲冷凌霜 提交于 2021-02-05 07:09:23
问题 I'm trying to create taxonomy page so I created taxonomy with taxonomie taxonomy-nowe.php but my WP don't see the page or I mess something with the rewrite URL? Can someone check my code and see if something I'm doing wrong. I did the flush the permalinks by save the Plain and then return to Post name permalinks. But I get not result. I want to achive somethink like this: domain.pl/oferta/kopiarki/nowe // custom post type function td_devices_posttype() { $labels = array( 'name' => _x(

Why am I getting a 404 error when trying to reach the taxonomy.php page without any terms, (Wordpress don't see taxonomy page)

倖福魔咒の 提交于 2021-02-05 07:07:16
问题 I'm trying to create taxonomy page so I created taxonomy with taxonomie taxonomy-nowe.php but my WP don't see the page or I mess something with the rewrite URL? Can someone check my code and see if something I'm doing wrong. I did the flush the permalinks by save the Plain and then return to Post name permalinks. But I get not result. I want to achive somethink like this: domain.pl/oferta/kopiarki/nowe // custom post type function td_devices_posttype() { $labels = array( 'name' => _x(

Wordpress improve shortcode with more parameters

余生颓废 提交于 2021-01-28 11:50:17
问题 when you are a new designer and start working with several content editors in wordpress, the first thing you realize is that it is not easy to find the functions you want exactly. plugin editors can't think of everything.. and especially extract information to display them everywhere in the desired and consistent manner. that's why wordpress shortcodes exist. but you have to master them.. first! (which is precisely my handicap currently) Grab your cup of coffee ☕ and admire the detailed

Ajax filter for wordpress

感情迁移 提交于 2021-01-05 08:59:05
问题 after a lot of research i came across this: https://rudrastyh.com/wordpress/ajax-post-filters.html But I can only get it to work when there are two options selected. I'll give you some context: I have a CPT named 'Contratistas' that has two custom taxonomies 'especialidad' and 'industria', they both have two terms each 'especialidad' -> 'tecnologia' and 'auditoria'; 'industria' -> 'cultivo' and 'depocito' here is my function: function misha_filter_function(){ $args = array( 'orderby' => 'date

How to get all parents/children categories of a custom taxonomy in WordPress

佐手、 提交于 2020-12-14 23:24:05
问题 I’m working on a custom WordPress theme and I want to show all the taxonomies list So, for example, if I want this structure: Parent Category 1 Child Category 1 Child Category 2 Child Category 3 1.1 - Grand Child Category 1 Parent Category 2 Child Category 4 Child Category 5 2.1. - Grand Child Category 2 can you guys please help me to solve this puzzle 回答1: To create this structure, maybe going with a helper array is the solution. This is not a 100% solution it will just give you start up and

How to get all parents/children categories of a custom taxonomy in WordPress

喜夏-厌秋 提交于 2020-12-14 23:14:17
问题 I’m working on a custom WordPress theme and I want to show all the taxonomies list So, for example, if I want this structure: Parent Category 1 Child Category 1 Child Category 2 Child Category 3 1.1 - Grand Child Category 1 Parent Category 2 Child Category 4 Child Category 5 2.1. - Grand Child Category 2 can you guys please help me to solve this puzzle 回答1: To create this structure, maybe going with a helper array is the solution. This is not a 100% solution it will just give you start up and

Get Woocommerce Category Thumbnails

天大地大妈咪最大 提交于 2020-11-30 07:41:13
问题 I have a custom template for a woocommerce category page to only display the categories. I have got the system to get a list of the child categories (by using get_term_children($id, 'product_cat') and get_term_by(...) ), but it only returns objects containing all the required information, except the thumbnail data. Does anyone know how I can get the thumbnail for the term? 回答1: Sorted it, here's the code I used: $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true );

Get Woocommerce Category Thumbnails

只愿长相守 提交于 2020-11-30 07:40:04
问题 I have a custom template for a woocommerce category page to only display the categories. I have got the system to get a list of the child categories (by using get_term_children($id, 'product_cat') and get_term_by(...) ), but it only returns objects containing all the required information, except the thumbnail data. Does anyone know how I can get the thumbnail for the term? 回答1: Sorted it, here's the code I used: $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true );

Get Woocommerce Category Thumbnails

邮差的信 提交于 2020-11-30 07:36:55
问题 I have a custom template for a woocommerce category page to only display the categories. I have got the system to get a list of the child categories (by using get_term_children($id, 'product_cat') and get_term_by(...) ), but it only returns objects containing all the required information, except the thumbnail data. Does anyone know how I can get the thumbnail for the term? 回答1: Sorted it, here's the code I used: $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true );