I am trying to:
Set up a page where users can view their own posts
Link to a page where the issue can be seen:
hidden link
I expected to see:
A single record formatted according to the content template
Instead, I got:
The desired record and an extra, blank record (contains labels but no data from the configured Text and Fields content)
It turned out the issue was caused by a code snippet (provided and recommended in a Toolset tech support ticket - https://toolset.com/forums/topic/list-custom-post-types-posts-on-author-page/). I had modified the code to support 2 CPTs as below.
is_author)
// Add 'invitations' CPT and 'guides' CPT and the default 'posts' to display in author's archive
$query->set( 'post_type', array('invitations', 'posts', 'guides') );
remove_action( 'pre_get_posts', 'custom_post_author_archive' );
}
add_action('pre_get_posts', 'post_types_author_archives');
?>
This caused the duplicate blank record to appear. I have disabled the custom code and the View loop is producing the correct output now.