PHP Magic Book – Free PHP Scripts, Tutorials and Downloads, PHP AtoZ Reloaded, free php tutorials, free php downloads, php scripts, PHP tips

Archive for the ‘ WordPress ’ Category

Change Default WordPress Gravatar in Comments

If you use a plugin to add avatars to your blog, there might be a setting in the plugin’s options page for choosing the default avatar. If you use WordPress 2.5+, then you probably use a template tag like the following for your avatars.

< ?php echo get_avatar( $comment, 32 ); ?>

You can easily modify this code to show a default customized gravatar to appear if the comment author has no gravater to show.

(more…)

Posted in: Hacks, WordPress
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

Hide WordPress WP-Admin Login Page

Here is a code which you can use to hide your wp-admin screen. Change YOURSECRETWORDHERE to something else. It can be any word you want. Just make sure it’s unique and somewhat long. Make it, like, your pets name or something random. Change ADMINFOLDER to the new folder name you want. Letters, numbers, underscores, and dashes only. That ^ in front of it is on purpose. Don’t delete that. Back up your original .htaccess file before making any changes. I am not responsible for any mess up.

(more…)

Posted in: Hacks, WordPress
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

Customizing WordPress Tags Cloud – A Guide

tags-cloud

If you have already used some social networking website or you are a blogger then you definitely know what the tags are. WordPress offers Tags Cloud which can be customized the way you use it at your blog. By default WP Tag Cloud will generate limited number of tags in alphabetical order. Custom templates for tags can be made which means that you can have a full page of tags as you want it. Look at the 404 page of phpmagicbook. I have used tags to give the users some more options to browse if he gets distracted by ‘page not found error’. I was thinking to give my users all tags option to click at any one. Okay now this is just one use. You can have your own customized tags page which can contain just tags and nothing more. We explore some ways about how we can customize tags/tags template/tags page at our WordPress blog.

(more…)

Tags: , , , ,
Posted in: Hacks, WordPress
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

How to Include Specific File In WordPress Blog Template

Considering the fact that you have some file placed in your current theme folder, you can call it via following code with or without condition. If you plan to call some file right from root folder of your WordPress blog then just remove template path area of code.

(more…)

Tags: ,
Posted in: Hacks, WordPress
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

How To Display Some Content at Just Home Page and Single Post of Blog

Recently I wanted to display little about section me at my blog but just at home page and single post under sidebar. So how we can tell that we are at home page or at single post in case of WordPress Blog? Here is the code:

(more…)

Tags: ,
Posted in: Hacks, WordPress
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment



  Subscribe Via RSS
  Subscribe Via Email