941-685-8851

WordPress twentyten_posted_on

WordPress 3.x ushered in a new groundbreaking overhaul of the world’s most popular website content management system. Along with powerful new tools that make WordPress the modern web developer’s CMS package of choice, a new WordPress default theme was released, TwentyTen. The new TwentyTen theme ships as the default WordPress theme and replaces the old, dated Kubric default theme. TwentyTen has a more modern look and uses more modern functionality, while remaining simple enough to be used as a default theme.

WordPress recommends that theme author’s make a copy of the default theme that ships with WordPress, and use this copy as a template when creating a new custom theme. This makes perfect sense. By keeping an active version of the default WordPress theme installed, a theme author can always revert to the default theme, should a problem arise. An active default theme also serves as a great troubleshooting tool for theme authoring and plugin installation.

A common edit to the TwentyTen theme is removing the authored by listing from the post meta title, generated by a function called ‘twentyten_posted_on’. This is rather simple to resolve.

The twentyten_posted_on function is in the functions.php file, on line 273.

Remove the values for the author by changing the following code:

function twentyten_posted_on() {
 printf( __( '<span>Posted on</span> %2$s <span>by</span> %3$s', 'twentyten' ),
 'meta-prep meta-prep-author',
 sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span>%3$s</span></a>',
 get_permalink(),
 esc_attr( get_the_time() ),
 get_the_date()
 ),
 sprintf( '<span><a href="%1$s" title="%2$s">%3$s</a></span>',
 get_author_posts_url( get_the_author_meta( 'ID' ) ),
 sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
 get_the_author()
 )

Your modified code should look like this:

function twentyten_posted_on() {
 printf( __( '<span>Posted on</span> %2$s', 'twentyten' ),
 'meta-prep',
 sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span>%3$s</span></a>',
 get_permalink(),
 esc_attr( get_the_time() ),
 get_the_date()
 )

Now only the “Posted on Month, Day, Year” will display on post meta-titles. The author will no longer display.

Share
 

WordPress Login text

WordPress web design customization can be a simple task for experienced WordPress developers. By simply adding function calls and filters to the active theme’s ‘functions.php’ file, you can perform just about any WordPress web design customization, to both the front end and backend of WordPress websites.

WordPress has a built in function for logging users in and out called ‘wp_loginout’. The default text displayed for this is ‘Log in’ and ‘Log out’ respectively. But what if you want your login link to display as ‘Sign in’ and ‘Sign off’ instead of the default ‘Log in’ and ‘Log out’? Add a filter to the active theme’s functions.php of course.

/**
 * Change login text
 */

add_filter('loginout','loginout_text_change');
function loginout_text_change($text) {
$login_text_before = 'Log in';
$login_text_after = 'Sign in';

$logout_text_before = 'Log out';
$logout_text_after = 'Sign off';

$text = str_replace($login_text_before, $login_text_after ,$text);
$text = str_replace($logout_text_before, $logout_text_after ,$text);
return $text;
}

Now upload the edited functions.php file, and when viewing the WordPress web design in a web browser, the ‘Log in’ text link will now display as ‘Sign in’.

Share
 

Web Design and browser cache

Web design clients will often claim they cannot see web design edits when reviewing a web design draft. If at anytime edits are not apparent in your browser, refresh your browser. If refreshing doesn’t work, delete the browser cache, then refresh. Web browsers will take ‘snapshots’ of a web page and save them to your computer. So when you visit that page again, instead of downloading the page from the Internet, it merely loads the saved page from your computer, making the load time much faster. This can cause changes to a web page to not be visible until the browser is refreshed, or the cache is deleted.

Share
 

WordPress 3.0.1 Post Thumbnails

With WordPress 3.0.1, you can add images to identify each post individually.

Make sure the function:  ‘add_theme_support( ‘post-thumbnails’ ); ‘ is clarified in your functions.php file.

Then add the following to your loop.php file where you want the post thumbnail to appear:

<?php // The Post Thumbnail function is active by default, but this line of php will make it display.
if ( function_exists(“has_post_thumbnail”) && has_post_thumbnail() ) { the_post_thumbnail(array(100,60), array(“class” => “alignright post_thumbnail”));
} //Post Thumbnail Ends ?>

So if you want your web design to show thumbnails on the post title, insert the code with the title attribute:

<h2><a href=”<?php the_permalink(); ?>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyten’ ), the_title_attribute( ‘echo=0′ ) ); ?>” rel=”bookmark”><?php the_title(); ?>

<?php // The Post Thumbnail function is active by default, but this line of php will make it display.
if ( function_exists(“has_post_thumbnail”) && has_post_thumbnail() ) { the_post_thumbnail(array(100,60), array(“class” => “alignleft post_thumbnail”));
} //Post Thumbnail Ends ?>

</a></h2>

If you want your web design to show thumbnails before the content, insert the code before the content attribute:

<div>
<?php // The Post Thumbnail function is active by default, but this line of php will make it display.
if ( function_exists(“has_post_thumbnail”) && has_post_thumbnail() ) { the_post_thumbnail(array(100,60), array());
} //Post Thumbnail Ends ?>
<?php the_content( __( ‘Continue reading <span>&rarr;</span>’, ‘twentyten’ ) ); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div>’ . __( ‘Pages:’, ‘twentyten’ ), ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –>

Share
 

2010 Smartphone Stats: Droid…the Blackberry Killer!

The 2010 statistics regarding the smartphone market all appear share the same conclusion: Google’s Android mobile operating system has gained, and continues to gain market share at a very impressive rate. Android appears to be killing the Blackberry’s Research in Motion operating system, whose market share has plummeted by 50% since Q3 of 2009. Android has also put the brakes on the iPhone’s popularity, whose market share has dropped almost 18% since Q3 of 2009.

2010-smartphone-stats

Rumors abound that Apple plans to release Verizon-ready iPhones in the first quarter of 2011. The iPhone’s Achilles’ heel is it’s unreliable AT&T network, so a Verizon powered iPhone may slow the Droid onslaught a little. But with the accelerating market share of Android phones, which is currently twice as much as the  iPhone, it’s doubtful Apple can play catchup. Especially when most reviewers rate the DroidX as superior to the  iPhone 4. And who will be most affected by Microsoft’s plan to enter the smartphone market?

Share
 

CSS for WordPress default theme

CSS code hints for customizing the WordPress default theme ‘TwentyTen’.

Many of  these css snippets will work as-is. Others may require a specific url path or image name. read more…

Share
 

WordPress 3: Removing contextual help

Sometimes clients request the contextual help be removed

Near line 3643 you will see this code:

<div id="contextual-help-link-wrap"><a id="contextual-help-link" href="#contextual-help"></a></div

Removing the PHP code and anchor will disable the contextual help.

Share
 

Generic Terms and Conditions

What is a terms and conditions web page. Terms and conditions are rules, usually set by the website owner, that are presented to website users, to notify the user of any usage rules that apply to access to the website, or certain areas of the website. Ecommerce shopping cart websites typically need a terms and conditions web page to stipulate the guidelines for usage of the shopping cart. Blog websites will often need terms and conditions web page to state liability restrictions of user comments. Download websites will often have a terms and conditions web page to state the usage restrictions of downloads.

Here is a generic website Terms and Conditions statement. read more…

Share
 

Enabling Joomla Legacy compatibility

Some really great modules and plugins have been developed for older versions of Joomla. So how can they be used in recent versions of Joomla?
Go to: Extensions>Plugin Manager
Enable the plugin “System – Legacy

That will allow backwards compatibility for most modules and plugins.

Share
 

Creating Joomla Banners

Banners are a native component/module system in Joomla.

Upload the banner image(s):
Go to Site>Media manager
Upload the image(s) to the banners directory

Create a Joomla Banner component: Components>Banner
Create a client
Create a category
Create the banner component, specifying the client and category.

Create a banner module:
Go to Extensions>Module Manager
Select Banners
Specify a title, enabled, position, banner client and category.

The banner image will now display in the page position specified

Share