We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Ajax pagination not working #31790
    Dominik
    Participant

    We have now changed from use of WPSP to the standard archive page with “load more” button from GP customizer. This works well.
    I will test all the CPT settings for the future, so we can use WPSP with our CPT and pagination in future projects.

    Thanks
    Dominik

    in reply to: Ajax pagination not working #31712
    Dominik
    Participant

    has_archive is set to true but unfortunately no impact

    in reply to: Ajax pagination not working #31652
    Dominik
    Participant

    Hi Elvin,

    it seems that its a problem just with the custom post type.
    I have checked within our Blog (wich is built with the standard post) – pagination works perfect.

    https://gs.brandwerk-digital.com/news/ -> CPT, don’t work
    https://gs.brandwerk-digital.com/blog/ -> Standard post type, works

    Maybe it is a problem with our CPT?

    /* ******* Custom Post Type News ********* */
    if ( ! function_exists('custom_post_type_news') ) {
    
    // Register Custom Post Type News
    function custom_post_type_news() {
    
    	$labels = array(
    		'name'                  => _x( 'News', 'Post Type General Name', 'text_domain' ),
    		'singular_name'         => _x( 'News', 'Post Type Singular Name', 'text_domain' ),
    		'menu_name'             => __( 'News', 'text_domain' ),
    		'name_admin_bar'        => __( 'News', 'text_domain' ),
    		'archives'              => __( 'News Archive', 'text_domain' ),
    		'attributes'            => __( 'News Attribute', 'text_domain' ),
    		'parent_item_colon'     => __( 'Eltern News', 'text_domain' ),
    		'all_items'             => __( 'Alle News', 'text_domain' ),
    		'add_new_item'          => __( 'Neuer Newsartikel', 'text_domain' ),
    		'add_new'               => __( 'Neu', 'text_domain' ),
    		'new_item'              => __( 'Neuer Newsartikel', 'text_domain' ),
    		'edit_item'             => __( 'Newsartikel bearbeiten', 'text_domain' ),
    		'update_item'           => __( 'Newsartikel aktualisieren', 'text_domain' ),
    		'view_item'             => __( 'Zeige Newsartikel', 'text_domain' ),
    		'view_items'            => __( 'Zeige Newsartikel', 'text_domain' ),
    		'search_items'          => __( 'Suche Newsartikel', 'text_domain' ),
    		'not_found'             => __( 'Nicht gefunden', 'text_domain' ),
    		'not_found_in_trash'    => __( 'Nicht im Papierkorb gefunden', 'text_domain' ),
    		'featured_image'        => __( 'Featured Image', 'text_domain' ),
    		'set_featured_image'    => __( 'Set featured image', 'text_domain' ),
    		'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),
    		'use_featured_image'    => __( 'Use as featured image', 'text_domain' ),
    		'insert_into_item'      => __( 'Insert into item', 'text_domain' ),
    		'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),
    		'items_list'            => __( 'Items list', 'text_domain' ),
    		'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),
    		'filter_items_list'     => __( 'Filter items list', 'text_domain' ),
    	);
    	$rewrite = array(
    		'slug'                  => 'news',
    		'with_front'            => false,
    		'pages'                 => true,
    		'feeds'                 => true,
    	);
    	$args = array(
    		'label'                 => __( 'News', 'text_domain' ),
    		'description'           => __( 'Newsartikel', 'text_domain' ),
    		'labels'                => $labels,
    		'supports'              => array( 'title', 'editor', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', 'excerpt' ),
    		'hierarchical'          => false,
    		'public'                => true,
    		'show_ui'               => true,
    		'show_in_menu'          => true,
    		'show_in_rest' 					=> true,
    		'menu_position'         => 5,
    		'menu_icon'             => 'dashicons-megaphone',
    		'show_in_admin_bar'     => true,
    		'show_in_nav_menus'     => true,
    		'can_export'            => true,
    		'has_archive'           => false,
    		'exclude_from_search'   => false,
    		'publicly_queryable'    => true,
    		'query_var'             => 'post_type_news',
    		'rewrite'               => $rewrite,
    		'capability_type'       => 'page',
    	);
    	register_post_type( 'post_type_news', $args );
    
    }
    add_action( 'init', 'custom_post_type_news', 0 );
    
    }

    Thanks and best wishes,
    Dominik

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