WordPress.org

Ready to get started?Download WordPress

Forums

Category Custom Fields
Can't call fields (2 posts)

1 star
  1. rubenoliveira
    Member
    Posted 1 year ago #

    Hi,

    i can't call category fields to category page.
    I already try with code but i get this message:

    Fatal error: Call to undefined function categoryCustomFields_GetCategoryCustomField() in ...

    Can you help?

    Regards!

  2. Laxman Prajapati
    Member
    Posted 7 months ago #

    Follow this step :

    <?php

    $cat_name = get_query_var('cat');
    $cat_ID = get_cat_ID( $cat_name );
    $url = categoryCustomFields_GetCategoryCustomField($cat_ID, 'Banner Image');

    /* The "$cat_ID" is a cat id and "Banner Image" is a field name */

    $url = explode('@',$url[0]->field_value);
    echo $url = $url[0];

    ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.