Contact Us
Go to ...
Go to ...
Home
Category
Php
Jquery
Sql
WordPress
Laravel
CSS
Ajax
Bootstrap
Magento
Linux
AngularJs
Contact Us
Recent Posts
Fix specified key was too long issue in laravel
Install Swagger in Laravel 9
Print File From Api in Angular
Download File From Api in Anuglar
Get Server IP from PHP
Category Wordpress
Webservice with wordpress login
<?php require ("../wp-load.php"); if($_REQUEST['pass'] != "" && $_REQUEST['email'] != "") { $ar = wp_authenticate_username_password("", $_REQUEST['email'], $_REQUEST['pass']); $class_name = get_class ($ar); if ( $class_name == "WP_User" ) { $user_id = $ar->data->ID; $arr = array( "id" => $user_id, "email" => $ar->data->user_email, "name" => $ar->data->display_name, ); $ar = array ("result" => 0, "message" => $arr); echo json_encode($ar); exit(); } else { $ar = array ("result" => 0, "message" => "Email or Password is Wrong"); echo json_encode($ar); exit(); } } else { $ar = array ("result" => 0, "message" => "Require Field Missing"); echo json_encode($ar); exit(); } ?>
...
Posted in 
Wordpress
No comments
May 14, 2016
Read More
Custom user fields
insert code in function.php
Backend
<?php add_action( 'show_user_profile', 'extra_user_profile_fields' ); add_action( 'edit_user_profile', 'extra_user_profile_fields' );function extra_user_profile_fields( $user ) { ?> <h3><?php _e("Extra profile information", "blank"); ?></h3><table class="form-table"> <tr> <th><label for="address"><?php _e("Address"); ?></label></th> <td> <input type="text" name="address" id="address" value="<?php echo esc_attr( get_the_author_meta( 'address', $user->ID ) ); ?>" class="regular-text" /><br /> <span class="description"><?php _e("Please enter your address...
Posted in 
Php
,
Wordpress
No comments
February 22, 2016
Read More
Run php code in WP Page and Post
[hi_php] // Your code echo "Run Code!"; [/hi_php]
1
2
3
4
[
hi_php
]
// Your code
echo
"Run Code!"
;
[
/
hi_php
]
Download Plugin
Posted in 
Php
,
Wordpress
No comments
February 11, 2016
Read More
Create Theme Option in wordpress
Enter This Code in function.php
function theme_settings_page() { ?> <?php if( isset( $_GET[ 'tab' ] ) ) { $active_tab = $_GET[ 'tab' ]; } else { $active_tab = 'tab_one'; } ?> <div class="wrap"> <h1>Empire Theme</h1> <?php settings_errors(); ?> <h2 class="nav-tab-wrapper"> <a href="?page=theme-panel&tab=tab_one" class="nav-tab <?php echo $active_tab == 'tab_one' ? 'nav-tab-active' : ''; ?>">Home</a> <a href="?page=theme-panel&tab=tab_two" class="nav-tab <?php echo $active_tab == 'tab_two' ? 'nav-tab-active' : ''; ?>">Footer</a> <a href="?page=theme-panel&tab=tab_three" class="nav-tab <?php echo $active_tab == 'tab_three' ? 'nav-tab-active' : ''; ?>">Alerts</a> </h2> <?php if( $active_tab == 'tab_one' ) { ?> <form method="post" action="opti...
Posted in 
Wordpress
No comments
December 2, 2015
Read More
Tweet