The problem is this part:
wp_get_attachment_image_src($image, 'large')[0]
In old PHP versions like 5.3 and below, you cannot reference an entry ([0]
) from the returned array of a function. The problem is that WP Engine is still on PHP 5.3, which reached end of life recently and doesn’t get security updates anymore. For the history see PHP 5.3 – Thanks for all the Fish.
You have two options:
-
Find all occurrences of modern syntax and rewrite them to make it compatible with 5.3. In this case:
$img_data = wp_get_attachment_image_src($image, 'large'); $src = $img_data[0];
-
Switch to a newer PHP version, preferably 5.5. If your current hoster cannot do that find a better one.
Related Posts:
- Show message when query has no posts
- Template Hierarchy for custom post type pages
- Display message if no posts in Custom Post Type loop
- Unable to edit categories in custom post type
- gutenberg message
- How to sort a WP_Query by a custom field AND ALSO filter by a different custom field
- Get category if used in a custom post type
- Iterating through Object Array to customise display of full custom taxonomy for custom post type
- Sort custom post type by most current date picker
- Return number of all custom posts type by author in all statuses
- I can no longer post or even save a draft, getting the error “A post type mismatch has been detected.”
- Get taxonomy term by slug in post on archive page
- WP_Query of custom post type sorted by meta_key has unexpected results
- Displaying custom fields for custom post type generate with Custom Post Type UI Plugin
- WordPress hook after post content and meta update
- Query not work for current taxonomy
- Using menu_position to add two entries between Dashboard and Posts
- Custom Post Type “MUST NOT” be able to search via URL
- I am trying to get cutom post cout by month of current taxonmy term
- When updating non-public custom post type it says “Post updated. View Post”
- How to show all taxonomies within custom post type loop
- Showing taxonomy terms on custom post type
- Create short URL with auto 301 redirect
- Custom taxonomy template list not working (404)
- Published post auto change status to pending after 90 days
- How to retrieve all wordpress posts (specific type) inside a function in php?
- Add shortcode inside of the_content()
- Create a page by importing data from an XML file ( On clicking a button inside admin options page)
- Showing User’s Post Counts by Custom Post Type in the Author.php?
- Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?
- ACF for custom post type archive pages: which hook to use?
- How To Post WordPress Custom Post Types to Twitter via IFTTT
- Custom Post Type Category URL
- Want a custom query with just one category but from all custom post types
- Pagination hitting 404 page on /page/4
- Convert comma separated list to serialized array to import as post meta
- WordPress CPT custom custom label
- Custom Meta Box returns no HTML
- Link From Single Post To Taxonomy Term Archive Page
- How do you output an unknown number of images in a custom post type with desired markup?
- `save_post` hook called on inserting new post from front end
- WordPress Custom Post Type and Shortcode for Portfolio Items
- Metabox multiple custom post select -> display selected items?
- Remove categories taxonomy from custom post type
- Custom post type’s posts are not showing anywere but in xml sitemap
- Get data from PHP to JavaScript to set position of each post on front page
- Child theme blocks post from publishing [closed]
- Generate new post from email
- I want to fetch custom post data based on it’s id i fetch from select drop down [closed]
- YOAST SEO won’t work on custom post type archive [closed]
- Undefined $post in wp_query
- Get posts from Custom Taxonomy
- post body class for current user only if they are the post author
- display the posts of Custom Post type in custom category
- CPT Taxonomy As Archive Page – Error 404
- Display a post from custom post type only if all the selected taxonomies and custom field value matches the record
- Can’t delete a custom post in front end with custom role
- Pull in taxonomy field of custom post type in new query
- Add term slug in URL of custom post type details page
- How to add a filter to a custom post type to get adjacent custom posts via the REST API
- Returning a custom content types with meta values
- Use the custom post type archive for taxonomies?
- How to define the template for custom posts?
- Adding Multiple Post Types to Query [duplicate]
- WordPress hook which triggers on post import
- How to display hierarchical and non-hierarchical taxonomies?
- Get parent category(taxonomy) ID from single template of a custom post type
- Custom Post Type Categories URL not displaying posts
- Auto post creation
- Change WordPress custom field default calendar [closed]
- Check if user has custom post published redirection on WordPress
- Custom order of Taxonomy Terms
- Dynamic CPT / Taxonomy
- Custom post type permalink returns 404 when set to private
- Rewrite custom post type with taxonomy
- Show all Tags in each post
- Custom posts of one type have disappeared from admin. Still appear on site [closed]
- Should i use a plugin for Event Manager or code my own needs? [closed]
- Unable to format dates to put in event calendar
- How to approach a site where it has sub-businesses, each with its own pages (“articles”, “staff”)? Don’t want to use WP multisite
- How to add a lightbox to class mix?
- Assigning alternate single-{cpt} template based on blog_id in multisite
- Getting a GET error in console – 404 not found for wp-json
- providing access to post_id or post inside functions.php
- How can i add multiple variable to a !== query
- Cannot choose custom categories for custom post type in post editor
- How do I create a new post upon registration with the users first and last name as title
- Topic won’t save for a custom post type — how to debug?
- How to get the custom post list to admin user edit page?
- Custom post type suddenly stoped working after WordPress 5 update
- Batch Extract Date from post title and put into ACF custom field
- Display both parent and child custom taxonomy / content
- Removing full title and breadcrumb header container for a specific post type
- Get id from metabox dropdown
- Programmatically add custom field to post_name in a custom post type
- Post URL based on Custom Post Types variables
- Is it possible to use array_walk() to append terms to an array of posts?
- Custom Post Type Template Hierarchy – Single post template
- WP_Query not resetting after wp_reset_postdata
- Custom Post Type Advanced Slug