Skip to content

Instantly share code, notes, and snippets.

@swoboda
Created October 11, 2017 07:28
Show Gist options
  • Save swoboda/780899af2df43ae2a2625ff954cc85c3 to your computer and use it in GitHub Desktop.
Save swoboda/780899af2df43ae2a2625ff954cc85c3 to your computer and use it in GitHub Desktop.
acf-category-description.php
<?php
// Do NOT include the opening php tag
add_action( 'woocommerce_archive_description', 'wpdesk_category_description', 5 );
/**
* Add ACF Category Description to WooCommerce
*
*/
function wpdesk_category_description() {
$queried_object = get_queried_object();
$category_description = get_field( 'category_description', $queried_object );
echo $category_description;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment