logo

Learn PHP with Simple PHP

logo

One of the biggest challenges that Wordpress newbies face is mastering the art of PHP. You don’t have know anything about PHP to get your Wordpress site up and running, but you’d be surprised how much more you can accomplish if you know your PHP. Now, if you have never programmed in your life, picking up PHP may seem very difficult. After all, not only you are going to have to figure out how to program in PHP, you are going to have to learn how to work with mySQL and Apache.

Simply PHP is a training course that is designed for those who are new to Wordpress but want to learn enough PHP to be dangerous. You don’t have to be the best PHP programmer to customize your Wordpress pages or even tweak your existing plug-ins. You just have to pick and choose your spots — be a PHP hacker if you will. The same can be said about mySQL and Apache. Simply PHP is designed specifically for PHP beginners and teaches you how to get things done without subjecting you thousands of pages of LAMP theory.

Simply PHP shows you how to:

  • personalize your Wordpress pages
  • set up your own auto-responder
  • optimize your .htaccess file for your Wordpress site
  • use Javascript on your blog to enhance its functionality
  • code simple games and online tools (awesome for link-baits)
  • set up cron jobs on your server
  • work with mySQL and myPHPadmin to change and backup your DBs

The fun thing about Simply PHP is that you don’t have to be a super geek to learn what you need to start customizing your Wordpress blog. I know a lot of folks rather hire someone on rentacoder.com to do the job for them, but you shouldn’t really hire someone to install a plug-in on your Wordpress blog. You are also provided with all kinds of scripts and examples that you can just grab and plug-in to your Wordpress blog.

Verdict: B+. I found Simply PHP to be a very useful course for folks who are new to the world of PHP and Wordpress. You are going to learn everything you need to know to customize your Wordpress and work with databases. This course is not going to make you a PHP guru, and that’s a big plus. Your goal shouldn’t be to become a programmer but rather do what you do best. By learning the basics of PHP, you can things done faster than before without having to hire anyone to do the simplest things for you. Who wouldn’t like that?

Duplicate ESPN on Wordpress with WSPN

logo

113

ESPN is one of the best sports site in the world. Whether you are interested in MMA or some obscure sport, you can get it all on ESPN. Well, what if you don’t like what the guys at ESPN put on the site? Simple. Create your very own ESPN like website. And with Wordpress, it’s a piece of cake (as long as you have got anything to say). WSPN is an ESPN-clone theme for Wordpress which allows you to get ESPN’s world class design right on your very own site. Take a look at the below screen-shot. Can you tell the difference between this and ESPN’s homepage?

114

WSPN is what you expect a complex them to be and more. You get over 90 settings that you can change to optimize the look and feel of your website (check them all out here). The header comes with dynamic drop-downs as well as a header banner. You also have your ticker which you can feed your RSS into.

115

In summary, here is what you get with WSPN:

  • Comprehensive theme control panel: 91 settings to control every single aspect of your ESPN-clone website.
  • Dynamic drop-down navigational menus: helps keep things simple and user-friendly.
  • Integrated RSS newsticker: just like ESPN, you can have your own ticker and feed your RSS to it.
  • Built-in banner management: control what you advertise on your site easily with the built-in ad manager.
  • Major browser compatible: WSPN is compatible with FireFox, IE, and other popular browsers.

You’ll also get all the PSD files that you will need if you want to do some redesigning. And you get it all for $38.

If you are interested in creating your own niche sports website or just want to beat ESPN at their own game, you can use WSPN to create a very good looking ESPN clone in a snap. For $38, WSPN is definitely worth the price.

Download your copy here.

P.S. don’t forget to post your ESPN clone sites here.

Managing Posts with WordPress Plugin

logo

The WordPress backend is very flexible, and can easily be customized to accommodate a lot of different purposes. In this article by Vladimir Prelovac, we shall learn how to customize the Manage Panel. We will also explore the possibility of turning WordPress into a Content Management System (CMS), using methods provided to us by WordPress (for more info, read Wordpress Plugin Development from Packt Publishing).

In this article, you will learn how to:

  • Customize the Manage Page output
  • Use the error message class to handle display of errors
  • Use built-in WordPress capabilities to handle user permissions

By the end of this article you will learn how WordPress can transform into a CMS.

Programming the Manage panel

The Manage Posts screen can be changed to show extra columns, or remove unwanted columns in the listing.

Let’s say that we want to show the post type—Normal, Photo, or Link. Remember the custom field post-type that we added to our posts? We can use it now to differentiate post types.

Time for action – Add post type column in the Manage panel

We want to add a new column to the Manage panel, and we will call it Type. The value of the column will represent the post type—Normal, Photo, or Link.

  1. Expand the admin_menu() function to load the function to handle Manage Page hooks:
    add_submenu_page('post-new.php', __('Add URL',
    $this->plugin_domain) , __('URL', $this->plugin_domain) , 1 ,
    'add-url', array(&$this, 'display_form') );
    // handle Manage page hooks
    add_action('load-edit.php', array(&$this, 'handle_load_edit') );
    }
  2. Add the hooks to the columns on the Manage screen:
    // Manage page hooks
    function handle_load_edit()
    {
     // handle Manage screen functions
     add_filter('manage_posts_columns', array(&$this,
     'handle_posts_columns'));
     add_action('manage_posts_custom_column', array(&$this,
     'handle_posts_custom_column'), 10, 2);
    }
  3. Then implement the function to add a new Column, remove the author and replace the date with our date format:
    // Handle Column header
    function handle_posts_columns($columns)
    {
     // add 'type' column
     $columns['type'] = __('Type',$this->plugin_domain);
     return $columns;
    }
  4. For date key replacement, we need an extra function:
    function array_change_key_name( $orig, $new, &$array )
    {
     foreach ( $array as $k => $v )
     $return[ ( $k === $orig ) ? $new : $k ] = $v;
     return ( array ) $return;
    }
  5. And finally, insert a function to handle the display of information in that column:
    // Handle Type column display
    function handle_posts_custom_column($column_name, $id)
    {
     // 'type' column handling based on post type
     if( $column_name == 'type' )
     {
     $type=get_post_meta($id, 'post-type', true);
     echo $type ? $type : __('Normal',$this->plugin_domain);
     }
    }
  6. Don’t forget to add the Manage page to the list of localized pages:
    // pages where our plugin needs translation
    $local_pages=array('plugins.php', 'post-new.php', 'edit.php');
    if (in_array($pagenow, $local_pages))

As a result, we now have a new column that displays the post type using information from a post custom field.

What just happened?

We have used the load-edit.php action to specify that we want our hooks to be assigned only on the Manage Posts page (edit.php). This is similar to the optimization we did when we loaded the localization files.

The handle_posts_columns is a filter that accepts the columns as a parameter and allows you to insert a new column:

function handle_posts_columns($columns)
{
 $columns['type'] = __('Type',$this->plugin_domain);
 return $columns;
}

You are also able to remove a column. This example would remove the Author column:

unset($columns['author']);

To handle information display in that column, we use the handle_posts_custom_column action.

The action is called for each entry (post), whenever an unknown column is encountered. WordPress passes the name of the column and current post ID as parameters.

That allows us to extract the post type from a custom field:

function handle_posts_custom_column($column_name, $id)
{
 if( $column_name == 'type' )
 {
 $type=get_post_meta($id, 'post-type', true);

It also allows us to print it out:

 echo $type ? $type : __('Normal',$this->plugin_domain);
 }
}

Modifying an existing column

We can also modify an existing column. Let’s say we want to change the way Date is displayed.

Here are the changes we would make to the code:

// Handle Column header
function handle_posts_columns($columns)
{
 // add 'type' column
 $columns['type'] = __('Type',$this->plugin_domain);
 // remove 'author' column
 //unset($columns['author']);
 // change 'date' column
 $columns = $this->array_change_key_name( 'date', 'date_new',
 $columns );
 return $columns;
}
// Handle Type column display
function handle_posts_custom_column($column_name, $id)
{
 // 'type' column handling based on post type
 if( $column_name == 'type' )
 {
 $type=get_post_meta($id, 'post-type', true);
 echo $type ? $type : __('Normal',$this->plugin_domain);
 }
 // new date column handling
 if( $column_name == 'date_new' )
 {
 the_time('Y-m-d <br > g:i:s a');
 }
 }
function array_change_key_name( $orig, $new, &$array )
{
foreach ( $array as $k => $v )
$return[ ( $k === $orig ) ? $new : $k ] = $v;
return ( array ) $return;
}

The example replaces the date column with our own date_new column and uses it to display the date with our preferred formatting.

Manage screen search filter

WordPress allows us to show all the posts by date and category, but what if we want to show all the posts depending on post type?

No problem! We can add a new filter select box straight to the Manage panel.

Time for action – Add a search filter box

  1. Let’s start by adding two more hooks to the handle_load_edit() function. The restrict_manage_posts function draws the search box and the posts_where alters the database query to select only the posts of the type we want to show.
    // Manage page hooks
    function handle_load_edit()
    {
     // handle Manage screen functions
     add_filter('manage_posts_columns',
     array(&$this, 'handle_posts_columns'));
     add_action('manage_posts_custom_column',
     array(&$this, 'handle_posts_custom_column'), 10, 2);
     // handle search box filter
    add_filter('posts_where',
    array(&$this, 'handle_posts_where'));
    add_action('restrict_manage_posts',
    array(&$this, 'handle_restrict_manage_posts'));
    }
  2. Let’s write the corresponding function to draw the select box:
    // Handle select box for Manage page
    function handle_restrict_manage_posts()
    {
     ?>
     <select name="post_type" id="post_type" class="postform">
     <option value="0">View all types</option>
     <option value="normal" <?php if( $_GET['post_type']=='normal')
     echo 'selected="selected"' ?>><?php _e
     ('Normal',$this->plugin_domain); ?></option>
     <option value="photo" <?php if( $_GET['post_type']=='photo')
     echo 'selected="selected"' ?>><?php _e
     ('Photo',$this->plugin_domain); ?></option>
     <option value="link" <?php if( $_GET['post_type']=='link')
     echo 'selected="selected"' ?>><?php _e
     ('Link',$this->plugin_domain); ?></option>
     </select>
     <?php
    }
  3. And finally, we need a function that will change the query to retrieve only the posts of the selected type:
    // Handle query for Manage page
    function handle_posts_where($where)
    {
     global $wpdb;
     if( $_GET['post_type'] == 'photo' )
     {
     $where .= " AND ID IN (SELECT post_id FROM {$wpdb->postmeta}
     WHERE meta_key='post-type' AND meta_value='".__
     ('Photo',$this->plugin_domain)."' )";
     }
     else if( $_GET['post_type'] == 'link' )
     {
     $where .= " AND ID IN (SELECT post_id FROM {$wpdb->postmeta}
     WHERE meta_key='post-type' AND meta_value='".__
     ('Link',$this->plugin_domain)."' )";
     }
     else if( $_GET['post_type'] == 'normal' )
     {
     $where .= " AND ID NOT IN (SELECT post_id FROM
     {$wpdb->postmeta} WHERE meta_key='post-type' )";
     }
     return $where;
    }_
 (more...)

MarketPlace Wordpress Theme

logo

116

MarketPlace is a new classified Wordpress theme that allows you to create your own market place on Wordpress. It is very similar to ClassiPress but it comes with its own features. MarketPlace allows you to create your very own classified website fast. You can define a set of categories for your classified site and add your listings under them. Your price, listing date, and views are shown on your site.

117

You also get to upload your images easily to your listing website (very similar to ClassiPress). You also have your Google Adsense spot to monetize your site. Of course, you can charge folks for putting their listings up. That’s really up to you.

24

MarketPlace is a simple Wordpress theme for classified sites. If you are interested in running your very own marketplace, you should definitely give MarketPlace a try (and ClassiPress too).

Download your copy here.

How To Become a Wordpress Freelancer

logo

If you haven’t been paying attention, the U.S. economy is in the dumps. Companies are expected to cut even more jobs. If you are in a stable job, you probably belong to a exclusive group of folks who have survived the job cuts in the past few weeks and months. A lot of companies are hurting and if you lose your job, there is a good chance that you are not going to find a job that easily. But if you have Wordpress skills, you should definitely consider starting your own freelance business. You can spend months looking for a job and not find one or just start building business and earn money in the process.

How To Become a Rockstar Freelancer teaches you exactly what you need to know to build a super freelance business fast. The authors own a very popular blog on the very same topic. In this book, you are going to learn how to:

  • Take the first steps: you want to quit your job or you have just lost your job. It doesn’t matter. You are going to learn exactly how you need to prepare yourself for a career in freelancing.
  • Brand yourself or your business: how to create a brand that lasts a life time. You’ll learn the pitfalls in your way towards creating a killer brand
  • Interact with clients: you want to provide real value to your customers? Not sure how to brief them or how to approach your leads? You can gain valuable insights here.
  • Run your business: whether it’s writing the proposal, getting the right fee, or hiring folks to do a job for you, you are going to learn them all in this book.

118

If you are planning to start earning money from your skills, the time is now. Even if you are working, you should prepare yourself for the worst. There are not many stables jobs in these tough times, so don’t expose yourself to the risk of unemployment.

Download your copy here.

« Previous Entries

logo
Powered by Wordpress