AI Verified

Name

Futured Image

About

Sutured image in your post page

Language

PHP

Rating

Voted: 0 by 0 user(s)

How to Setup Snippet

just add the code in your php function area

Codevault

Bensassi

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.1

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

20/11/2023

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Futured Image

 
                    
1add_image_size( 'wpwed-admin-post-featured-image', 120, 120, false );
2 
3// Add the posts and pages columns filter. They can both use the same function.
4add_filter('manage_posts_columns', 'wpwed_add_post_admin_thumbnail_column', 2);
5add_filter('manage_pages_columns', 'wpwed_add_post_admin_thumbnail_column', 2);
6 
7// Add the column to the admin area
8function wpwed_add_post_admin_thumbnail_column($wpwed_columns){
9 $wpwed_columns['wpwed_thumb'] = __('Featured Image');
10 return $wpwed_columns;
11}
12 
13// Manage Post and Page Admin Panel Columns
14add_action('manage_posts_custom_column', 'wpwed_show_post_thumbnail_column', 5, 2);
15add_action('manage_pages_custom_column', 'wpwed_show_post_thumbnail_column', 5, 2);
16 
17// Here we are grabbing featured-thumbnail size post thumbnail and displaying it
18function wpwed_show_post_thumbnail_column($wpwed_columns, $wpwed_id){
19 switch($wpwed_columns){
20 case 'wpwed_thumb':
21 if( function_exists('the_post_thumbnail') )
22 echo the_post_thumbnail( 'wpwed-admin-post-featured-image' );
23 else
24 echo 'hmm... your theme doesn\'t support featured image...';
25 break;
26 }
27}

0

Related Snippets

Please see some snippets below related to this snippet..

WooCommerce

AI Verified

1

WooCommerce Custom Text After Register Form Fields

Added: 1 year ago

Last Updated: 2 months ago

This guide shows you how you can add any custom text below the form fields on the Register form on the My Account page.

WooCommerce

AI Verified

0

WooCommerce autoselect Free shipping if available

Added: 1 year ago

Last Updated: 1 year ago

WooCommerce

AI Verified

2

WooCommerce Empty Cart Button

Added: 1 year ago

Last Updated: 2 months ago

By default, WooCommerce only lets users clear items from their cart one by one. This guide shows you how to create one button shown on the cart page which will empty the entire cart in one click. A lo...

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WooCommerce

AI Verified

0

Thank you Page

Added: 10 months ago

Last Updated: 10 months ago

Thank you Page

WooCommerce

AI Verified

0

0.00 TO FREE

Added: 10 months ago

Last Updated: 10 months ago

Make your price looks more professional by converting to text FREE instead of 0:00

WooCommerce

AI Verified

0

Futured Image

Added: 10 months ago

Last Updated: 9 months ago

Sutured image in your post page