So I found the issue. The twentyseventeen theme has a built-in function in functions.php that does this:
Add custom image sizes attribute to enhance responsive image functionality for post thumbnails
function twentyseventeen_post_thumbnail_sizes_attr( $attr, $attachment, $size )
it has an if (is_archive()) condition in there. I had to override the function with my own custom function using a higher priority and in that custom one remove the is_archive() condition.
Related Posts:
- How can I get the title attribute from get_the_post_thumbnail()?
- Set Featured Image for Archive templates
- How can I add a set featured image function to a theme that doesn’t already have it built in?
- Retaining old HTML archives and displaying themes conditionally
- How to reverse the pagination numbers of an archive?
- Archiving annual festival site
- How do you get thumbnails to show up in the admin edit post?
- 100% width Featured Image Size
- Showing post thumbnail (attachment) on the archive.php category listing
- Private theme update with zip archive without deactivating the theme
- Featured images, am I missing something?
- Recommended Media Size for Twenty Fourteen
- Migrating a website using custom image tags to use featured images instead
- How to reverse the pagination numbers of an archive?
- How do I get the featured image to sit below the header in the twenty nineteen theme?
- Edit box-header on WordPress Dashboard
- Featured images are cropped on index and post page
- Change theme’s thumbnail to cropped WP featured image
- Theme stops media uploader from working
- Create /archive page in WordPress Theme
- Link to specific Customizer section
- How do I change the header image height in Twenty Seventeen?
- How to create a new theme from scratch?
- What theme is good for posting code? [closed]
- How to see files in directories in “Edit Themes” screen
- WordPress generating 404 on .mp4 file in theme folder
- How can I check for malware in a Theme? [closed]
- Editing theme files and access to the Code pages only to super-admin?
- Current theme broken – after server and domain migration
- Categories for Pages Not Saving in Admin with Custom Categories Metabox?
- Weird post pagination url redirect
- How get Themes list via REST api?
- Activate a new WordPress Theme Only for Admins
- WordPress Fatal error: Call to undefined get_header() in index.php on line 15 [closed]
- Theme Editor Not Showing
- Pros and cons of using Backbone for WordPress theming [closed]
- Can I create multiple instances of the BuddyPress Activity Stream with separate themes? [closed]
- Download WordPress.com theme: how?
- Can I rename a theme’s folder and still receive updates?
- Child theme not visible
- Custom theme folder
- How to load parent theme style.css?
- Help with WordPress Query
- How to setup a new WordPress theme without deactivating the current theme?
- WordPress is not able to change themes
- Inject widgets from one sidebar into another with PHP
- Where all are child themes recorded when they are created in WordPress
- I have some doubts regarding how to implement child theme
- An unexpected error occurred. Something may be wrong with WordPress.org
- Incompatible Archive. PCLZIP_ERR_BAD_FORMAT (-10)
- how to remove category nav from Bueno (WordPress Theme) header [closed]
- ‘Add New’ button not present [closed]
- How to style the post previews/links without it affecting the main posts?
- customize color in WP child theme doesn’t saved
- How to work on a new Theme for a site while still keeping the old Theme live
- Loading Bootstrap with wp_enqueue_style and wp_enqueue_script
- WordPress use of @ in core files
- Unable to upload/install any WordPress themes
- problem with my my theme “search.php”
- How to switch theme if the current user is admin?
- How to assign custom template to specific products in Woocommerce?
- Getting a ‘slide down’ js panel implemented within WP
- How to make content area in full width in Twenty Twenty-One theme?
- The requested theme does not exist. Stylesheet is missing – error after changing style.css name to my-styles.css in wp child theme?
- Hi everybody, I have a problem of search box
- How can I remove all traces of a theme?
- Updating WordPress Theme Files
- A thin line between native wordpress bahaviour and 3rd party themes
- Display Pointer only once?
- Multiple sub directories for theme template pages
- How to get the theme directory URI?
- From where wp ecommerce is loading plugin theme files?
- Making first post wider than other posts on home page(default)
- My blog suddenly can’t find my stylesheet?
- How to fix Scrape key check failed on WordPress VPS?
- Removing a widget via theme editor
- Can’t embed certain youtube videos into theme
- How to use my .mo file in the Divi child theme instead of file in a parent /builder directory?
- How to fix Gutenberg with SiteOrigin page builder deleting content when editing
- Basic wordpress search shows no results
- How do I remove search bar that isn’t a widget?
- TwentyFourteen Theme : Changing grid layout
- How to allow users to switch to the child theme from front end without plugin?
- Change whole theme depending on resolution
- post_prev & post_next within same category
- How to remove the option data of a theme when that theme is removed?
- How to find out which template the HTML content comes from?
- Resetting Themes Folder to Default
- Convert theme to be based on Bootstrap?
- Include root files into header files
- Static posts page is not working
- Cannot use some themes within Managed WordPress of Go Daddy [closed]
- How to track your theme usage on the internet?
- How to add Company Logo to Chosen Theme
- What security risk is not having “default” theme?
- Is it possible to dynamically show different themes for different users? [duplicate]
- Why does WP theme not look like promoted? [closed]
- Remove image next to header image on WellExpo theme [closed]
- How do I get rid of the Mindblown and the book recommendations?
- Adding PHP code to single template in 2023 edition of WordPress theme