How to display post by category on page in wordpress

Query to display post by category using Joins.

<?php
global $wpdb, $post;

  $slug = get_post( $post )->post_name;

    $query = "SELECT * FROM wp_posts p LEFT OUTER JOIN wp_term_relationships r ON r.object_id = p.ID LEFT OUTER JOIN wp_term_taxonomy x ON x.term_taxonomy_id = r.term_taxonomy_id LEFT OUTER JOIN wp_terms t ON t.term_id = x.term_id WHERE p.post_status = 'publish' AND p.post_type = 'post' AND t.slug = '$slug' order by ID Desc limit 8";
?>

How to add and delete div using j query


1. Copy this script in Head section

2. Copy This code in body Section.
Other costs (name them)
Add itemMinus item

How To Integrate google translator In any site


1. Copy this Code in section


2. Copy this Code in section
   

Google Translate

Note :- Set dive style according to your choice thanks.

How to hide a dive on url change using jQuery

Example of using this method

Enjoy.....!

How to redirect login user on desire page in wordpress


Copy this and paste this code in functions.php
<?php
add_filter('login_redirect', '_catch_login_error', 10, 3);
function _catch_login_error($redir1, $redir2, $wperr_user)
{
    if(!is_wp_error($wperr_user) || !$wperr_user->get_error_code()) return $redir1;

    switch($wperr_user->get_error_code())

    {
        case 'incorrect_password':

        case 'empty_password':

        case 'invalid_username':

        default:
     wp_redirect(site_url().'/home-page/?error='.$wperr_user->get_error_code());
    }
    return $redir1;
}
?>