Skip to content

Instantly share code, notes, and snippets.

View Sắp xếp bài viết theo ngày cập nhật
//* sap xem bai viet theo ngay cap nhat
function orderby_modified_posts( $query ) {
if ($query->is_main_query()) {
$query->set( 'orderby', 'modified' );
}
}
add_action( 'pre_get_posts', 'orderby_modified_posts' );
View Sửa wp_usermeta
SELECT * FROM `reviewgiamgia_usermeta` WHERE `meta_key` LIKE '%wp_%'
View Sửa wp_options
SELECT * FROM `reviewgiamgia_options` WHERE `option_name` LIKE '%wp_%'
View Đổi Prefix_ cho wordpress
RENAME table `wp_commentmeta` TO `reviewgiamgia_commentmeta`;
RENAME table `wp_comments` TO `reviewgiamgia_comments`;
RENAME table `wp_links` TO `reviewgiamgia_links`;
RENAME table `wp_options` TO `reviewgiamgia_options`;
RENAME table `wp_postmeta` TO `reviewgiamgia_postmeta`;
RENAME table `wp_posts` TO `reviewgiamgia_posts`;
RENAME table `wp_terms` TO `reviewgiamgia_terms`;
RENAME table `wp_termmeta` TO `reviewgiamgia_termmeta`;
RENAME table `wp_term_relationships` TO `reviewgiamgia_term_relationships`;
RENAME table `wp_term_taxonomy` TO `reviewgiamgia_term_taxonomy`;
View Tắt revisions
define ('WP_POST_REVISIONS', false);
View Mở bình luận trong tab mới cho wordpress
//* target _blank for comment
function comment_links_in_new_tab($text) {
$return = str_replace('<a', '<a target="_blank"', $text);
return $return;
}
add_filter('get_comment_author_link', 'comment_links_in_new_tab');
add_filter('comment_text', 'comment_links_in_new_tab');
View dkim_yandex
v=DKIM1; k=rsa; t=s; p=MIGfMA0GCSEBtaCOteH4EBqJlKperJ+5BPEGS7N3fFkdeKllShrM73nm4xPdZmt2jNnmgWMeQySGYW5VUJ8PCePanwIXcW8YnqS7zw+grL/PHhUtf3ofSLmtVM3rSWmJ9qHFhxWmPFplPe5OsvpO+fphiMOrTnzzV/004S/jQIDAQAB
View move js to footer