• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

WPbasics - A beginner's resource for WordPress

  • Blog
    • Tutorials
    • Articles
    • Showcase
    • Themes
    • Plugins
  • Recommended Hosts
  • About
  • Contact Us
create a plugin

How to create a plugin | Add a featured image to a post

Last updated on July 17, 2019 Leave a Comment

Create a plugin | Add a featured image to a post

How to create a plugin and add a featured image to a post.  Creating a plugin can seem intimidating but with this guide, you will be creating a plugin in no time.  We will code a plugin that you can put to use in just a few easy steps.

Step 1

Locate your “plugins” folder.  Inside the “plugins” folder, create a folder labelled “add-featured-image”

Step 2

Create 2 files inside the “add-featured-image” folder as follows;

  • add-featured-image.php
  • style.css

Step 3

Add the following code to the “add-featured-image.php” file and the code below this window to the “style.css” file;

Step 4

Activate your plugin.  That’s it, your done.

Tagged With: Featured Image, Site Plugin

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Search this site

Popular Posts

  • How to copy a live WordPress site to a local host | Duplicator
  • How to add a jQuery UI Accordion to WordPress
  • How to copy a live WordPress site to a localhost
  • How to Use FileZilla | FTP Client
  • How to Create a Localhost with local by Flywheel

Recent Posts

  • Learn PHP in 15 Minutes
  • How to Install a MailChimp Popup in WordPress
  • Googles reCaptcha slow mobile site
  • Check if your site is indexed by Search Engines
  • ACF Blocks | Gutenberg
SEE MORE POSTS

Footer

Site Links

  • Affiliate Disclosure

Contact

  • Email
  • Twitter
  • Facebook

About WPbasics

WPbasics was created to assist WordPress Beginners. This site provides tutorial, reviews, and access to deals on products used by WordPress users.

Copyright © 2023 · WPbasics ·

Enter your name and email and get the weekly newsletter... it's FREE!
Signup today and be the first to get notified on new updates
Your information will *never* be shared or sold to a 3rd party.