Getting the_time() to work

March 9, 2010 by Stephanie

So someone was curious about how to get the_time to work in Wordpress. Here’s an example (taken from this theme I customized) on how to use the_time:

This is the basic way to show the month, day and year like shown in my posts:

the_time('F j, Y');

However if you want to do something with the actual timestamp (such as showing time you posted), you can use this:

the_time('g:i a');

Refer to the chart below to know what character to use in to customize the display (You’d just change the F j, Y in the_time(‘F j, Y) ).

read more…

 

Blocking IPs with .htaccess

March 8, 2010 by Stephanie

Today I got quite a bit of comment spam. In researching a possible solution, I have learned how to block IP addresses in the .htaccess file. I never had much experience working with that file but I’m starting to explore what can be done. Here’s an example. Each line containing an IP address can be changed accordingly.

order allow,deny
deny from 123.456.78.901	
deny from 123.456.78.901
deny from 123.456.78.901
deny from 123.456.78.901
allow from all
 

5 key points to starting a blog

March 4, 2010 by Stephanie

I just had my face-to-desk moment this morning. I had a little side gig and while working, I’m answering this guy’s email about his new Wordpress site. I start asking some questions of my own and the stupidest answer I’ve ever gotten: I have no content for my site.

So here folks, this is what you should have when you begin a serious blog (as in not something you’re going to ignore for months on end). Whether or not is personal use or professional use, that is irrelevant. However, if you’re planning on reaching out to someone to help you design and get your blog started, you should have at least this much.

1) An idea of what you want to put on that site.
Is it going to be a personal blog like this one where you talk about anything and everything from life to your interests to the coin that fell out of your pocket and went down the storm drain? Is it going to be a niche blog focusing on one topic that you amazingly know a lot about? Is it going to be a photos blog?

2) What categories do you want to have?
Categories are key to site organization if you’re using Wordpress (I cannot vouch for a whole lot of other blogging platforms). If everything is thrown into “Uncategorized,” do you have an alternate way to organize your content?

3) Design. How do you want your blog to look?
Are you going to go with a default blog and just overshadowed the design a billion other people have with amazing content? Are you going to want your design custom made? Are you going to find someone to do it or are you going to make it yourself?

4) Resources. What do you need to make this blog run?
Do you have hosting? Do you have a domain name or someone that can provide you with a web address? Are you going to use video? If so, do you have enough resource to store those videos somewhere?

5) Your own concept.
There are a billion blogs out there probably playing copycat of another blog. There are a million sites out there that does the same thing YouTube does and yet Youtube still probably is the most used video site ever (not based on any research). Have your own concept and your own niche. There’s a lot of “Been there, done that” so if you have a fresh idea not a lot of people have tapped into, use it!

 

Under the Radar

February 3, 2010 by Stephanie

Here’s a finished product which I mentioned working on earlier.

It was originally this theme here: Magnet. I was given a jpeg of what the end product should resemble and a psd of Magnet, the original theme. This project was different than other projects I’ve worked on because a) I wasn’t given a PSD to slice and dice into a layout. All the layout modifications (color changes, image editing, etc), I was left to do on my own. This gave me ample time to become really familiar of new techniques in Photoshop CS2. This also gave me the chance to work with Wordpress in a professional environment, as opposed to personal uses.

Check out the live version here.

 

Why div-based designs are good

January 22, 2010 by Stephanie

The first thing I did this morning at work was work on a wordpress blog’s theme. We’re in the process of rebranding an existing blog and giving it a new look. We’re working off of a theme that was build by WP Zoom. The end product of my modifications is what is shown above.

I peeked inside as apparently, I’m the only person that knows how to customize wordpress without using a plugin for everything. I was thankful that the design is div based. While table layouts are out of date, I still run into them from time to time. But let me be honest, I hate using tables for layout purposes. I don’t like the way they clutter things up with tr and td.

Div based designs are easier but even that can get messy. It’s important to know when you need a div or when you’re needlessly just putting divs around everything.

I was somewhat fed up when someone else had modified the stylesheet to another theme of mine and ended up screwing up the formatting. I don’t know how… or where she thought the first paragraph of every entry should be italicized…

 

Wordpress: the_date() vs. the_time()

January 21, 2010 by Stephanie

Today while at work, someone asked me about Wordpress and once I heard the inquiry, I had the “oops” moment.

Person: There’s a problem with the date. Some of the entries don’t display the date on the archive pages.
Stephanie: Oh huh, that’s weird. Is it on the other blogs?
Stephanie’s brain: Dammit, I forgot about how the_date() and the_time() works different.

But I fixed the issue. Basically, when using Wordpress, if you want to display the date on ALL the entries, you should be using the_time() function. However, if you only want it on the first entry of that day (as oppose to having it on ALL the entries), you want to use the_date function.

Simple tip, easy to forget. :]

 

I built custom widgets in wordpress

December 9, 2009 by Stephanie

So as I said before, I’m building a wordpress theme for a few blogs. This is one theme that will be used for several blogs, mind you.

I didn’t want to make the css stylesheet since the design is going to be the same, but just on wordpress and not typepad. Therefore, I’m using the same stylesheet except “wordpressing” it. Despite my efforts to stay with the default widgets, I needed more customization for the css. Now generally, you can specify what tags you want in a widget (before/after title, before/after widget) but you can’t target a single widget with specific tags. What applies to one default widget, applies to the rest. The design just isn’t built that way unfortunately.

This led me to making my own, because I need that ability to put different div id/classes into the widgets. To keep the theme as together as possible, I’ve been abusing the include() function and storing the “templates” for the widgets in my theme folder.