Mixing custom post types and standard post types is distorting page layout


In simple terms when I include any custom post type and standard post in one archive page of any type the layout is somehow distorted. The sidebar looks different and sidebar widgets are moved to below the posts. Nothing like these happens when I put only standard posts in the archive or only custom post types. It’s not like the pages gets corrupted but the sidebar widgets are at the bottom, while sidebar is empty and the looks are poor and I cannot change this.

Is there some kind of parameter or setup I am missing while mixing multiple post types in single archive page ?

After playing with archive.php i found out this is somehow relate to generate_after_main_content. After commenting
line do_action( 'generate_after_main_content' ); the problem is solved but the whole action is removed.

Ascorpio 1 week 2023-03-11T10:08:23-05:00 0 Answers 0 views 0

Leave an answer