Skip to content (Press Enter)

marioernestoms

WordPress Specialist

  • About

Taxonomy Term field ACF with WooCommerce categorys.

by marioernestomsupdated on 6 de May de 20179 de February de 2017
Taxonomy Term field ACF

Recently I needed to put on the category page of WooCommerce a link to download a catalog associated with the category using Advanced Custom Fields (ACF).

The Solution:

For this work’s I have created a Group of Product Categories fields in the ACF. I put a custom text field to receive this URL and in the rule of this group I used the Taxonomy Term associated with product_category to display this field in the WooCommerce categories.

Screen Shot 2017-02-09 at 15.06.04

And to display this field within the category page code I used:

$product_cat_object = get_queried_object();
the_field('download_catalogo', 'product_cat_' . $product_cat_object->term_id);

It worked well and I decided to share it because it would be enough for situations where you want to have customizations on the category page of your E-Commerce. enjoy yourself! 🙂

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related

WordPress
0

marioernestoms

Post Navigation

Previous Article
Next Article

Recent Posts

  • WooCommerce – Block add to cart button
  • WooCommerce – Remove add to cart button
  • Ajax Login System with WordPress
  • How to install WordPress on VPS with SSH
  • Troubleshoot WordPress update failure message

Categories

  • HTML/CSS/JS
  • Servidores
  • WordPress
Recommended for you...

Learn to use Ajax in WordPress

by marioernestoms
Recommended for you...

WooCommerce – Remove add to cart button

by marioernestoms
Recommended for you...

WooCommerce – Block add to cart button

by marioernestoms

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© Copyright 2021 marioernestoms. All Rights Reserved. The Ultralight | Developed By Rara Theme. Powered by WordPress.