Create custom meta fields using Custom Field Suite plugin

In wordpress we can Create custom meta fields using Custom Field Suite wordpress plugin. wordpress supports custom post type and meta fields in the CMS. Now wordpress supports the custom post type and custom meta fields in the CMS. custom meta field is great feature in wordpress. We can use the meta fields for multiple custom purpose. I am using meta fields in many projects for achieving the custom user requirements.

Custom meta fields are used for add the custom data with specific posts and pages. We can attach any type of data through meta fields. It is very useful feature of wordpress. Custom Field Suite is great wordpress plugin which, makes really simple for you to create custom meta boxes visually for you posts, pages or any custom post types.

custom-meta-box1

It is a wonderful free plugin and have great documentation for you to get start. You can easily create text, text area, wysiwyg, color, select, file upload, user, relationship and loops using visual UI and with minimal code you could display the values in your theme.

Create custom meta fields using Custom Field Suite plugin

The placement rules help you to define, in which scenarios you want to display the custom meta boxes in each content type. You can choose from post type, user roles, exact post or taxonomy terms.

custom-meta-box2 Create custom meta fields
Create custom meta fields

The plugin also have an export and import feature, so it is easy for developers to move from development box to actual server.

URL : http://wordpress.org/extend/plugins/custom-field-suite/
Home : http://uproot.us
Documentation : http://uproot.us/custom-field-suite/documentation/

How to create custom shortcode for wordpress site

There are many wordpress plugins which using the shortcode. But you easily create custom shortcode for wordpress site. there is no need of external plugin.

custom shortcode for wordpress

Since Version 2.5 WordPress support so called Shortcodes. They have been introduced for creating macros to be use in a posts content. Many people looking for how to create the shortcode in wordpress using theme. It is very easy to build shortcode in wordpress. I given very simple code sample for creating the custom shortcode.

For more information visit following page.

For creating the custom shortcodes you need add following method in functions.php file which is located in your theme folder.


function myshortcode(){
 return '<img src="http://images.purabtech.in/How-to-make-empty-the-wordpress-trash-automatically.png">';
}
add_shortcode('myshortcode', 'myshortcode');

custom shortcode for wordpress
custom shortcode for wordpress

you can change the return text or shortcode name aslo.

Display the authors in dropdown menu using wp_dropdown_users – Hook/Filter

One of my client faced issue with Autor drop down which is in Admin section.

Display the authors in dropdown menu using hooks.

While creating the New post there was problem with the Author field. There are hundreds of irrelevant selections (users) and it’s difficult to select the right one.

WordPress is by default showing all the users in author drop down. I don’t want to show the other users in author drop down.

Display the authors in a dropdown menu
Hook/Filter – In wordpress Admin -Add new Post section -Display the authors in a dropdown menu using wp_dropdown_users One of my client faced issue with Autor drop down which is in Admin section. Display the authors in a dropdown menu using hooks

I searched for wp_dropdown_users hook or filter. But I did not found any proper solution.

Following articles are found helpful to me.
http://wordpress.org/support/topic/filter-for-post-quick-edit-author-drop-down
http://codex.wordpress.org/Function_Reference/wp_dropdown_users

Using that code I modified the code and I am able to fix the issue. You can put following code in to functions.php file.

 /*
 * Hook for showing Admin and Author in Add new Post - Admin section dropdown menu
 */
function wpapi_override_wp_dropdown_users($output) {
    global $post, $user_ID;
    //get the Admin-role users IDs
    $admins = getUsersWithRole('admin');
    //get the author-role users IDs
    $authors = getUsersWithRole('author');
    //merge the array
    $result = array_merge($admins, $authors);

    //array converted into comma seprated string
    $authorsall = implode(",", $result);

    // return if this isn't the theme author override dropdown
    if (!preg_match('/post_author_override/', $output))
        return $output;

    // return if we've already replaced the list (end recursion)
    if (preg_match('/post_author_override_replaced/', $output))
        return $output;

    // replacement call to wp_dropdown_users
    $output = wp_dropdown_users(array(
        'echo' => 0,
        'name' => 'post_author_override_replaced',
        'selected' => empty($post->ID) ? $user_ID : $post->post_author,
        'include_selected' => true,
        'include' => $authorsall
    ));

    // put the original name back
    $output = preg_replace('/post_author_override_replaced/', 'post_author_override', $output);

    return $output;
}

add_filter('wp_dropdown_users', 'wpapi_override_wp_dropdown_users');

/*
 * Find User IDs by Role
 */

function getUsersWithRole($role) {
    $wp_user_search = new WP_User_Search($usersearch, $userspage, $role);
    return $wp_user_search->get_results();
}

Using above code, you can load multiple role users in author drop down.

use animated smileys and emoticons in wordpress post

Smiles and emoticons are always important show your expressions in short way. Earlier also I posted articles about same. Here is link about that. here in this article written about animated smileys. I given very detailed information to use animated smileys and emoticons in wordpress. animated smilyes and emotions are used everywhere now in mobile device.

use animated smileys and emoticons in wordpress

By default wordpress supports some basic emoticons. Here I can suggest some very cool wordpress plugins.

Kaskus Emoticons

Kaskus Emoticons is an emoticon set inspired by Kaskus, the Largest Indonesian Community – consisting of over a million active members from all over the world. The images which are used in this plugin are copyright of Kaskus

Speedy Smilies

Speedy Smilies takes emoticons in WordPress to the next level (where it should be already and hopefully one day will). The end goal is to make smilies load faster in the browser for visitors and make them easy to insert into posts/pages for authors. In addition to the speed benefits, Speedy Smilies allows authors to easily change the appearance of emoticons using smiley sets.

Speedy Smilies is free software licensed under the GNU GPL version 3.

Tango Smileys Extended

Tango Smileys Extended (TSE) disables the built-in WordPress smileys and extends the number of available smileys from 18 to 202. The extended smileys can be input using standard emoticon shorthand, or through the CTI (Click to Insert) interface. Smileys in comments is supported and may be inserted using the standard emoticon shorthand or through the CTI interface. MCEComments is also supported.

This version of Tango Smileys Extended is for WordPress 2.8+
WordPress versions pre-2.8 are no longer supported. If you are using WordPress 2.7.x, please use Tango Smileys Extended 2.5.4.1. WordPress 2.6.x and earlier are only supported in versions of Tango Smileys Extended older than, and including, 2.5.2.8.

Moods Addon for Ultimate TinyMCE

This plugin is designed to be used as an add-on to my Ultimate TinyMCE plugin. However, it can also be used as a stand-alone plugin as well.

For best results; You can download Ultimate TinyMCE here:
http://wordpress.org/extend/plugins/ultimate-tinymce/

This addon will add a button to your visual tinymce editor for posts/pages. Clicking the button will open a popup window with over 50 professionally animated .gif smiley’s.

You can insert these smiley’s into your post/page content areas. Simply click a smiley, and it is automatically inserted into your content area.

Font Emoticons

Replaces WordPress’ smileys (based on images) with font-based emoticons (see screenshots). Font-based emoticons have some advantages:

  • They have the same size as the surrounding text. No more distorting the heights of lines containing smileys/emoticons. They always fit the font size.
  • They have the same color as the surrounding text.

The following emoticons are supported:

  • :) :-) :smile:
  • :( :-( :sad:
  • ;) ;-) :wink:
  • :P :-P :razz:
  • -.- -_- :sleep:
  • :thumbs: :thumbsup:
  • :devil: :twisted:
  • :o :-o :eek:
  • 8O 8o 8-O 8-o :shock: (No real icon for “shock” yet. Using “eek” instead.)
  • :coffee:
  • 8) 8-) B) B-) :cool:
  • :/ :-/
  • :beer:
  • :D :-D :grin:
  • x( x-( X( X-( :angry:
  • :x :-x :mad: (No real icon from “mad” yet. Using “angry” instead.)
  • O:) 0:) o:) O:-) 0:-) o:-) :saint:
  • :'( :'-( :cry:
  • :shoot:
  • ^^ ^_^ :lol:

Notes: * Emoticons must be surrounded with spaces (or other white space characters); e.g. the emoticon in that:)smile won’t be replaced * Emoticons won’t be replaced in HTML tags nor in <pre> or <code> blocks.

wp-Monalisa

wp-monalisa is the plugin that smiles at you like monalisa does. place the smilies of your choice in posts, pages or comments.

There are a lot plugins for smiley support out there and some of them are really useful. Most of them don’t work out of the box and this is what wp-monalisa tries to achieve, giving you the ability to maintain your smilies and even turn them into img tags.

it’s easy and it smiles at you…what else do you want?

Features:

  • maintain your smilies in a separate directory
  • activate or deactivate smilies for posts or comments
  • replace smilies with img tags
  • extend or replace wordpress smiley replacement
  • while edit posts or pages, pops-up in a draggable meta-box
  • extends your comment form to give you visitors the freedom to smile 🙂
  • support for fckeditor (tested with v3.3.1)
  • fully integrated ith BuddyPress
use animated smileys and emoticons in wordpress post
use animated smileys and emoticons in wordpress post

create links template page in wordpress theme

From 3rd version wordpress introduced links template. Links is same important like archive page. code snippet for create links template page in wordpress.

create links template page in wordpress

Links template page concept is new in wordpress theme. From wordpress 3 version wordpress introduced the links.php template file in wordpress themes. Adding the links page to your wordpress site or blog is very good for seo.Links page is same important like archive page.

create links template page in wordpress
create links template page in wordpress

You can add your friends and good websites in links page. You should use the links page very carefully because this page is very important for SEO. Google and other search engine is always look for links page where you can put other network or friends sites.

How to create links template page

Note: If you are wordpress developer then only use following code.

You need to create the links.php file in your wordpress theme folder. and put following code in that file.


<?php
/*
Template Name: Links
*/
?>
<?php get_header(); ?>

 <section id="primary">
 <div id="content" role="main">

<div id="archives">

<?php the_post(); ?>
 <h1><?php the_title(); ?></h1>
 <h2>Friends Network </h2>
 <ul>
<?php wp_list_bookmarks('title_li=&categorize=0'); ?>

</ul>

</div>
 </div><!-- #content -->
 </section><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

After that go to your wordpress admin panel and create the links.php with links page template.

create links template page in wordpress
create links template page in wordpress

Publish links page and add the links page in to your menu.

Here are some links which are helpful to you.

create contact us template page in wordpress

If you link this article then please add my site in your links page or blogroll. If you are having any issues or question about links template then please write to me on support@purabtech.in.