WordPress page not showing up – replaced with last 10 posts?

I’ve been working hard at a system to upload articles to. Specifically via a custom post who’s URL changes based on an ACF selection field.

I’ve had great success, with users here helping me on the final push to fix 404 errors. but now, it seems that I’m stuck again. The parent pages seem to be uneditable, forcing the last 10 posts to show.

Here’s the setup. I have a Page who’s parenting structure is Community => Articles => Theories. the url is example.com/community/articles/theory/

When I visit that URL, it only displays the last 10 posts. Not custom posts, just regular posts.

The code I have to change permalinks for the Articles custom post type is this:

add_rewrite_tag( '%category_type%', '([^&]+)' );
    'articles', array(
        'labels' => array(
            'name' => 'Articles',
            'singular_name' => 'Article',
            'add_new' => 'Add new article',
            'edit_item' => 'Edit article',
            'new_item' => 'New article',
            'view_item' => 'View article',
            'search_items' => 'Search articles',
            'not_found' => 'No articles found',
            'not_found_in_trash' => 'No articles found in Trash',
        'public' => true,
        'supports' => array(
        'rewrite' => array('slug' => 'community/articles/%category_type%'),
        'menu_icon' => "dashicons-groups",
        'capability_type' => array('article','articles'),
        'map_meta_cap' => true,

function rem_articles_rewrite( $post_link, $id = 0 ){
    $post = get_post($id);
    if ( is_object( $post ) ){

            if( $category ){
                return str_replace( '%category_type%' , $category , $post_link );
return $post_link;

That ensures articles appear at, for example, example.com/community/articles/theory/-ARTICLE_NAME-/. But I fear it’s also locking the example.com/community/articles/theory/ page, so I am unable to edit this page via the regular Page section, and somehow, it’s fallback isn’t a 404, but the last 10 posts of the site.

Is there anything that immediately jumps out at anyone? Something I’ve overlooked?

Thanks in advance for any reply!

Read more here: WordPress page not showing up – replaced with last 10 posts?

Leave a Reply

Your email address will not be published. Required fields are marked *