Loading scripts to the Post Edit page only

We can improve a little bit with : function specific_enqueue($hook_suffix) { if( ‘post.php’ == $hook_suffix || ‘post-new.php’ == $hook_suffix ) { wp_enqueue_script( ‘custom_js’, get_template_directory_uri() . ‘/inc/meta/custom.js’, array( ‘jquery’ )); wp_enqueue_style( ‘custom_css’, get_template_directory_uri() . ‘/inc/meta/custom.css’) } } add_action( ‘admin_enqueue_scripts’, ‘specific_enqueue’ );

Include woocommerce custom field value in front-end search result

You have to modify WooCommerce search query. Hook into this action: do_action( ‘woocommerce_product_query’, $query, $instance ); Detect if it is a search query Add your _subtitle meta Something like this (not tested): if ( $query->is_search ) { $query->set(‘meta_query’, array( array( ‘key’ => ‘_subtitle’, ‘value’ => $query->query_vars[‘s’], ‘compare’ => ‘LIKE’ ) )); };

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)