Posts by The Doctor:
No-Title Sticky Post-Format Posts?!
in Tips
as add_theme_support, post-formats, post_class, sticky posts, WordPress
Making sure to test all of the combinations these three items can create.
Filtering WP Title
A recent recommendation, starting with WordPress 3.3, from the WordPress Theme Review Team reads: Themes are REQUIRED to use wp_title filter to filter wp_title() (RECOMMENDED), or pass argument to wp_title() (OPTIONALLY), in order to modify document title content This has been discussed, worked through, and for the most part sorted out … but there doesn’t [...]
Enqueue Plugin Custom Stylesheet
in Tips
as add_action, how-to, is_readable, plugin_dir_path, plugin_dir_url, WordPress, wp_enqueue_scripts, wp_enqueue_styles
Now that is a bit of a handful to grab onto … but the code and concept is relatively straight forward and easy to implement. As I was recently updating some of my plugins in preparation for WordPress 3.3 I decided to better implement the style elements being used in these plugins. The current best-practice [...]
Start Using WordPress Beta
The basics, as a general guideline, on how to start using the latest WordPress beta version.
Do Not Display Comments HTML Tags
A standard function found in many themes is the comment_form. This is a core function of WordPress that produces a standard comment form generally consisting of text fields for the name and email address and a textarea for the actual comment. You will also find there are some standard text outputs produced by this function [...]
Dynamic Copyright Revisited
in Tips
as apply_filters, bns_dynamic_copyright, dynamic_copyright, WordPress
An updated version of the dynamic copyright function found in BuyNowShop.com themes by Cais.
WordPress Child-Themes
as child-theme, how-to
Let’s start with a definition for a Child-Theme: A WordPress child theme is a theme that inherits the functionality of another theme, called the parent theme, and allows you to modify, or add to, the functionality of that parent theme. the WordPress Codex Child-Themes are also: … the recommended way of making modifications to a [...]
Reset Your WordPress Test Site
as how-to, installation, reset, WordPress
How to reset your WordPress test site in three easy steps.




Remove Comment Form Website Section
in Functions, Tips
as add_filter, comment_form, how-to, WordPress
From time to time an interesting Five-Minute-FixTM comes along that sparks a great reason to add another WordPress Tips post. The idea for this tip started with this comment at BuyNowShop.com:
The solution may be obvious to some and can be readily derived from the information found on the WordPress codex page for the `comment_form` function, but if you are new to WordPress and/or not familiar with writing a function to use with `add_filter`, here is a very simple and working snippet to use in your theme:
function wpfa_remove_comment_website_section(){ $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $aria_req = ( $req ? " aria-required='true'" : '' ); $fields = array( 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>', 'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>', 'url' => '' /** removes website section */, ); return $fields; } add_filter( 'comment_form_default_fields', 'wpfa_remove_comment_website_section' );Ideally, this will be placed in the ‘functions.php’ file of your theme, but better yet this should be included in the Child-Theme you created of the theme you want to modify.