Support » Plugin: Popup Maker - Popup Forms, Opt-ins & More » Conditions and custom post types

  • Resolved MrCarlLister

    (@mrcarllister)


    Hello – firstly thanks so much for your plugin.

    Condition statement seems to work fine for (tested) home page, pages. But when I only want popup to work on a custom post type, it doesn’t seem to recognise the condition when I’m on the custom post type page.

    I’ve tried “All Fantasy Packages” (fantasy package is the custom post type name), “Fantasy Packages: Selected” and “Fantasy Package: ID” – selecting any of these stops the overlay working ANYWHERE.

    See below how I’ve registered my custom post type. I have another post type (Bespoke Fantasy Packages) and having the same issue. Thanks in advance for your help!

    // let's create the function for the custom type
    function fantasy_packages() {
    	// creating (registering) the custom type
    	register_post_type( 'fan_package', /* (http://codex.wordpress.org/Function_Reference/register_post_type) */
    		// let's now add all the options for this post type
    		array( 'labels' => array(
    			'name' => __( 'Fantasy Packages', 'bonestheme' ), /* This is the Title of the Group */
    			'singular_name' => __( 'Fantasy Package', 'bonestheme' ), /* This is the individual type */
    			'all_items' => __( 'All Fantasy Packages', 'bonestheme' ), /* the all items menu item */
    			'add_new' => __( 'Add New', 'bonestheme' ), /* The add new menu item */
    			'add_new_item' => __( 'Add New Fantasy Package', 'bonestheme' ), /* Add New Display Title */
    			'edit' => __( 'Edit', 'bonestheme' ), /* Edit Dialog */
    			'edit_item' => __( 'Edit Fantasy Package', 'bonestheme' ), /* Edit Display Title */
    			'new_item' => __( 'New Fantasy Package', 'bonestheme' ), /* New Display Title */
    			'view_item' => __( 'View Fantasy Package', 'bonestheme' ), /* View Display Title */
    			'search_items' => __( 'Search Fantasy Package', 'bonestheme' ), /* Search Custom Type Title */
    			'not_found' =>  __( 'Nothing found in the Database.', 'bonestheme' ), /* This displays if there are no entries yet */
    			'not_found_in_trash' => __( 'Nothing found in Trash', 'bonestheme' ), /* This displays if there is nothing in the trash */
    			'parent_item_colon' => ''
    			), /* end of arrays */
    			'description' => __( 'Fantasy Packages', 'bonestheme' ), /* Custom Type Description */
    			'public' => true,
    			'publicly_queryable' => true,
    			'exclude_from_search' => false,
    			'show_ui' => true,
    			'query_var' => true,
    			'menu_position' => 8, /* this is what order you want it to appear in on the left hand side menu */
    			'menu_icon' => get_stylesheet_directory_uri() . '/library/images/custom-post-icon.png', /* the icon for the custom post type menu */
    			'rewrite'	=> array( 'slug' => 'fantasy-packages', 'with_front' => false ), /* you can specify its url slug */
    			'has_archive' => 'custom_type', /* you can rename the slug here */
    			'capability_type' => 'post',
    			'hierarchical' => false,
    			/* the next one is important, it tells what's enabled in the post editor */
    			'supports' => array( 'title', 'editor', 'thumbnail', 'sticky')
    		) /* end of options */
    	); /* end of register post type */

    https://wordpress.org/plugins/popup-maker/

Viewing 5 replies - 16 through 20 (of 20 total)
Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Conditions and custom post types’ is closed to new replies.