// Add custom Theme Functions here // function devvn_remove_slug( $post_link, $post ) { if ( !in_array( get_post_type($post), array( 'product' ) ) || 'publish' != $post->post_status ) { return $post_link; } if('product' == $post->post_type){ $post_link = str_replace( '/san-pham/', '/', $post_link ); //Thay cua-hang bằng slug hiện tại của bạn }else{ $post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link ); } return $post_link; } add_filter( 'post_type_link', 'devvn_remove_slug', 10, 2 ); /*Sửa lỗi 404 sau khi đã remove slug product hoặc cua-hang*/ function devvn_woo_product_rewrite_rules($flash = false) { global $wp_post_types, $wpdb; $siteLink = esc_url(home_url('/')); foreach ($wp_post_types as $type=>$custom_post) { if($type == 'product'){ if ($custom_post->_builtin == false) { $querystr = "SELECT {$wpdb->posts}.post_name, {$wpdb->posts}.ID FROM {$wpdb->posts} WHERE {$wpdb->posts}.post_status = 'publish' AND {$wpdb->posts}.post_type = '{$type}'"; $posts = $wpdb->get_results($querystr, OBJECT); foreach ($posts as $post) { $current_slug = get_permalink($post->ID); $base_product = str_replace($siteLink,'',$current_slug); add_rewrite_rule($base_product.'?$', "index.php?{$custom_post->query_var}={$post->post_name}", 'top'); add_rewrite_rule($base_product.'comment-page-([0-9]{1,})/?$', 'index.php?'.$custom_post->query_var.'='.$post->post_name.'&cpage=$matches[1]', 'top'); add_rewrite_rule($base_product.'(?:feed/)?(feed|rdf|rss|rss2|atom)/?$', 'index.php?'.$custom_post->query_var.'='.$post->post_name.'&feed=$matches[1]','top'); } } } } if ($flash == true) flush_rewrite_rules(false); } add_action('init', 'devvn_woo_product_rewrite_rules'); /*Fix lỗi khi tạo sản phẩm mới bị 404*/ function devvn_woo_new_product_post_save($post_id){ global $wp_post_types; $post_type = get_post_type($post_id); foreach ($wp_post_types as $type=>$custom_post) { if ($custom_post->_builtin == false && $type == $post_type) { devvn_woo_product_rewrite_rules(true); } } } add_action('wp_insert_post', 'devvn_woo_new_product_post_save'); function devvn_custom_woocommerce_structured_data_product ($data) { global $product; $data['brand'] = $product->get_attribute('pa_sachifoods') ? $product->get_attribute('pa_sachifoods') : null; $data['mpn'] = $product->get_sku() ? $product->get_sku() : null; $data['id'] = $product->get_id() ? $product->get_id() : null; return $data; } add_filter( 'woocommerce_structured_data_product', 'devvn_custom_woocommerce_structured_data_product' ); /* * Remove product-category in URL * Thay product-category bằng slug hiện tại của bạn. Mặc định là product-category */ add_filter( 'term_link', 'devvn_product_cat_permalink', 10, 3 ); function devvn_product_cat_permalink( $url, $term, $taxonomy ){ switch ($taxonomy): case 'product_cat': $taxonomy_slug = 'danh-muc'; //Thay bằng slug hiện tại của bạn. Mặc định là product-category if(strpos($url, $taxonomy_slug) === FALSE) break; $url = str_replace('/' . $taxonomy_slug, '', $url); break; endswitch; return $url; } // Add our custom product cat rewrite rules function devvn_product_category_rewrite_rules($flash = false) { $terms = get_terms( array( 'taxonomy' => 'product_cat', 'post_type' => 'product', 'hide_empty' => false, )); if($terms && !is_wp_error($terms)){ $siteurl = esc_url(home_url('/')); foreach ($terms as $term){ $term_slug = $term->slug; $baseterm = str_replace($siteurl,'',get_term_link($term->term_id,'product_cat')); add_rewrite_rule($baseterm.'?$','index.php?product_cat='.$term_slug,'top'); add_rewrite_rule($baseterm.'page/([0-9]{1,})/?$', 'index.php?product_cat='.$term_slug.'&paged=$matches[1]','top'); add_rewrite_rule($baseterm.'(?:feed/)?(feed|rdf|rss|rss2|atom)/?$', 'index.php?product_cat='.$term_slug.'&feed=$matches[1]','top'); } } if ($flash == true) flush_rewrite_rules(false); } add_action('init', 'devvn_product_category_rewrite_rules'); /*Sửa lỗi khi tạo mới taxomony bị 404*/ add_action( 'create_term', 'devvn_new_product_cat_edit_success', 10, 2 ); function devvn_new_product_cat_edit_success( $term_id, $taxonomy ) { devvn_product_category_rewrite_rules(true); } add_filter( 'add_to_cart_text', 'woo_custom_cart_button_text' ); // < 2.1 add_filter( 'woocommerce_product_add_to_cart_text', 'woo_custom_cart_button_text' ); // 2.1 + function woo_custom_cart_button_text() { return __( 'Xem chi tiết', 'woocommerce' ); }{"id":7725,"date":"2022-09-24T09:22:53","date_gmt":"2022-09-24T02:22:53","guid":{"rendered":"https:\/\/banhtrangsachi.com\/?p=7725"},"modified":"2022-09-24T09:22:53","modified_gmt":"2022-09-24T02:22:53","slug":"lam-banh-trang-chien","status":"publish","type":"post","link":"https:\/\/banhtrangsachi.com\/am-thuc\/lam-banh-trang-chien\/","title":{"rendered":"2 c\u00e1ch l\u00e0m b\u00e1nh tr\u00e1ng chi\u00ean m\u1edbi l\u1ea1 h\u1ea5p d\u1eabn t\u1ea1i nh\u00e0"},"content":{"rendered":"
B\u00e1nh tr\u00e1ng<\/a><\/strong> chi\u00ean v\u1edbi h\u01b0\u01a1ng v\u1ecb th\u01a1m ngon kh\u00f4ng l\u1eabn v\u00e0o \u0111\u00e2u \u0111\u01b0\u1ee3c nh\u1edd v\u1ecb gi\u00f2n ngon, b\u00e9o ng\u1eady k\u1ebft h\u1ee3p c\u00f9ng ph\u1ea7n nh\u00e2n \u0111\u1eadm \u0111\u00e0, th\u01a1m n\u1ee9c m\u0169i, khi\u1ebfn ai c\u0169ng ph\u1ea3i xu\u00fdt xoa khi n\u1ebfm th\u1eed n\u00f3. C\u00f2n g\u00ec tuy\u1ec7t v\u1eddi h\u01a1n khi nay m\u00f3n b\u00e1nh tr\u00e1ng<\/a><\/strong> n\u00e0y c\u00f3 th\u1ec3 d\u1ec5 d\u00e0ng xu\u1ea5t hi\u1ec7n trong gian b\u1ebfp nh\u00e0 b\u1ea1n v\u1edbi c\u00e1ch l\u00e0m \u0111\u01a1n gi\u1ea3n ngay sau \u0111\u00e2y c\u00f9ng Sachi<\/a><\/strong> xem v\u00e0 th\u1eed l\u00e0m nh\u00e9!<\/p>\n 1. S\u01a1 ch\u1ebf c\u00e1c nguy\u00ean li\u1ec7u<\/span><\/p>\n X\u00fac x\u00edch sau khi mua v\u1ec1, b\u1ea1n b\u1ecf v\u1ecf, c\u1eaft theo chi\u1ec1u d\u1ecdc chia l\u00e0m 4 ph\u1ea7n.<\/p>\n H\u00e0nh l\u00e1 b\u1ea1n c\u1eaft b\u1ecf g\u1ed1c, lo\u1ea1i b\u1ecf l\u00e1 \u00faa, c\u1eaft nh\u1ecf ph\u1ea7n l\u00e1 kh\u00f4ng s\u1eed d\u1ee5ng ph\u1ea7n c\u1ecdng.<\/p>\n 2. Cu\u1ed1n b\u00e1nh tr\u00e1ng<\/a><\/strong><\/span><\/p>\n B\u1ea1n \u0111\u1eb7t mi\u1ebfng b\u00e1nh tr\u00e1ng<\/a><\/strong> l\u00ean th\u1edbt, d\u00f9ng 1 \u00edt n\u01b0\u1edbc thoa \u0111\u1ec1u l\u00ean m\u1eb7t cho b\u00e1nh tr\u00e1ng<\/a><\/strong> m\u1ec1m.<\/p>\n B\u1ea1n d\u00f9ng mu\u1ed7ng c\u00e0 ph\u00ea tr\u00e1ng m\u1ecfng l\u1edbp b\u01a1 l\u00ean b\u00e1nh tr\u00e1ng<\/a><\/strong>, th\u00eam 1 mu\u1ed7ng c\u00e0 ph\u00ea h\u00e0nh l\u00e1, 1 mu\u1ed7ng c\u00e0 ph\u00ea ru\u1ed1c t\u1ea9m v\u00e0 \u0111\u1eadp 1 qu\u1ea3 tr\u1ee9ng c\u00fat v\u00e0o.<\/p>\n Tr\u1ed9n \u0111\u1ec1u h\u1ed7n h\u1ee3p 1 c\u00e1ch nh\u1eb9 nh\u00e0ng r\u1ed3i d\u00f9ng m\u1eb7t l\u00f2i c\u1ee7a mu\u1ed7ng c\u00e0 ph\u00ea tr\u00e1ng \u0111\u1ec1u h\u1ed7n h\u1ee3p ra b\u00e1nh tr\u00e1ng<\/a><\/strong>.<\/p>\n B\u1ea1n \u0111\u1eb7t 2 mi\u1ebfng x\u00fac x\u00edch l\u00ean sau \u0111\u00f3 cu\u1ed9n tr\u00f2n r\u1ed3i \u0111\u1eb7t ra d\u0129a.<\/p>\n 3. Chi\u00ean b\u00e1nh tr\u00e1ng<\/a><\/strong><\/span><\/p>\n B\u1eafc ch\u1ea3o l\u00ean b\u1ebfp, \u0111un n\u00f3ng 200ml d\u1ea7u \u0103n, d\u1ea7u s\u00f4i b\u1ea1n cho t\u1eebng cu\u1ed1n b\u00e1nh tr\u00e1ng<\/a><\/strong> v\u00e0o chi\u00ean.<\/p>\n Chi\u00ean trong 10 ph\u00fat v\u1edbi l\u1eeda v\u1eeba, b\u1ea1n tr\u1edf b\u1ec1 li\u00ean t\u1ee5c \u0111\u1ebf kh\u00f4ng \u0111\u1ec3 kh\u00e9t b\u00e1nh tr\u00e1ng<\/a><\/strong>.<\/p>\n Khi th\u1ea5y b\u00e1nh \u0111\u00e3 gi\u00f2n v\u00e0 v\u00e0ng \u0111\u1ec1u, b\u1ea1n t\u1eaft b\u1ebfp, g\u1eafp b\u00e1nh tr\u00e1ng<\/a><\/strong> ra \u0111\u1ec3 cho r\u00e1o d\u1ea7u.<\/p>\n Th\u00e0nh ph\u1ea9m<\/span><\/p>\n B\u00e1nh tr\u00e1ng<\/a><\/strong> cu\u1ed1n chi\u00ean, m\u1ed9t m\u00f3n \u0103n v\u1eb7t quen thu\u1ed9c m\u00e0 l\u1ea1i v\u00f4 c\u00f9ng d\u1ec5 l\u00e0m. Khi \u0103n b\u1ea1n tr\u1ed9n 1 mu\u1ed7ng canh s\u1ed1t mayonnaise v\u00e0 1 mu\u1ed7ng c\u00e0 ph\u00ea t\u01b0\u01a1ng \u1edbt \u0111\u1ec3 ch\u1ea5m k\u00e8m l\u00e0 kh\u00f4ng g\u00ec b\u1eb1ng. B\u00e1nh tr\u00e1ng<\/a><\/strong> gi\u00f2n gi\u00f2n, s\u1ed1t beo b\u00e9o, c\u00e1c b\u00e9 trong nh\u00e0 m\u00ea l\u1eafm \u0111\u00e2y.<\/p>\n 1. Chu\u1ea9n b\u1ecb b\u00e1nh tr\u00e1ng<\/a><\/strong> rong bi\u1ec3n<\/span><\/p>\n B\u1ea1n chu\u1ea9n b\u1ecb m\u1ed9t \u00edt n\u01b0\u01a1c \u0111\u1ec3 l\u00e0m m\u1ec1m b\u00e1nh tr\u00e1ng<\/a><\/strong>, kho\u1ea3ng 800 ml n\u01b0\u1edbc l\u1ecdc.<\/p>\n B\u1ea1n nh\u00fang b\u00e1nh sao cho b\u00e1nh \u0111\u01b0\u1ee3c \u01b0\u1edbt h\u1ebft v\u00e0 m\u1ec1m.<\/p>\n B\u1ea1n \u0111\u1eb7t 1 l\u00e1 rong bi\u1ec3n ra th\u1edbt hay m\u1eb7t ph\u1eb3ng s\u1ea1ch, sau \u0111\u00f3 \u0111\u1eb7t mi\u1ebfng b\u00e1nh tr\u00e1ng<\/a><\/strong> \u0111\u00e3 nh\u00fang m\u1ec1m l\u00ean mi\u1ebfng rong bi\u1ec3n. R\u1ed3i \u0111\u1ec3 sang m\u1ed9t b\u00ean kho\u1ea3ng 2 – 3 ti\u1ebfng cho b\u00e1nh tr\u00e1ng<\/a><\/strong> v\u00e0 rong bi\u1ec3n kh\u00f4 l\u1ea1i, sau \u0111\u00f3 c\u1eaft th\u00e0nh mi\u1ebfng v\u1eeba \u0103n.<\/p>\n 2. Chi\u00ean<\/span> b\u00e1nh tr\u00e1ng<\/a><\/strong><\/p>\n1.<\/b>\u00a0B\u00e1nh tr\u00e1ng cu\u1ed1n chi\u00ean<\/h2>\n
<\/div>\n<\/div>\n
Nguy\u00ean li\u1ec7u l\u00e0m b\u00e1nh tr\u00e1ng<\/a><\/strong> cu\u1ed1n chi\u00ean <\/i>(Cho 2 ng\u01b0\u1eddi)<\/small><\/h2>\n
\n
C\u00e1ch ch\u1ecdn mua tr\u1ee9ng c\u00fat ngon<\/h2>\n
\n
<\/p>\n<\/div>\n<\/div>\n
C\u00e1ch ch\u1ebf bi\u1ebfn b\u00e1nh tr\u00e1ng<\/a><\/strong> cu\u1ed1n chi\u00ean<\/h2>\n
<\/div>\n
<\/div>\n
<\/div>\n<\/div>\n<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n<\/div>\n<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n<\/div>\n<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n
2.<\/b> B\u00e1nh tr\u00e1ng<\/a><\/strong> rong bi\u1ec3n chi\u00ean<\/h2>\n
<\/div>\n<\/div>\n
Nguy\u00ean li\u1ec7u l\u00e0m b\u00e1nh tr\u00e1ng<\/a><\/strong> rong bi\u1ec3n chi\u00ean <\/i>(Cho 2 ng\u01b0\u1eddi)<\/small><\/h2>\n
\n
<\/p>\n<\/div>\n<\/div>\n
C\u00e1ch ch\u1ebf bi\u1ebfn b\u00e1nh tr\u00e1ng<\/a><\/strong> rong bi\u1ec3n chi\u00ean<\/h2>\n
<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n<\/div>\n<\/div>\n