Content Management

The best way to deliver your information to the world requires the best content management. We explore WordPress as one of the tools you can use. We stick to Open Source solutions that run on Linux utilizing MySQL.

Posting Usable Code in WordPress With No Plugins

Due to the fact that Worpress decided to get rid of the “Press It” function until 2.6, I have recently had the need to post the code that will allow you to use the “Press It” feature on your own.

As it turns out, it is supposedly very hard to post code in WordPress. If you just copy and paste your code in, WordPress will turn your quote marks into “Smart Quotes”. They look pretty, but do not work with code. So I set about finding a plugin or some other method to correct this.

Everywhere I looked people were recommending different methods. From using plugins and custom fields, to manually editing, and to online converters. I tried them all, but they either didn’t display the code correctly, or messed up my formatting site wide.

So here is my solution, it may have been suggested before, but I sure couldn’t find it with hours of searching and testing. Simply insert this code into your style sheet:

pre {
width: 95%;
overflow: auto;
padding: 10px;
margin: 1em auto;
font-family: "Courier New", Courier, mono;
background-color: #ddd;
color: #555;
border: 1px dotted #999;
}

Now, when you paste your code into the WordPress editor, highlight it, and select the preformatted option from the “Format” drop down menu.

location of the format menu in the wordpress post editor

The pre tag will preserve your quote marks, spacing, indenting, and other elements.

And thats all you have to do. Your code will work when copied and pasted from the browser. If you have a long line of code, instead of running over everything, this will make a horizontal scroll bar to contain it.

Note: WordPress may apply separate <pre> tags to each line when you select it from the drop-down menu. (I have no idea why, it defeats the whole purpose of <pre> tags) To get around this, either manually add <pre> and </pre> before and after the text under the HTML tab in the edit screen, or apply the formatting with the code all as one line, and add the line breaks in afterward.

Continue reading →

Categories and Tags: what to use

Someone said on the hackers forum: “The analogy I use is that Categories are like a book’s table of contents, and Tags like its index.”

However, be aware that categories that are actual search terms are very strong Google magnets.

So, instead of using a category “lines we carry” think about “High Performance Motorcycles in Dayton OH”  and then use tags to highlight the brands and product names.

Tags are ways to identify the keywords or concepts in each post- categories group the posts in ways that make sense for others. Lately, Google has started dinging sites for putting a single post in more than three categories (which is too bad)- so think carefully about your choice of categories.

Continue reading →

Websitetology Seminar on Monday, January 21st, 2008

The next Websitetology seminars will be held, Monday January 21, 2008

8:30am to 5 pm

Location Nehemiah University, 750 S. Main Street Dayton OH 45410

If you are wondering if you should take this seminar: http://websitetology.com/?p=91

Sign up for it here: http://websitetology.com/?page_id=247

Continue reading →