If custom post type post not open in single

/* Flush rewrite rules for custom post types. */
add_action( 'after_switch_theme', 'jeba_flush_rewrite_rules' );

/* Flush your rewrite rules */
function jeba_flush_rewrite_rules() {

Note: After add this function in your theme functions.php file active another default theme and reactive your current theme.

WooCommerce AJAX Cart update after add to cart clicking

// Handle cart in header fragment for ajax add to cart
add_filter('add_to_cart_fragments', 'header_add_to_cart_fragment');
function header_add_to_cart_fragment( $fragments ) {
	global $woocommerce;



	$fragments['a.cart-button'] = ob_get_clean();

	return $fragments;


function woocommerce_cart_link() {
	global $woocommerce;
	<a href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> <?php _e('in your shopping cart', 'woothemes'); ?>" class="cart-button ">
	<span class="label"><?php _e('My Basket:', 'woothemes'); ?></span>
	<?php echo $woocommerce->cart->get_cart_total();  ?>
	<span class="items"><?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count); ?></span>

How to load javascript on custom page template?

function Load_Template_Scripts_wpa83855(){
    if ( is_page_template('template-scrollcontent.php') ) {
        wp_enqueue_script('my-script', '/wp-content/themes/theme_name/js/shadowbox/shadowbox.js');
       wp_enqueue_script('my-scripts', '/wp-content/themes/theme_name/js/jquery.tools.minc619.js');

Or Load JavaScript only on specific WordPress pages

//Register hook to load scripts
add_action('wp_enqueue_scripts', 'my_theme_load_scripts');

//Load scripts (and/or styles)
function my_theme_load_scripts(){
   wp_enqueue_script('my_first_script', get_template_directory_uri() . '/includes/js/my_first_script.js');
   wp_enqueue_script('my_second_script', get_template_directory_uri() . '/includes/js/my_second_script.js');

   if(is_page()){ //Check if we are viewing a page
	global $wp_query;

        //Check which template is assigned to current page we are looking at
        $template_name = get_post_meta( $wp_query-&gt;post-&gt;ID, '_wp_page_template', true );
	if($template_name == 'slider-portfolio.php'){
           //If page is using slider portfolio template then load our slider script
	   wp_enqueue_script('my_third_script', get_template_directory_uri() .'/includes/js/my_third_script.js');