Posts Tagged ‘wordpress’

Add or remove formatting buttons from the Wordpress write post textarea

Friday, September 26th, 2008
show more text formatting buttons in wordpress

show more text formatting buttons in wordpress

As I write this, I’m looking at at single row of buttons at the top of this Wordpress ‘Write Post’ text area that allows me some basic text formatting options; bold, italic, strikethrough, bulleted list, numbered list, and so on. A few of my clients have asked for more formatting options like the ability to change the font size and color. Most of the options they’re after are actually just hiding.
If you’re seeing a single row of formatting buttons, try the last one on the right. It shows the ‘Kitchen Sink’ which is a second row of formatting options like style, underline, justify, text color, etc, and is sure to satisfy the perfectionist blogger.

$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'separator',

Now, feel free to remove or add any of the attributes listed on lancelhoff.com (thanks Lance!) until you’ve made formatting stew.

Popularity: 27% [?]

How to show only your single latest post on your Wordpress home page.

Tuesday, July 29th, 2008

Wordpress Settings > Reading - setting the number of posts per pageIn Wordpress 2.x under Settings > Reading, you can set a number for “Blog pages show at most”.  This applies globally, however.  I discovered a method to make your home page to show only the latest post, while allowing all other blog pages to respect the “at most” number.

In index.php, just before the loop, I added the following line:

<?php query_posts('showposts=1'); ?>

Basically, that sets up a preemptive query and grabs only the latest post, rather than allowing the loop to query the latest “at most” number of posts.

Popularity: 52% [?]

Happy Wordpress Day! Why we heart WP.

Tuesday, July 1st, 2008

It’s the day we unofficially celebrate the existence of the Wordpress blogging platform.  Big thanks to Automattic for forging what has become one of our weapons of choice.

We hearted Wordpress right out of the gate for its easy configuration as a simple content management system.  As open and streamlined as many CMSs are aimed at being, many “simple” CMSs with good intentions tend to be too bloated for some of our clients.  When we started using WP, it was the perfect minimalist shim to wedge in that static XHTML/CSS to simple custom CMS site gap. (more…)

Popularity: 57% [?]

A couple of Wordpress fixes for tags and post login screen.

Monday, June 2nd, 2008

I came across a couple Wordpress hacks that helped me get tags to behave.  The first is a little PHP call to get a tag list to appear if you’ve used get_posts() to pull posts from a specific category, and the get_tags() function isn’t working for you.  So, if you’re not using the standard loop, but instead want to have the tags for each post appear in a custom loop, use this function as seen here on the wordpress support forums.

print get_the_term_list( $post->ID, ‘post_tag’, ‘ ‘, ‘ ‘, ‘ ‘ ) ;

with arguments in this order: resource_ID, taxonomy, before, seperator, after.

——

If you are restricting your Wordpress site to specific users, and want to control the page they are directed to immediately after logging in, use the “redirect_to” argument in the URL string for the link.  Also seen here in the forums.

http://example.com/wp-login.php?redirect_to=http://example.com

Popularity: 51% [?]

Updating Wordpress plugin Popularity Contest for WP 2.5

Tuesday, May 20th, 2008

Down at the bottom of this page, you’ll see a list of the most popular posts.  It took some doing to get this plugin working on this site.  I upgraded to Wordpress 2.5 before installing the Popularity Contest plugin.

Basically, follow the instructions in this article: http://tinyurl.com/2wne9f

You’ll have to edit popularity-contest.php in your plugins directory, as well as add 2 tables to your WP database either by running the included query, or manually with phpMyAdmin.

Popularity: 68% [?]