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:
- Custom Post Type Permalink / Rewrite not working immediately
- How to rename default posts-type Posts
- How to add custom content template part for a custom post type on main query using a plugin
- Custom sortable columns ordered by meta-value?
- Many to Many Relationship between Two Custom Post Types
- Adding Help Tabs To Custom Post Types
- Permalinks so that one custom post type appears to be a child of another, not working
- Tag list & tag index for custom post type
- How to force Authentication on REST API for Password protected page using custom table and fetch() without Plugin
- Is there an easy way to AJAX-ify saving of post?
- Create Post tabs in single-{content-type}.php with Custom Field values
- Rewrite custom post type url’s adding meta box values
- Define permalinks for custom post type by taxonomy in WP 3.4
- How to change the quantity of feeds in custom post type?
- Stopping WordPress from Auto Generating Image Files for Sizes
- Disable single pages and archives and keep preview
- update a post meta from a single table cell TablePress
- Jetpack infinite scroll render – make different depending on post type?
- is_page_template not working as expected
- Displaying custom posts only if custom meta box’s date is not expired
- How to get category image custom post type taxonomy in wordpress?
- Integrating Orbit slider into wordpress through custom post type
- multiple url slug for single custom post type
- Export entries and multiple custom field meta to .csv?
- advanced search forms with 3 input text and that the main problem 3 input text
- Is possible to add post-formats to custom-post-type?
- Editable Meta Data for Custom Post Type Archive Template
- Very simple wordpress block to display posts from an api call
- Display custom post type from dynamic custom field
- Keep display metadata value on backend – Custom Metabox
- How can you group custom post types in the admin sidebar?
- Notify admin on new submit
- Associate users with Custom Post Type and list associated users
- Limit amount of posts made within a custom taxonomy
- Anon function and add_meta_box
- Custom post type – use ajax to display sub pages
- How to display single post from custom post type loop?
- How to Output which matched meta_keys were found from custom_type_posts?
- A page that shows a list of a specific custom post type
- Custom post type and taxonomy permalinks
- pagination not working for category.php (custom post types in categories)
- Query based on custom fields start and end date
- Create a permalink structure with custom taxonomies and custom post types gives 404
- Different Limit number of post on different archive page
- DIsplaying URL of custom field in last post of certain taxonomy && post type
- Custom post type menu-icon not showing up
- Using page slug in wp_query
- previous_post_link in same taxonomy in custom post type
- Assign post type to many users
- Display both parent and child custom taxonomy / content
- Get id from metabox dropdown
- How do I replace the post title with a custom field?
- Separate Content from gallery (custom post type)
- Problems with custom post type
- Display list of custom post type which match taxonomy
- Sort results without WP_QUERY?
- Update custom field value
- How can I add custom fields in a custom post type? [duplicate]
- Create a Custom Path to Archive
- show most viewed posts of last days by link?
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- Get List of Terms based on a given term (different taxonomy)
- Add rewrite rule for custom post type single page
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- Custom post type archive URLs with a single taxonomy
- After inserting new post with wp_insert_post() the post is not visble to WP_Query, but the same WP_Query works for post inserted from wp-admin panel
- Define a page to show custom post type
- check if current page is a child of a specified top level page
- How to get rewrited name of cusom taxonomy?
- How can I use javascript in specific posts without relying on a plugin?
- How to access repeater field of a custom field?
- Custom Post Types – trying to make “title” display
- Custom Post Type 404 Error even after flushing rewrite rules
- pricefilter without WooCommerce
- Send email to author of the post when the custom post status changes to published
- Update/publish custom post type with jQuery?
- Custom Post Type slug and WPML gets 404 error
- filter post by date selected in a dropdown in realtime
- Custom post type: “transition_post_status” action get title and other fields
- Possition a Custom Post Type Tab under Settings
- Pretty permalink structure with multiple (AND OR) taxonomies
- Iterating over custom post type archive returns incorrect first ID
- WordPress Custom taxonomy template
- Custom Post Type Categories Not Maintaining URL structure any more
- CPT unsaved draft gives error 404 – when Post Formats support enabled
- Custom Post Types and Child Themes!
- Diffrent search templates for different post types
- Check if taxonomy is attached to at least one post in a post-type
- Repeatable custom meta select boxes
- Getting (Invalid) when adding custom taxonomy of custom post type link in menu [closed]
- Display custom taxonomy posts of custom post types
- Custom Post type field don’t show in single machine
- Getting 404.php instead of single-.php [duplicate]
- Display div based on Group metabox selection [closed]
- ACF Field to set Publish Date – Post Duplication upon Update
- add_rewrite_rule not working in Custom Post Type UI Plugin
- Is it possible to make is_category() recursive?
- Get X posts with the same terms as the current post (custom post type and custom taxonomy)
- Post object GUID adding http:/
- Meta_query question