Ajax Search Form

jQuery(document).ready(function() {jQuery jQuery('#schoolword').on('input', function() { var searchKeyword = jQuery(this).val(); var searchType = jQuery('#searchby').val(); if (searchKeyword.length >= 3) { jQuery.post('/includes/schoolsearch-ajax.php', { keywords: searchKeyword,searchtype: searchType }, function(data) { jQuery('ul#schoollist').empty() jQuery.each(data, function() {jQuery('ul#schoollist').append('<li>//<a href="//'+this.link+'">' + this.t//itle + '</a></li//>');   '); }); }, 'json'); } }); }); Search Form " value="" name="s" /> ajax-search.php <?php require_once('../../../wp-load.php'); global $wpdb; if... Continue Reading →

Woocommerce Category Image show

add_action( 'woocommerce_archive_description', 'woocommerce_category_image', 2 ); function woocommerce_category_image() { if ( is_product_category() ){ global $wp_query; $cat = $wp_query->get_queried_object(); $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true ); $image = wp_get_attachment_url( $thumbnail_id ); if ( $image ) { echo '////////</div>'; } } } function category_has_children() { if ( is_product_category() ){ global $wp_query; $cat = $wp_query->get_queried_object(); $children = get_categories( array(... Continue Reading →

Woocommerce Product Thumbanail size

function wptt_single_image_size( $size ){ $size['width'] = '360'; $size['height'] = '412'; return $size; } // wptt_single_image_size add_filter( 'woocommerce_get_image_size_shop_single', 'wptt_single_image_size' ); remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15);

Woocommerce Add New Hook With Function

function my_title_wrapper_start() { echo '<section class="mdlcontaner"> '; } function my_title_wrapper_end() { echo '</section>'; } add_action('woocommerce_before_main_content', 'my_title_wrapper_start', 10); add_action('woocommerce_after_main_content', 'my_title_wrapper_end', 10);

jQuery-php-ajax Calling

jQuery(document).ready(function(){ jQuery('#pfilter li').css('cursor', 'pointer'); jQuery("#pfilter li").click(function(){ jQuery('#spinner').show(); jQuery('#spinner').html('/images/oudarya2.GIF" alt="Loading..."/>'); var slug = jQuery(this).attr('id'); jQuery.ajax({ url: "/filter-product.php", type: 'POST', data: 'slg=' +slug, success: function(data) { jQuery('#spinner').hide(); jQuery("#prd").html(data); } }); }); }); In HTML : <?php $level = get_queried_object()->term_id; //echo $level; $parent_id = $level; $termchildren = get_terms('product_cat',array('child_of' => $parent_id)); echo '<ul id="pfilter" class="sidemenu">'; foreach($termchildren as $sub_category) {... Continue Reading →

Edit wordpress post section

add_action( 'init', 'my_custom_init' ); function my_custom_init() { remove_post_type_support( 'post', 'editor' ); } add_action( 'init', 'my_remove_post_type_support', 10 ); function my_remove_post_type_support() { remove_post_type_support( 'post', 'post-formats' ); } add_action( 'init', 'my_remove_post_type_thumbnail', 10 ); function my_remove_post_type_thumbnail() { remove_post_type_support( 'post', 'thumbnail' ); } function wpb_change_title_text_post( $title ){ $screen = get_current_screen(); if ( 'post' == $screen->post_type ) { $title = 'Enter... Continue Reading →

Add Admin Footer Text

In functions.php // Flush rewrite rules for custom post types on theme activation add_action( 'after_switch_theme', 'wpex_flush_rewrite_rules' ); function wpex_flush_rewrite_rules() { flush_rewrite_rules(); } add_filter('admin_footer_text', 'left_admin_footer_text_output'); //left side function left_admin_footer_text_output($text) { $text = 'Would You Love me - For this Beautiful Theme?'; return $text; } add_filter('update_footer', 'right_admin_footer_text_output', 11); //right side function right_admin_footer_text_output($text) { $text = 'Proudly Developed... Continue Reading →

Addding Custom Widget To Dashboard

In functions.php /*Adding Custom Widgets to Your Dashboard*/ function wpc_dashboard_widget_function() { // Entering the text between the quotes echo "<ul> <li>Release Date: September 2015</li> <li>Author: Oudaryamay Burai</li> </ul>"; } function wpc_add_dashboard_widgets() { wp_add_dashboard_widget('wp_dashboard_widget', 'Developer information', 'wpc_dashboard_widget_function'); } add_action('wp_dashboard_setup', 'wpc_add_dashboard_widgets' );

Blog at WordPress.com.

Up ↑

%d bloggers like this: