Exclude Specific Author From RSS

Filed Under (How To, Wordpress Tips) by Wpfeed on 15-09-2011

sometimes you wish not to display one or more of your authors in RSS feed of your blog, it can be a test user or any other reason.

here is the code to paste in your functions.php

function wp_exclude_author($query) {
 if ($query->is_feed) {
 $query->set('author','-1'); //Author ID
 }
return $query;
}
add_filter('pre_get_posts','wp_exclude_author');

if you wish to exclude more authors just use space and another user ID with minus, like that:

$query->set('author','-1 -5'); //Author ID



Popularity: 2% [?]

Display Random Posts In WordPress

Filed Under (How To, Wordpress Tips) by Wpfeed on 13-09-2011

Sometimes in your theme you want to display random posts or maybe random related posts in your sidebar,

here’s an easy way to do it.

in your single.php or index.php, change the main loop to:

<?php

query_posts(array('orderby' => 'rand', 'showposts' => 1)); 
if (have_posts()) : while (have_posts()) : the_post(); ?> 
<h1><a href="<?php the_permalink() ?>">
<?php the_title(); ?></a></h1> <?php the_content(); ?> 
<?php endwhile; endif; ?>

Popularity: 2% [?]

Display Facebook Comments Count Anywhere In Your Blog

Filed Under (How To, Wordpress Tips) by Wpfeed on 12-09-2011

if you are using facebook comments social plugin for your blog comments, you can use this code snippet to display comments counter.

paste it where you want to display the counter. if you’re outside of the wordpress Loop use - get_permalink( $id ); instead of the_permalink();.

<fb:comments-count href=”<?php the_permalink();?>”></fb:comments-count> Comments

Popularity: 2% [?]

Remove WordPress Admin Bar

Filed Under (How To, Wordpress Tips) by Wpfeed on 11-09-2011

From version 3.1 wordpress has an admin bar at the top of the blog displayed all the time if you are logged in. if you with to remove it from the theme and not by css tricks, paste this code into your functions.php:

 

remove_action('init', 'wp_admin_bar_init');

Popularity: 2% [?]

Change Author Name Or Style Automatically

Filed Under (How To, Wordpress Tips) by Wpfeed on 10-09-2011

let's say you have a sponsored author you want to display in bold or
maybe change the font size or color. you can do it automatically with WordPress.
inside the function.php paste this function, just don't forget to change
the NAME_OF_AUTHOR to the name of the author you wish to take care of.
function custom_author_name( $name ) { global $post; if ($name == 'NAME_OF_AUTHOR'){
 $name = '<font color=#761B4A><b>' . $name . '</b></font>'; } return $name; } 
add_filter( 'the_author', 'custom_author_name' );

Popularity: 2% [?]

Use Your Post Featured Image In Facebook Share Automatically

Filed Under (How To, Wordpress Tips) by Wpfeed on 09-09-2011

when sharing on facebook or even pressing the "like" button,
your featured image of the post will show as the default image.
if no featured image you can tell the function to use your LOGO.
just paste this code in functions.php, don't forget to tell
the function where your logo is (SOURCE_TO_YOUR_LOGO).
function insert_image_src_rel_in_head() {
 global $post;

 if ( !is_singular()) //if it is not a post or a page do nothing
 return;

 if(!has_post_thumbnail( $post->ID )) {
 $default_image="SOURCE_TO_YOUR_LOGO"; 
 echo '<meta property="og:image" content="' . $default_image . '"/>';
 }
 else{
 $thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' );
 echo '<meta property="og:image" content="' . esc_attr( $thumbnail_src[0] ) . '"/>';
 }
 echo "\n";
}
add_action( 'wp_head', 'insert_image_src_rel_in_head', 5 );

Popularity: 2% [?]

How To Disable Upgrade WordPress Notification

Filed Under (How To, Installation, Wordpress Tips) by Wpfeed on 08-09-2011

very easily you can disable the sometimes annoying  message from wordpress reminding you to upgrade your wordpress. it is recommended to turn it off especially in multi author websites.

in your function.php, paste this code:

add_filter( ‘pre_site_transient_update_core’, create_function( ‘$a’, “return null;” ) );

Popularity: 2% [?]

Add Google +1 To Your WordPress Site

Filed Under (Customization And Themes, How To, Installation) by Wpfeed on 01-06-2011



Google is trying to compete with facebook’s like button. they released a social button called +1 (plus one), when you want to show that you loved the article (somebody said “like”), you press on the +1 button and the counter adds one.

Now you can add +1 button to your wordpress website, we suggest to wait a few weeks to see if it’s not just a “buzz” but if you want to add it here are the steps:

1) go to http://www.google.com/webmasters/+1/button/index.html.

2) customize and choose the setting for your button.

3) copy the lines in the text area :

<!– Place this tag in your head or just before your close body tag –><script type=”text/javascript” src=”http://apis.google.com/js/plusone.js”></script>
<!– Place this tag where you want the +1 button to render –><g:plusone></g:plusone>

and add it to your post or insert to a page in your theme.

THAT’S IT!

 


Popularity: 3% [?]

Places To Get Some WordPress Help

Filed Under (How To) by Wpfeed on 19-04-2011

Tagged Under :

From time to time you get stuck with a wordpress problem, either you are a wordpress developer or wordpress user, it doesn’t matter, you’ll need help with questions and problems you have.

if you are a wordpress expert, these places are good to earn some reputation and some of them can earn you some dollars too.

WP Questions

a place for askers to get quick help and experts to earn some money. the moto of the site:

When I am facing a tight deadline, I do not want to spend 4 hours looking up information on Google – I’d rather just pay someone to tell me the answer.

Create Your Account Here

WordPress Forums

the official place to get help from the community. there’s a variety of resources to help you get the most out of WordPress. Your first stop should be the documentation, where you’ll find information on everything from installing WordPress for the first time to creating your own themes and plugins.

WordPress Answers

the very popular help site stackexchange.com brought you this wordpress help site.

This is a collaboratively edited question and answer site forWordPress developers and administrators. It’s 100% free, no registration required.

WordPress Help

WordPressHelp.org is an eirenicon llc website dedicated to providing information on the effective use of WordPress and WordPress-related technologies.We support a community of users interested in innovating and implementing.

Just Answer

When you have programming questions, ask a programmer. And for customized answers to your programming questions ASAP, ask a programmer here on JustAnswer.

Popularity: 3% [?]

WordPress Email Plugins

Filed Under (Customization And Themes, How To, Plugins) by Wpfeed on 07-12-2010

Tagged Under : ,

Sometimes wordpress email capabilities is just not enough for your needs, this is the exact scenario where you need a good plugin to resolve your problem. here are some excellent Email plugins for wordpress:

WP Better Emails
Adds a customizable good looking HTML template to all WP default plain/text emails and lets you set a custom sender name and email address.
http://wordpress.org/extend/plugins/wp-better-emails/

WP Better Emails

WP_Better_Emails

Adds a customizable good looking HTML template to all WP default plain/text emails and lets you set a custom sender name and email address.

URL

News Mailer

Simple plugin for mailing news or updates to members registered on the blog.

URL

Subscribe2

subscribe2

Sends a list of subscribers an email notification when new posts are published to your blog

URL

MailPress

Style your html and plain text mails with dedicated themes and templates.

Double opt-in subscription.

Subscriptions to Comments, Newsletters/Post notifications and even to Mailing lists.

Newsletters/Post notifications on a per post, daily, weekly, monthly basis.

Optional : full control on all mails sent by WordPress.

URL

HTML Emails

htmlemails

Converts the default plain text email notifications into fully customizable, sweet-lookin’ HTML emails.

URL

Newsletter

newsletter

Newsletter is a plug-in to collect subscribers and send out newsletters.

URL

Blog Widget by LinkWithin

Popularity: 10% [?]

Theme Forest
Theme Trust
elegant themes
press75.com
ithemes
wpshow
wopshow

free wordpress 3.0 theme - wp3theme Theme