Most probably you need a bunch of divs etc duplicated in both archive-custom.php and the shortcode. Identify those divs, and move them into a new template file in your theme, e.g. in part-archive-custom.php.
Then, delete them from archive-custom.php and add a call to get_template_part('part-archive-custom'); instead.
Do the same inside your shortcode.
Related Posts:
- How to remove custom post type archive
- How to use a custom post type archive as front page?
- Create a shortcode to display custom post types with a specific taxonomy
- Add Content to Page without shortcodes
- Proper way of making custom post type landing page or archive page
- Custom Post Type Archives with 0 Posts Redirects as 404
- How can I fix those issues generated by the Themecheck plugin
- “Edit” option for custom post types archive page
- Get monthly archives for custom post type
- How to get_queried_object on multiple objects?
- Assign Page Template Within A Custom Post Type
- Post type archive page not working
- paginate function in archive for custom-post-type
- Custom Post Type – Archive page title
- Should I change these content meta types before building complex archive page?
- Getting taxonomy terms used by custom post type
- Archive or taxonomy pages not working for custom post type
- How to list custom post types?
- I am facing problem in my archive page , it is partially working
- taxonomy template for custom post type the same as the archive
- Custom post type search with slug in URL
- How can I give CPT archive correct body class?
- Conditional tags don’t work
- Custom template won’t load for a custom post type (custom permalinks used)
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- CPT custom archive template does not get loaded
- Custom post type is showing custom home page, not archive page
- Create template for taxonomy results limited by Custom Post Type
- How to use has_archive but disable feed per post type?
- Use Custom Post Type archive page for the taxonomies term archive page
- Number of Custom Post Types published are not being shown in the custom page
- Display Child Pages of Custom Post Type Parent Page
- Custom Post Type has_archive
- Custom Post Type Archive URL is wrong
- Shortcode to display Staff post type based on Location post type and Specialty post type
- wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query
- Canonical url differs from custom post type archive URLs
- Display a custom posts page for post type
- Custom post type archive pagination 404
- posttype/taxonomy/term archive page 404 error
- Foreach inside shortcode not working as planned
- Is it possible to have a custom post type with feed but without the archive?
- Ignoring slug capitalization on rewrite rule for custom post type archive page
- Custom Post Archive is not working
- Custom post type archive with page as parent url
- Custom post type, global categories — what’s the template name?
- Url to archive page for custom post type
- Return the name of the post type
- Custom shortcode works in Elementor editor but not on frontend
- Custom post type Shortcodes wordpress
- how to create custom post type with dynamic category_name using shortcode
- Add shortcode inside of the_content()
- WordPress Custom Post Type and Shortcode for Portfolio Items
- Creating shortcode id for custom post types
- Custom Post type date archive for custom taxonomy
- adding custom post type “name” to single template
- Custom Post Type Archive template not being called
- How to display class name in this shortcode post query
- Displaying custom taxonomy menu in custom post type archive
- How do I output a list of a specific post type in a table?
- Pages not appearing?
- Is possible register two archive pages for single custom post type?
- Show in an entry a Custom Post Type associated to a post
- Create a CPT to edit Shortcodes Atts
- Why can’t I filter my CPT shortcode by category?
- Static Front Page not working for custom theme
- From CPT Custom Loop into Shortcode?
- editing shortcode for custom post type within a plugin
- Custom post type shortcode with taxonomy attribute not working and no errors
- Custom Post Type archive page listing a 404 or single post
- Load custom post type with ID in a shortcode
- Building Link List for Custom Tax
- Unsure what page hierarchy to use with CPT UI to show on front end
- get first limited words from a custom post in the archive page
- How to Show all Values in category.php page using post_type
- Show index and not the archive for “Dog Custom Post” with default slug
- Custom post type with two templates
- Making a archive gallery page for a custom post type which already has an archive page
- Custom taxonomy in custom post type archive with pagination
- why custom post archive gives always no more than 10 posts despite of paging settings?
- Shortcode error
- Custom Info Box at end of posts?
- Custom post type category page not working
- How can I retrieve the slug for a custom post type via name?
- CPT Archive with parent page
- Add number in increment of one to DIV ID
- Remove plugin’s custom post type archive page and single pages [closed]
- Add a class to a menu item depending on a body class
- Display page and custom post title inside shortcode
- trying to display custom post type with custom taxonomy value by shortcode can’t works [closed]
- How to separate posts by categories?
- Dynamic WordPress rewrite rules for multiple custom post types
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- Custom Field in Page Title
- Show only taxonomy types terms associated with a custom post type in WordPress PHP
- SOLVED: Shortcode to display Divi project filtered by tag in WP Query loop
- Made a Custom Post Type using ACF. Via the dashboard I cannot see the view button to see the post
- Remove date rewrite rule for custom post type archive page
- Add Shortcode functionality to a function that queries custom post type / taxonomy
- Generate list of posts on a page, but fill shortcode values from ACF fields on that page