wp_get_attachment_image_src(156, 'archive_thumbnail')[0]
will only echo the URL of the image. You need to add it to html to display the image. Try this:
echo '<img src="'.wp_get_attachment_image_src(156, 'archive_thumbnail')[0].'"/>';
You could add the width etc as well
echo '<img src="'.wp_get_attachment_image_src(156, 'archive_thumbnail')[0].'" width=".wp_get_attachment_image_src(156, 'archive_thumbnail')[1]." height=".wp_get_attachment_image_src(156, 'archive_thumbnail')[2]." />';
what happens if someone deletes this image though? Do you have a fallback?
It may be better to add the fallback image to your theme or plugin directory and reference it that way.
UPDATE
If you just want to add the image as simply as possible. You could also try this:
wp_get_attachment_image( 156, 'archive_thumbnail' );
Related Posts:
- Disable Media Uploads to non Admin Users
- WP List Table custom quick edit box – post meta data missing and columns change on submit
- Custom WP_List_Table displays blank rows
- Making the thumbnails in the backend Media section bigger
- Making Media Library “Alternative Text” Field Required
- Replacing the List table of a Post Type
- Refreshing collections in the admin media manager
- How to add custom classes to admin list table default rows or columns?
- Problems with WP_List_Table and hooks
- Unable to upload image using the standard uploader in the WP admin (v4.3)
- How to disable Media Library uploads for non-Admin users?
- Possible to show in media library if images are being used as featured images?
- Admin Custom Plugin List Files in admin Table
- How do I add an admin table to my page?
- Custom redirection when managing users in admin
- Get the selected posts IDs to use in bulk edit AJAX call
- How to pass parameters to admin_notices?
- Admin: very slow edit page caused by core meta query
- This CSS Stuffing Works, But Is This A Good Practice?
- Load plugin scripts and styles only on plugin page
- Is there a more efficient admin search function/plugin?
- WordPress Admins or Roles per Page
- How to add filter in “Comments” at the admin panel?
- Custom CSS In Admin Only For Certain Roles
- Using require_once() within admin
- List All Post Types in Admin view using /wp-admin/edit.php?post_type=
- Integrate post tags in Post Edit page with qTranslate
- Add a custom column in users list page
- Blocking Administrative Access to Authors and Subcribers?
- Customize Admin Users Screen based on Role
- Change post title during post saving process
- How to display only logged in user’s post comments in comments area
- WordPress 3.8 get current admin color scheme
- Custom taxonomy admin description
- What filter/action hook can I use to add a few links to the admin comments page?
- Can you have the users list pre sorted by specific column?
- Different color admin bars for dev, staging and production
- WordPress manage users as non admin
- remove_action with profile_personal_options
- With WP 3.4 customizer, while using postMessage & working within your JS for one option, can you retrieve current value for another option?
- $user_id vs. is_user_logged_in()
- Conditionally load CSS/JS/PHP in wp-admin if using a mobile device
- Assuming a theme is properly secured, how save is the WordPress admin?
- Is there a way to hook into the update-core page for custom messages?
- How to solve 500 Error on WordPress Admin Dashboard due to time-out on getdirsize
- Enabling users to replace site title (text) with a image logo (but keeping the text if there isn’t any image)?
- WordPress as a web app – always auto-save post and meta data
- Determining whether it’s a AJAX call from front-end or from back-end
- Remove duplicate product link from WooCommerce Page Row Actions
- How to set default editor tab
- Admin Taxonomy Terms – Orderby Term Field
- How do I add an admin notice within javascript in the admin interface for posts?
- Admin toolbar shows up when not logged in
- Make the Status, Visibility, or Date fields opened by default in the Publish box
- WordPress Admin Login Redirect Problem
- Admin option sidebar count
- 500 internal server error on wp-admin only
- Admin Top Bar Not Showing On Front End
- WordPress administration Over SSL – To Force SSL Logins and SSL Admin Access
- Only Admin can Edit, Delete or Update
- Set Edit Post meta boxes inactive
- How to verify nonces in bulk?
- Getting admin notices to appear after page refresh
- Hide post title input for all roles except admin
- How to activate the dashboard
- avoiding the display of certain categories to certain user roles at content entry time
- hide elements of admin with css file
- WordPress Hacked 5.5 admin-ajax.php [closed]
- Excerpt showing under title in admin columns
- how to remove +new from wp admin area
- html id is removed for non admin user?
- Given multiple admin accounts, how can I make it so that only admin with X username can edit posts
- Dynamic WordPress Admin Panel
- How to show a custom notification to a specific user?
- Visual Editor only working for the admin user
- Control Users listed in Users List on dashboard
- Weird jquery problem when upgrade to WordPress 3.1
- Maintenance mode excluding site administrators
- my wordpress configuration locally vs live server
- Admin back end – get URL of file using file browser
- Unable to edit my “Administration Email Address” after mySQL editing?
- Why does my admin email address keep changing to something random?
- WordPress Admin Doesnt work
- Admin Bar Acting Up
- WP administration over SSL using different domain
- Hide top admin panel for non admin and non editors
- Is it possible to create a custom admin page for users?
- Get content of publish box
- Add button in admin columns
- How to switch between two forms for visitor once admin logged in?
- Run filter if only it was run from specific admin page ( ‘upload_dir’ changed )
- How to create input page in WordPress admin panel?
- Disable a function from executing in post.php
- Admin blank but Admin menu showing
- Reference external file as a function
- Change pagination in editing posts [duplicate]
- How to cancel redirection to admin side
- Filtered dropdown for author?
- Change order of the block editor’s panel
- Display admin sidebar into custom post pages if logged