With all the websites we manage, it’s unlikely that we’re going to go around to all of them and update the year every January. The ideal way to handle this is with a snippet of PHP:
<p>© Copyright 2000- <?php echo date(‘Y’);?>, Sigma Web Marketing. All rights reserved.</p>
However, is the server you’re working on [...]
Strangely, the <hr> tag (horizontal rule) button isn’t enabled by default in the WordPress Visual Editor (TinyMCE). Here’s how to turn it on, along with any other buttons you want to use.
Open up your functions.php file and add the following code:
function enable_more_buttons($buttons) { $buttons[] = ‘hr’; /* Repeat with any other buttons you [...]
I like this light-gray horizontal rule that is visually centered within the container and tapers to nothing at the end. Very cool!
hr { clear: both; float: none; width: 100%; height: 1px; margin: 1.4em 0; border: none; background: #ddd; background-image: -webkit-gradient( linear, left bottom, right bottom, color-stop(0, rgb(255,255,255)), color-stop(0.1, rgb(221,221,221)), color-stop(0.9, rgb(221,221,221)), color-stop(1, rgb(255,255,255)) ); [...]
Add this snippet to the functions.php file to change the length (number of words) in the excerpt on a particular category page.
function custom_excerpt_length($length) { if (is_category(‘Events’)) { //For the events category return 65; } else { return 40; //for all others pages } } add_filter(‘excerpt_length’, ‘custom_excerpt_length’, 999);
Do you want Contact Form 7 to redirect users to a new page after they submit? Here’s how!
Add this to the “additional settings” section:
on_sent_ok: “location.replace(‘http://www.YOURSITE.com’);”
Want to keep your clients up-to-date with your blog? It’s easy to add a feed from your blog to their WordPress Dashboard. Simply paste in the following code, after adjusting to reflect your feed name and feed URL.
// Adding a news feed widget to the dashboard function wp_admin_dashboard_add_news_feed_widget() { global $wp_meta_boxes; // Our new [...]
Add this to the functions.php file to replace the [...] at the end of your excerpt with a “Read more →” link.
function replace_excerpt($content) { return str_replace(‘[...]‘, ‘ <a href=”‘. get_permalink() .’”>Read More →</a>’, $content ); } add_filter(‘the_excerpt’, ‘replace_excerpt’);
Lee Hodson wrote an excellent post with this title at journalxtra.com/websiteadvice/wordpress/how-to-force-multi-site-to-use-subdirectories-2427
“One of the most common issues to afflict most web developers who try to enable WordPress Multi Site is WordPress’s insistence that subdirectory blogs cannot be setup. . . There is a workaround to [...]
If you’re using WordPress Multisite, you may find it useful to be able to display some information about your blog network: Network name, number of blogs and users. Simply paste the following piece of code where you want the info to be shown, for example in your theme footer.
<?php if( is_multisite() ): ?> The [...]
You can easily send email alerts with a cron job, but all paths must be absolute.
4 4 * * * /usr/local/bin/php /home/abcdefgh/public_html/visitors-send-email.php
When you use such cronjob to send the mail alerts, the “require_once” path inside the “/home/abcdefgh/public_html/visitors-send-email.php” file must be absolute path instead of relative one. If we mentioned it as relative it [...]
Twitter Feed
- No public Twitter messages.
Tags
android aweber backup book clubrunner css dacdb email marketing facebook fbi foursquare functions gmail gmail filters gmail signatures google google buzz iPad iphone linkedin linux Local Marketing myspace openoffice os x polio plus prescott az prescott enews prescott young professionals press releases projects ratepoint Rotary Club search security seo social social media techcrunch tweetdeck twitter website speed windows wonderhowto wordpressSigma Web Marketing



