Posts

Showing posts from August, 2016

Change the height of the Revolution Slider in wordpress

Please add this code in Customize -> Custom -> CSS:

.rev_slider_wrapper, .rev_slider, .tp-fullwidth-forcer, .rev_slider .tp-bgimg.defaultimg {
    max-height: 400px !important;

}

Hope it helps.

Get category id for category.php page in wordpress

You can simply use: $cur_cat_id = get_cat_id( single_cat_title("",false) );

Get post data by id using AJAX in wordpress

Add below code on your theme's function.php

add_action('wp_ajax_nopriv_ajax_request','ajax_handle_request'); add_action('wp_ajax_ajax_request','ajax_handle_request');function ajax_handle_request(){ $postID = $_POST['id'];if(isset($_POST['id'])){ $post_id = $_POST['id'];}else{ $post_id ="";}global $post; $post = get_post($postID); $response = array('sucess'=>true,'post'=> $post,'id'=> $postID

Featured image option not displaying in wordpress admin panel

Add this code to the functions.php file of your theme: // This theme uses post thumbnails add_theme_support('post-thumbnails');If you getting this type of issue again please goto wp-admin->add new post-> screen options. At the top of your page you see this screen option open it and check the value featured image if not checked. Now you see the option of featured image in your post page admin side.