wordpress-template
Tutorials

How To Add Support For WordPress Post Formats Using A Plugin

Anyone who uses WordPress regularly knows about the Post Format feature and while it is great, the problem with it is that it is tied to the template you are using. And a lot of theme developers pick and choose which formats they support and some just straight up don’t support them. Now while it isn’t a problem if you have never used them, if you do use them, you tend to lose support for some formats when you change themes. Which is why after much contempt, I decided that I would just write a plugin to handle it.

So here’s how you can do just that.

Firstly open up your favorite text editor and create a new .php file

Open the new file you just created and add the following

<?php

?>

Those lines signal the beginning and end of the file, it is important that you have nothing and I mean NOTHING after the last line.

Next up we need to add the headers for the plugin so that we can be able to identify it and activate it in WordPress, you can just copy what I have and change my information for yours.

/**
 * Plugin Name: Post Format Support
 * Description: A simple plugin that overrides the default post format support of themes, without the need to edit the theme's files.
 * Version: 1.0.0
 * Author: Delano Maloney
 * Author URI: http://www.delanomaloney.com/
 * License: GPL3
 */

If you save and add the plugin to your site you should see it show up as a valid plugin, with version number and everything, don’t activate it just yet, as the plugin does do anything yet.

Now for the final step, below the plugin headers add the following lines of code

function ddm_add_post_formats() {
    add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' ) );
    }

add_action( 'after_setup_theme', 'ddm_add_post_formats', 20 );

Those lines adds the complete list of post formats to the WordPress editor, so that you can select them when writing up the post, it is important to remember that if your theme doesn’t support post formats you wont see a change on the frontend of your site, but you will have the options in the editor.

Just a quick recap so you know what the file should look like at the end

<?php 
/**
 * Plugin Name: Post Format Support
 * Description: A simple plugin that overrides the default post format support of themes, without the need to edit the theme's files.
 * Version: 1.0.0
 * Author: Delano Maloney
 * Author URI: http://www.delanomaloney.com/
 * License: GPL3
 */

function ddm_add_post_formats() {
    add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' ) );
    }

add_action( 'after_setup_theme', 'ddm_add_post_formats', 20 );

?>

If you are feeling lazy and don’t want to go through all of this, I did make it into an actual plugin that you can download here (DDM Post Format Support)

Standard
wpid-wp-1425177395526.jpeg
Blog

Its Officially Three Years Of Blogging

Time really does fly… As I sit here just reflecting on the past couple of years that I have kept a personal blog, I must say that I have definitely come a looooonnng way.

Back in 2012 when I first started this blog after having a lot of my other website ventures taken down due to copyright infringement. I decided to try something new mainly out of boredom and to keep me sane, and so this blog was conceived.

Here I was a 16 year old, with no clue what he was going to blog about, starting a personal blog. Then I got inspired from learning to use Photoshop and went with that. Then the blog started growing and expanding and got out of hand very quickly.

Now here I was at 18 now face with the question of whether or not I wanted to continue blogging. But I didn’t know how to blog, and worse yet, I was developing a perfectionist attitude that was detrimental to my creativity.

Then I got an idea, but this wasn’t just any idea, this idea led me to start checking out other blogs and seeing how a lot of bloggers operate, and also how to avoid burning out myself.

And so this idea, turned into a plan then into a mission and now to being executed.

This idea you ask, why don’t I just start over and do it better the second time.

At first I was against it because, that would mean throwing away two years of work …. But I realized that it was probably best to start over now than when I have a lot more at stake.

So here I go starting all over from a little more than scratch.

Let’s see what this year has in store.

Standard

When was the last time you did something for the first time

Blog

When was the last time you did something for the first time

Image
2015
Blog

Welcome to 2015

Seems like just yesterday, I started blogging but look at me now. Anyway, let me start the year off on a good note, 2014, was extremely challenging and 2015 is seemingly heading in that direction, but I have to try and get my blog back in order, and get back on the path towards my career goals.

But in saying that nothing is ever as easy as it seems, back in 2012, I was leaps and bounds ahead of the graphic designer, I am presently. That old saying about “use it or lose it,” stuff’s true. Because in 2013 I hit the limit of my computer at the time with Photoshop and I was forced to back off or upgrade, and an being unemployed student, obvious option was to back off. The problem however was that I was getting ideas for cool things to design, but no machine to build them with.

And over time I got lazy and ideas stopped coming and now, I have to fight to come up with ideas, and even when I do, I don’t have the motivation to attempt them. So I gave you that long story to basically say, I am going back to the basics.

All the basic 101 stuff that n00bs need to learn to get good on Photoshop. I will  also of course share my knowledge on this blog, so that is something to look forward to.

I am also getting into video editing, for the time being though I will be using game footage from when I do gaming sessions, and try to do various edits on it, reduce the amount of times I died and so forth.

But this is only the first week of 2015, I will pace myself and set my goals for the year and hopefully by December, I would at least be at the same level I was back in 2012.

Till the next time I drop one of these little blog updates, this is me wishing everyone peace, love, and long life. I’m gone.

Standard
cropped-various-719.jpg
Blog

It’s Been A Long Year

 

cropped-various-719.jpgWell this is the first official blog entry for my new site but I guess that is a good thing.

2014 has been a long year for me, I started the year unemployed but now I have a job, so that’s good. But the biggest thing for me was to decide which road to take in terms of Design and Development.

This year was supposed to be my year of coding, but as life would have it I wound up designing a lot more than developing, and truth be told I kind of like it that way, when I am designing it feels natural, you know, my imagination is flexing its infinite awesomeness, but when I go to code something its always stressful, but at the same time fun in a completely different way.

But the final decider for me would have to be how volatile the life of a developer is. You spend months on end learning a new technique only to have it become obsolete in pretty much the amount of time it took you to perfect it.

2014 also saw me getting baptised and also playing several instruments (bass guitar being my strong suit). Things that I never really expected to happen so soon.

I know I didn’t blog a lot in 2014 but it was probably for the best, as I would have been way more challenging to move a larger blog from wordpress.com and trust me its not exactly easy. But that’s a story for another time.
Looking forward to 2015, I can’t promise anything but my focus would be mostly on Graphic Design, so I don’t know if I would be posting more or less.

I do have to admit though that I am extremely rusty when it comes to Graphic Design, and with my Job and Music Lessons, I have an uphill battle ahead of me, but then again that is pretty much everyday for me.

Music wise I am learning to play the Bass Guitar, and I am actually quite good, but my biggest problem is that I am stuck playing just root notes and not coming up with all these crazy, cool sounding melodies.

But I just have to take it one step at a time, and do my best.

Again thank you for supporting my blog, even though I all but abandoned it and I would just like to wish everyone Seasons Greetings and A Prosperous New Year.

Delano Maloney.

Standard
wpid-wp-1418612121129.jpeg

It takes 30 seconds to create a text message that will make her smile for hours

Quotes

Quote: It Takes 30 Seconds

Image