Friday, 18 September 2015

A Stepwise Tutorial On Adding New Admin Menu With Custom Icon

If you're an avid WordPress fan then you'd have surely tried the offerings of this absolutely brilliant CMS(Content Management System). Backed by an intuitive user interface and built-in menus like Pages, Posts, Categories etc, WordPress has allowed users to perform several customizations for their website - be it WordPress theme customization, or customizing some specific sections of a WordPress site.

What does this tutorial look into?

Considering your familiarity with the significance of having a custom admin menu, I've written this tutorial which makes you familiar with the process of creating one along with a custom icon.

Creating a custom menu in WordPress Admin

Unlike the hassles associated with choosing the right plugin for creating a custom admin menu, you can easily opt for an alternative wherein you just need to write a simple piece of code. Just follow the two steps explained below:

Step 1- Register the new Admin menu using Action hook

The code associated with the same is:

add_action( 'admin_menu', 'register_my_custom_menu_page' );

In the above code, add_action is a WordPress hook which is used for registering the custom admin menu item. This action hook is registering the function called 'register_my_custom_menu_page function available under the admin_menu hook. Here, you need to consider an important thing that the custom admin menu should be activated using the add_action() call. Failure to do so will result into an error.

Step 2- Create a custom function for adding the custom admin menu in back-end(in addition to a custom icon)

Here's the code associated with this step:


function register_my_custom_menu_page()
{
add_menu_page( 'custom menu title', 'custom menu', 'manage_options', 'custompage', 'my_custom_menu_page','', plugins_url( 'myplugin/images/icon.png' ), 6);
}


The above function will call the 'add_menu_page function which will be adding the new custom admin menu in your WordPress theme. As is visible from the code snippet, the function 'add_menu_page is being passed seven parameters which have been explained below:

1. Page title- as the very first parameter, it is used for defining a suitable title for the page. To put in simple words, whenever a user clicks on the custom admin menu, the text specified here will be shown in the title tags of the page.

2. Menu title- this is the title for the custom menu and will be displayed in your site's admin area.

3. Capability- this is the parameter which specifies whether the user has the ability to display the custom menu or not.

4. Menu slag- as the fourth parameter, this is used for managing the URL of page.

5. Function- Although this is optional, you'll be required to add the menu page content here. Plus, 'my_custom_menu_page' is the function which allows you to produce the user list, specific roles as well as the profile edit link.

6. Icon URL- If you're inclined on embellishing your custom admin menu using icon, then this is a parameter you can't afford to skip. It will be passed for displaying a specific icon for the new custom admin menu. Here, you also need to pass the image path as a unique value. Well, you can choose from a variety of options that are available for adding an icon to the admin menu. Here are two of the most effective ones for you to choose from:

If you already have a custom image file, then simply use the function plugin_dir_url(_FILE_) for obtaining the plugin directory URL. After this, simply add the image filename to the respective URL.

I'm sure you must be aware of the Dashicons feature available with WordPress 3.8 version. Hence, you can simply choose from the wide collection of eye-catchy icons and opt for adding a suitable one by including a little markup and CSS.

7. Menu Position- As a yet another optional parameter, you can use it for managing the position of the custom admin menu. That means, you can choose to place the admin menu either towards the top or bottom of the admin page.

Here's how the final output will look like:





We're done!

Wrapping Up


With admin menu serving as an excellent tool for managing menus visible in the front-end, I'm sure the steps explained in the above tutorial would aid you in building one that's simple to use and highly effective. Moreover, by equipping the menu with your kind of icon, accessing the WordPress admin dashboard would become a completely exciting venture.  


Monday, 7 September 2015

Top Benefits of Converting PSD to WordPress Designs

Establishing a solid web presence is becoming more challenging because of the increasing competition in the web world. Every now and then, a new business website becomes apparent on the web presenting users with better online experiences. And so, it's imperative for your business to use tactics that can help you gain a competitive edge.

Of course, building a website provides opportunities to help you extend your reach to target audience. But, merely creating a site might not be enough to make your online venture a success. However, choosing services such as converting PSD To WorPress designs can help your business create an edge. Below are a few benefits that will make you understand about the significance of choosing to turn your PSD files to WordPress design:

Uniqueness and Better Reach


Needless to say, people like things that can offer them something different from the rest. Unlike, a pre-built theme that is used for creating many websites, choosing to convert your Photoshop design into a WordPress theme will help you come up with a unique website design.

The more unique and better your design will be, the more traffic it will be able to drive towards your site. This means that your business brand will reach to more users.

Flexibility to Customize Theme


Since the PSD file can be edited as per you need, allowing to add (and edit) design elements, you get the flexibility to customize your theme as you deem perfect. On the other hand, a pre-made theme often restricts from making changes to the theme.

Remember that your business is bound to grow, and so you will need to adjust your design according to your growing business needs. And, PSD to WordPress conversion can provide you the flexibility that help adjust your theme in-accord with your continuously changing needs.

You've Complete Control Over Your Theme


The markup conversion helps provide better control over how you want to make changes to your theme design and content. For instance, you can change how the elements appear on your site or the position of your content.

What's more? You can choose to integrate your PSD with any other CMS system of your choice in the future – be it Joomla, Drupal or any other CMS.

Clean and Semantic Code


PSD to WP conversion is usually done manually. Thus, your converted WordPress theme will contain clean and semantic code that helps search engine crawlers index the website pages quickly, increasing your chances of attaining better ranking in SERPs (search engine result pages).

Additionally, the code will be free from bugs and easy to understand for your users.

Summing Up


Regardless of the size of your online business, you need to make sure that your website is capable enough to deliver solutions as per your client wants and needs. And the best way to create such a site is to convert your Photoshop design to a WordPress themed-site. However, ascertain to hire a reputed web development company having good experience in delivering markup conversion services.