Home / Forums / DynamiX Support / Posts Grid and custom posts

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts

  • team33
    Participant

    Hi, I would like to use my custom post (“Customers”) for a Posts Grid module.

    While I can see the custom post radio button in the Posts Grid settings (“Customers”), I always get a “Nothing found displayed”.
    Any clue?

    Thanks

    Andy
    Andy
    Keymaster

    Hi,

    This is actually a Visual Composer element – it maybe that your taxonomy isn’t being registered with the plugin. What do you have currently setup?


    team33
    Participant

    /*-------------------------------------------------------------------------------------------*/
    /* customers Post Type */
    /*-------------------------------------------------------------------------------------------*/
    class customers {

    function customers() {
    add_action('init',array($this,'create_post_type'));
    }

    function create_post_type() {
    $labels = array(
    'name' => 'Customers',
    'singular_name' => 'Customer',
    'add_new' => 'Add New',
    'all_items' => 'All Customers',
    'add_new_item' => 'Add New Customer',
    'edit_item' => 'Edit Customer',
    'new_item' => 'New Customer',
    'view_item' => 'View Customer',
    'search_items' => 'Search Customer',
    'not_found' => 'No Customer found',
    'not_found_in_trash' => 'No Customer found in trash',
    'parent_item_colon' => 'Parent Customer:',
    'menu_name' => 'Customers'
    );
    $args = array(
    'labels' => $labels,
    'description' => "A description for your post type",
    'public' => true,
    'exclude_from_search' => true,
    'publicly_queryable' => true,
    'show_ui' => true,
    'show_in_nav_menus' => true,
    'show_in_menu' => true,
    'show_in_admin_bar' => true,
    'menu_position' => 20,
    'menu_icon' => get_stylesheet_directory_uri() . '/images/icons/portfolio.png',
    'capability_type' => 'post',
    'hierarchical' => true,
    'supports' => array('title','editor','thumbnail','excerpt'),
    'has_archive' => true,
    'rewrite' => false,
    'query_var' => true,
    'can_export' => true
    );
    register_post_type('customers',$args);
    }
    }

    $customers = new customers();

    Andy
    Andy
    Keymaster

    Hi,

    From that code, there is no registered taxonomy – I unfortunately can’t provide support on this because it’s not theme related, however this guide should help you.

    https://codex.wordpress.org/Function_Reference/register_taxonomy

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.