Search not working for custom post type

[ad_1]

We use a standard custom post type (see the code below). The plugin does not find any of these posts. I added the CPT in the settings and activated search for CPTs. Am I missing anything?

function shopify_cpt()
{
    $labels = array(
        'name'                  => 'Shopify Produkte',
        'singular_name'         => 'Shopify',
        'menu_name'             => 'Shopify',
        'all_items'             => 'Alle Produkte',
        'add_new'               => 'Neues Produkt'
   );
    $args = array(
        'labels'                => $labels,
        'public'                => true,
        'publicly_queryable'    => true,
        'show_ui'               => true,
        'show_in_menu'          => true,
        'query_var'             => true,
        'menu_icon'             => 'dashicons-format-gallery',
        'show_in_admin_bar'     => false,
        'can_export'            => true,
        'rewrite'               => array('slug' => 'bilder'),
        'capability_type'       => 'post',
        'has_archive'           => true,
        'hierarchical'          => false,
        'menu_position'         => 1,
        'exclude_from_search'   => false,
        'taxonomies'            => array('category', 'post_tag'),
        'supports'              => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'revisions'),
   );
    register_post_type('shopify', $args);
}
add_action('init', 'shopify_cpt');
  • This topic was modified 1 hour, 16 minutes ago by cutu234.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer