Custom post list ( Member ) with pagination

<?php 
/* 
Template Name: View All Members 
*/ 
?>
<?php get_header(); ?>

<?php $big = 999999999;
$args = array(
'post_type' => 'wp_member',
'country' => $country,
'meta_query' => $meta_query,
'posts_per_page' => '8',
'paged' => $paged
);

$wp_query = new WP_Query( $args );
while ( have_posts() ) : the_post(); 
// Code
endwhile;

<?php echo paginate_links( array('base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),'format' => '?paged=%#%','current' => max( 1, get_query_var('paged') ),'total' => $wp_query->max_num_pages) ); ?>

<?php get_footer(); ?>

 

Add Post Meta Box In Admin

/*-------------- Called Post Meta -----------------*/
function meta_box_part()
{
    add_meta_box("meta-box-section", "Section List", "custom_meta_box_markup_section", "your-post-type", "side", "high", null);
}
add_action("add_meta_boxes", "meta_box_part");

/*-------------- Add Post Meta -----------------*/
function custom_meta_box_markup_section($object)
{
    // code goes here...
    
}

/*-------------- Save Post Meta -----------------*/
function save_custom_meta_box($post_id, $post, $update){
     if (!isset($_POST["meta-box-nonce"]) || !wp_verify_nonce($_POST["meta-box-nonce"], basename(__FILE__)))
        return $post_id;

     if(!current_user_can("edit_post", $post_id))
        return $post_id;

     if(defined("DOING_AUTOSAVE") && DOING_AUTOSAVE)
        return $post_id;

     $meta_box_value = "";
     if(isset($_POST["custom_input"])){
	$meta_box_value = $_POST["custom_input"];
     }  else{
	$meta_box_value = '';
     } 
     update_post_meta($post_id, "custom_meta_name", $meta_box_value);
}
add_action("save_post", "save_custom_meta_box", 10, 3);

HAPPY NEW YEAR 2016

Best enjoyed with family and friends. Spread the New Year spirit and share the joy and happiness. Hope this New Year brings to you a magical touch of various treats and pampers you with several surprise presents. Enjoy and don’t miss this opportunity of sending warm wishes to your near and dear ones. Happy New Year 2015 to everyone out there and cheers! Friends if are searching for Funny 2015 Happy New Year

happy-new-years-eve-2016-images

Merry Christmas

Merry-Christmas-Wish-22

MERRY CHRISTMAS WISHES:

The month of Christmas has already come. People are counting on weeks, days, hours, minutes, and seconds to the day of Christmas Eve. Christmas is a season of giving where the people come out and give their heartful to the poor. It is the day to forgive. It is the day to forget all the sore things and start a new life with new hopes and wishes. Christmas is about keeping Jesus in the heart for the entire year and doing good deeds all the time. On the day of Christmas with the bells ringing and people singing it would be a delight to watch. People come together in Joyce and praise the lord for the beautiful life he presented us with. With loads of love towards Jesus people come and deliver their lovable prayers to him.

Create New Pluging


/**
 * Plugin Name: Ceremony Entry
 * Plugin URI: 
 * Description: FormEntry Plugin.
 * Version: The Plugin's Version Number, e.g.: 1.0
 * Author: 
 * Author URI: 
 * License: A "Slug" license name e.g. GPL2
 */

session_start();
add_action( 'admin_menu', 'ceremony_entry' );

function ceremony_entry() {
	add_menu_page('Ceremony Entry', 'Ceremony Entry', 'manage_options', 'my-top-level-handle', 'back_entry');
	add_submenu_page('', 'Edit Entry', 'Edit Entry', 'manage_options', 'edit-entry', 'edit_entry');
	add_submenu_page('', 'View Entry', 'View Entry', 'manage_options', 'view-entry', 'view_entry');
	add_submenu_page('', 'Delete Entry', 'Delete Entry', 'manage_options', 'delete-entry', 'delete_entry');
}
require_once(ABSPATH . WPINC . '/registration.php');
global $wpdb, $user_ID;
function edit_entry() {
// Code
}

function view_entry() {
// Code
}

function delete_entry() { 
// Code
}

function back_entry() {
// Code
}

How to create new plugin in Wp ?

Tags

/**
 * Plugin Name: 
 * Plugin URI: 
 * Description: 
 * Version: 
 * Author: 
 * Author URI: 
 * License: A "Slug" license name e.g. GPL2
 */

add_action( 'admin_menu', 'front_register' );

function front_register() {
	add_menu_page('FrontRegister', 'FrontRegister', 'manage_options', 'my-top-level-handle', 'back_register');
}

require_once(ABSPATH . WPINC . '/registration.php');
global $wpdb, $user_ID;

$result = mysql_query('ALTER TABLE wp_users ADD	user_lastname VARCHAR(60) AFTER user_login;');
$result = mysql_query('ALTER TABLE wp_users ADD user_address VARCHAR(250) AFTER display_name;');
$result = mysql_query('ALTER TABLE wp_users ADD	user_city VARCHAR(60) AFTER user_address;');
$result = mysql_query('ALTER TABLE wp_users ADD user_state VARCHAR(60) AFTER user_city;');
$result = mysql_query('ALTER TABLE wp_users ADD user_zip VARCHAR(60) AFTER user_state;');
$result = mysql_query('ALTER TABLE wp_users ADD	user_phone VARCHAR(60) AFTER user_zip;');
$result = mysql_query('ALTER TABLE wp_users ADD	user_category VARCHAR(60) AFTER user_phone;');

function back_register() {
	echo "hy";
}

function font_register() {
/*  Front Code Type Here */
}

add_shortcode( 'FrontRegister', 'font_register' );

// Shortcode [FrontRegister] 

Janmashtami 2015

Tags

Happy-Janmashtami-Quotes

Janmashtami is the festival Hindu love and celebrate with great devotion and enthusiasm in India.The birthday of Lord Krishna was born in a prison in the custody of Kansa. Vasudev, His father immediately thought of his friend Nand and decided to hand over his child to him to save Krishna from the clutch of Kansa. Krishna grew up in Gokul and finally killed his uncle, King Kansa.All over India this day is celebrated with devotional songs and dances, pujas, arti, blowing of the Conch and rocking the cradle of baby Sri Krishna.The Janmashtami celebration of Mathura and Vrindavan, the places where Sri Krishna had spent his life, are very special.

HAPPY NEW YEAR 2015

Tags

best enjoyed with family and friends. Spread the New Year spirit and share the joy and happiness. Hope this New Year brings to you a magical touch of various treats and pampers you with several surprise presents. Enjoy and don’t miss this opportunity of sending warm wishes to your near and dear ones. Happy New Year 2015 to everyone out there and cheers! Friends if are searching for Funny 2015 Happy New Year

happynewyear-2-gif