Category: Uncategorized

Major Oops

Yesterday I discovered the hard way that I had let my domain registration lapse. My credit card number changed a few months ago so the registration couldn’t be renewed, and my contact info was old as well.

When I went to my site to post a few article updates, it was gone. Just a generic landing page with annoying ads instead of the fansite that I had toiled over for so long.

I immediately went to the GoDaddy site to renew my domain as well as my webhosting, which I discovered had also expired. As I was scrambling to type in various numbers, I was thinking to myself: When was the last time I backed up the database? Are all the files on my local machine the same as those that were online when my site was last up? So this is what all those best practices are really about.

Fortunately, shortly after my payment went through, everything was back to normal. All the files, the databases–it was all saved even though GoDaddy could’ve gotten rid of it all if they wanted to. I just have to thank them for making it so easy to get it all back.

Then I went straight to the forum to post an apology to any visitors who had seen that awful page. By evening, there was a response from someone who was afraid I had just given up on the site and was thankful it was back up.

Yep, that’s what makes it all worthwhile.

Playing with WordPress plugins – Part I

Quite a while back, I wanted to make a quiz site with questions about PHP, and as I’m still into learning more about WordPress, the only logical thing to do is to develop a plugin that will make WordPress into the perfect CMS for this project.

At this moment, there are 5,855 plugins in the WordPress plugin directory. If so many other people have done it, surely it can’t be too hard, right? But I spent countless hours reading the documentation months ago and never had anything to show for it….

Well, this time I’m going agile. I wrote a post asking “What is 2 + 2?”, added a custom field called “correct” with the value 4, and now have the code to make that answer appear underneath the blog entry. It took me a while to figure out that I needed to pass $content to my function to keep the post from disappearing, but it looks like I’m on my way.


add_action( 'the_content', 'the_pop_quiz' );
function the_pop_quiz($content) {
echo $content;
$flif_pid = get_the_ID();
$pop_quiz_answer = get_post_meta( $flif_pid, 'correct', true );
echo $pop_quiz_answer;
}

Ringbinder theme by Themocracy