Archive for the ‘WordPress’ Category

All posts in WordPress category.

HOWTO: Show Page Template Name

0

A cool function to simply display the path of the WordPress template used on a particular page:

<?php echo get_page_template() ?>

How/when to use this?
If you are trying to debug a site and want to quickly see what page template is used – you can put that PHP code into footer.php and it will then echo out the path so you can quickly and easily see what template is being used.

HOWTO: Make WordPress Titles Title Case

0

Posted by: Jennifer Zelazny on November 18, 2011

Categorized: HOWTOs, WordPress Logic

Tagged: ,

Ever need to make sure all your titles showed up with using “Title Case” and not just by using CSS? By adding the following to your functions.php file in your theme – you can ensure the post title will have the case you want:

/**
 * Custom Title Case for the_title()
 * @returns $content (title with title case)
 */
add_filter( 'the_title', 'sdac_use_title_case' );
add_filter( 'wp_title', 'sdac_use_title_case' );
function sdac_use_title_case( $content ) {
	$content = ucwords( $content );
	return $content;
}

Change WordPress Author Permalink

0

Posted by: Jennifer Zelazny on October 19, 2011

Categorized: WordPress, WordPress Logic

Tagged: ,

Ever want to change the “author” permalink from something like /author/jzelazny to something more custom for your CMS like /teacher/jzelazny? This is relatively easy by adding a function to your functions.php file:

// Adjust your author permalink
add_action( 'init', 'custom_theme_init' );
function custom_theme_init() {
   global $wp_rewrite;
   // Change the value of the author permalink to teacher
   $wp_rewrite->author_base = 'teacher';
}

Flush your permalinks (Settings > Permalinks) and now all your /author/ pages will now be /teacher/.

Create Anti-Spam Email Address in WordPress

0

Posted by: Jennifer Zelazny on October 12, 2011

Categorized: HOWTOs, WordPress

Tagged:

I recently found a gem in the WordPress documentation. If you are looking for a way to display an email address but you do not want to use the actual email address because you are worried about spam, worry no more. Check out the “antispambot()” function that we have in WordPress. This function will take the email address that you want to use and obfuscates it. When you view the page you see the actual email address. When you view the source you do not see you see an encoded email address.

Example
In the example below – I will am using the WordPress function “antispambot” to create a mailto link for the post author (this would go in the loop).

<a href="mailto:<?php echo antispambot(get_the_author_meta('user_email')); ?>">Email the Author</a>

Further Documentation
http://codex.wordpress.org/Function_Reference/antispambot

SDAC Plugin Update: SDAC Related Content 2.3.1

0

Posted by: Jennifer Zelazny on October 11, 2011

Categorized: SDAC, SDAC Products, WordPress, WordPress Plugins

Tagged:

We just released a new version of our WordPress Related Content plugin. This update is very minor (adds in a div that surrounds all the output) but it will significantly make styling your related results easier.

After you update your plugin – you can control the output by adding something like this to your stylesheet:

#sdac_related_posts h4 {border-bottom:1px dashed #c7c7bb;margin:15px 0 5px 0;padding-bottom:5px;}
#sdac_related_posts ul {margin:10px 0 10px 20px;}
#sdac_related_posts ul li {margin:0 0 3px 0;}

* The code above is what styles the related posts on this site.

bbPress as a Plugin

0

Posted by: Jennifer Zelazny on August 19, 2011

Categorized: bbPress, WordPress Plugins

Tagged: , ,

After completing a site refresh (updated theme, use of custom post type for our portfolio/products), I also decided to migrate from the standalone version of bbPress to the new bbPress plugin. Everything went smoothly and I plan to spend some time customizing the layouts after I read more about best practices. All our forums got imported and are still available at: http://www.sandboxdev.com/forums. Watch for some upcoming posts on how to customize this new version of bbPress.

Easily Add Page Excerpts in WordPress

1

Posted by: Jennifer Zelazny on August 9, 2011

Categorized: HOWTOs, WordPress

Tagged: , , ,

Ever need to add an excerpt field for WordPress when working with pages? There is an easy, one line way to do this (no plugin needed). Simply add this to your theme’s functions.php file:

add_post_type_support( 'page', 'excerpt' );

Once you have that in place – you can then use the WordPress the_excerpt() function to show the excerpt within the theme.

WordPress 3.2 is Available

0

Posted by: Jennifer Zelazny on July 6, 2011

Categorized: WordPress, WordPress Updates

Tagged: , ,

WordPress 3.2 has officially been released. The update contains a number of changes making WordPress faster with a refreshed backend user interface. You can read more about all the changes and updates that went into 3.2 if you are interested. You can also see all the specific changes/fixes as well.

Download the latest versions of WordPress: WordPress 3.2

WordPress 3.1.3 Is Available

0

WordPress 3.1.3 has officially been released. The update contains security fixes for all previous versions. You can read more about all the changes and updates that went into 3.1.3 if you are interested. You can also see all the specific bug/security fixes as well. It is recommended that everyone applies this update promptly.

Download the latest versions of WordPress: WordPress 3.1.3

SDAC Plugin Update: SDAC Translate 1.2.6

0

We just released the latest version of SDAC Translate (1.2.6). This update fixes a display issue introduced with 1.2.5.

Download the latest version of SDAC Translate from WordPress.org.