Query Advanced Custom Field Taxanomy

We have an ACF set in WordPress which latches on to the category section:

Query Advanced Custom Field Taxanomy

This then becomes an option in the WooCommerce category section:

Query Advanced Custom Field Taxanomy

What I am trying to do is query the WooCommerce categories and specifically show only those that has the box ticked for the field name include_category_download. then with that add the url from the PDF that was uploaded from pdf_Upload

My query looks like the following:

    $prod_cat_args = array(         'taxonomy'     => 'product_cat',          'orderby'      => 'name',         'empty'        => 0         );            $terms = get_categories( $prod_cat_args );         foreach ( $terms as $term ) {         $term_link = get_term_link( $term );         echo '<a href="uploads/"><div class="acf-bg-new">' . $term->name . '</div></a>';         } 


Category: php Time: 2016-07-28 Views: 0

Related post

  • Querying Advanced Custom Fields 2014-01-29

    I've been back and forth with this and not able to get my Advanced Custom Field query working. According to the documentation in the link above, this is what my array should look like: $args = array( 'numberposts' => -1, 'post_type' => 'event', 'met

  • SQL query - get ids - Advanced Custom Fields / WPeC 2012-11-29

    I need to query the database on add_action( 'init', '...') to find post ids with the field 'product_discount_option' set to true. I know at least one of my product posts have the field 'product_discount_option' set to true. However when i run the SQL

  • Advanced Custom Fields query 2013-02-01

    I have, hopefully easy question. I have my query here, which is using ACF <?php query_posts(array('post_type' => 'our-clients-list', 'posts_per_page' => 1, 'order' => 'DSC', 'orderby' => 'rand','paged'=> $paged)); ?> <?php while(ha

  • Advanced Custom Fields: query posts filtered by multiple field values 2013-09-01

    I have the following: custom post type: q-and-a custom taxonomy: q_and_a_category taxonomy terms: design, engineering, project-management I'm creating three separate pages that filter the custom post types by their terms. I.e., one page for Design, o

  • use advance custom field inside query post command 2013-12-29

    I can't find a solutions in internet or advance custom field website docs about this. I hope wordpress genius can help me. I use http://wordpress.org/extend/plugins/advanced-custom-fields/ for themes options/function. I want to show category post in

  • How to query categories with Advanced Custom Fields? 2014-04-16

    I'm currently using Advanced Custom Fields and I was wondering if anyone know how to filter categories by custom fields? I have a custom field in my categories using the checkboxes field. I want to make a page that will list categories that contain a

  • Get the_field of Advanced Custom Fields in a custom query 2015-01-01

    I have a custom query to display content of a certain template: <?php $i = 0; $pages = get_pages(array( 'meta_key' => '_wp_page_template', 'meta_value' => 'sale.php' )); foreach($pages as $page){ echo '<div class="content_'. $i .'"&g

  • SOLVED - How can you query posts by advance custom field when the value is a serialized array? 2015-07-21

    Bottom for resolution Im going crazy I think. I cannot figure this out for the life of me. I have an advanced custom field that is a select box. The select box has multiple values and allows for multi-selections. I made 1 post and multi-selected 3 va

  • Advanced Custom Fields Query with Different Values of the Same Key 2015-07-22

    I have a custom post type set up with Advanced Custom Fields. I would like to display and order my posts in groups. The groups are states of the United States, so I have 50 groups. Should I perform one query per state or is there a way to create one

  • How to query a list of posts titles into the choices for Advanced Custom Fields (Wordpress)? 2014-11-28

    I have two custom post types in WordPress: Authors and Books. I want to use Advanced Custom Fields to add a checkbox list when I add a new Book. This checkbox list contains the entire list of authors. My purpose is to create a dynamic list of items (

  • WP Query using Advanced Custom Fields data 2015-10-05

    I have a page 'Repertoire' that uses a specific page template. The page has an advanced custom fields repeater field for 'Title' (text), 'Artist' (text) and 'Genre' (select). On the front end, I need the titles to be displayed by genre, with the genr

  • wp_get_attachment_image_src() with advanced custom fields returning empty 2011-11-27

    I am using the advanced custom fields plugin to upload images for an image gallery. I am attempting to retrieve the different sizes of images that are saved in the uploads folder and having problems. $image = wp_get_attachment_image_src(get_sub_field

  • If Post Meta Equals Current Title Conditional Advanced Custom Fields 2012-10-03

    I would like to create a custom query loop to display data depending on the current post title. Pseudo-code: if post title = custom filed Show related content I have a page called artists made up of custom fields and I would like to show the discogra

  • Advanced Custom Fields Plugin: how to use a checkbox to allow a post to show up in desired "zone"? 2013-01-02

    I am having issues getting the below code to work. I created an Advanced Custom Field (top_articles) with a checkbox containing three options: top_articles_left, top_middle, top_articles_right. I would it is so that when you are within a post you can

  • Advanced Custom Field User Help URL 2013-08-14

    Hi I'm using ACF or Advanced Custom Fields which i saw here a while ago.. What i want is to output a second featured image in the homepage.. Question: 1 <div class="jpl-widgets-d" style="background: url('<?php the_field('featured_home

  • Advanced custom field boolean value in custom post type 2013-08-20

    I'm using the Advanced Custom Field (ACF) plugin in a Custom Post Type (CPT). I have field group in ACF that contains a Image field and true/false field called 'home_offer'. I'm using this ACF in a Custom Post Type called Offers. I want to loop throu

  • Advanced Custom Fields - Get custom fields from parent page 2013-08-23

    I'm using Advanced Custom Fields making it easier for my client to manage his content. On all of my child- and parent pages i would like to have the same header image and sidebar information. Allthough i wish to make "Parent Page #1" and "P

  • Updating the database with advanced custom fields 2013-12-10

    I'm having a real problem with updating a database table using advanced custom fields within a custom post type. I have a table in the database called 'wp_company_profiles' with fields 'address_1' and 'address_2', and have two advanced custom fields

  • Filter posts by custom field (Advanced Custom Fields) 2014-01-08

    I'm using Advanced Custom Fields and have been following along with this tutorial on Creating a WP archive with Custom Field Filter. In their example, they're using Radio Button Field; I would like to use the Checkbox Field for a custom post type cal

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.437 (s). 13 q(s)