You're browsing the tag: PHP

Tutorials

WordPress: Setting up featured images

You’ll find that most blogs that use WordPress as their blogging platform use featured images on their posts. Featured images are what you usually see when you share a post on social media (the thumbnails that appear when sharing on Facebook or Google+), related posts widgets and in the post itself.

It’s really simple to add the featured image functionality, if you don’t have it already. You just have to modify one theme file and you’re done.

Open your current theme’s functions.php file

The functions file contains all the snippets necessary to make sure the theme runs correctly and to add any custom modifications to your theme.

Add the next snippet to your functions file

By adding that code, you should have the featured image functionality. When you write a post, you should be able to see the ‘Featured Image’ box to your right. With a prompt to add an image.

Tutorials

WordPress: Custom Signature on Posts

Do you ever read blogs that have a custom image or signature on the bottom of the posts? Well, if you have a WordPress blog and want to add your own custom signature on your posts, it’s really easy to do!

Edit your theme’s functions.php file

Like I wrote on the code comment, you can replace the <img> tag with any content you want to add as your signature (custom text, quote, etc). Don’t forget to customize the styling (alignment and other properties) of the signature using the .signature CSS class.

That’s it! If you have any comments or questions, make sure to leave a comment!