[wp-trac] [WordPress Trac] #30609: CPT archive with pagination does not set current-menu-parent and current-menu-item after flip
WordPress Trac
noreply at wordpress.org
Fri Dec 5 21:37:17 UTC 2014
#30609: CPT archive with pagination does not set current-menu-parent and current-
menu-item after flip
-------------------------------------+-----------------------------
Reporter: beelde | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.0.1
Severity: normal | Keywords:
Focuses: ui, accessibility, docs |
-------------------------------------+-----------------------------
1. Create child theme of one of the wordpress themes (e.g. twentyfifteen).
2. Add following example code to your functions.php:
{{{
add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' );
function enqueue_parent_theme_style() {
wp_enqueue_style( 'parent-style',
get_template_directory_uri().'/style.css' );
}
register_post_type( 'Products',
array(
'labels' => array(
'name' => __( 'Products' ),
'singular_name' => __( 'Product' )
),
'public' => true,
'has_archive' => true,
'supports' => array('title', 'thumbnail',
'author'),
'menu_icon' => 'dashicons-book-alt',
'rewrite' => true
)
);
}}}
3. Add 4 products
4. Set "Blog pages show at most" to 3
5. Add custom link to CPT archive "/products/" to menu (Pretty Permalinks
pls)
6. Go to the archive page and flip to second page.
Excepting that this should work without a lot of dark workarounds.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30609>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list