Có phải bạn muốn thiết kế website tiết kiệm chi phí và thời gian mà còn chuẩn seo ?

Thiết kế website bằng wordpress

Với các gói 500k, 750k, 999k là bạn co ngay 1 website đẹp, chuẩn seo

10/29/13

WordPress & jQuery Contact Form without a Plugin

There are lots of WordPress plugins for contact forms, but wouldn’t it be nice to have more control over the markup? In this tutorial, I am going to show how to use a custom page template to create a contact form in WordPress without a plugin. Some people may want to skip the post and get to the demo and source files: View Demo Download Source Files So, why not use a plugin? Well, I think that a contact form is so simple that a WordPress...

Tạo form liên hệ trong wordpress không dùng plugin

How to Create a WordPress Contact Form Without a Plugin There are a lot of different plugins available to put a contact form on your WordPress site, but I like to use as few plugins as i can get away with. So if you feel the same way, here’s a simple way to add a contact form, with some simple cut & paste of your site’s existing page.php file. First step – Create your page template Copy the code from your page.php file into a new file and name it page-contact.php. In order to let WordPress know this file should be treated as a page template,...

10/28/13

Giới thiệu 1 số hàm kiểm tra trong wordpress

Function: is_404() Function: is_admin() Function: is_admin_bar_showing() Function: is_archive() Function: is_attachment() Function: is_author() Function: is_category() Function: is_comments_popup() Function: is_date() Function: is_day() Function: is_feed() Function: is_front_page() Function: is_home() Function: is_local_attachment() Function: is_main_query Function: is_multi_author Function: is_month() Function: is_new_day() Function: is_page() Function: is_page_template() Function: is_paged() Function: is_plugin_active() Function: is_plugin_active_for_network() Function: is_plugin_inactive() Function: is_plugin_page() Function: is_post_type_archive() Function: is_preview() Function: is_search() Function: is_single() Function: is_singular() Function: is_sticky() Function: is_tag() Function: is_tax() Function: is_taxonomy_hierarchical() Function: is_time() Function: is_trackback() Function: is_year() Function: in_category() Function: in_the_loop() Function: is_active_sidebar() Function: is_active_widget() Function: is_blog_installed() Function: is_rtl() Function: is_dynamic_sidebar() Function: is_user_logged_in() Function: has_excerpt() Function: has_post_thumbnail() Function: has_tag() Function: pings_open() Function: email...

Query lấy 1 dòng trong wordpress

Trong wordpress, bạn  muốn lấy dữ liệu từ database, và bạn muốn lấy chỉ 1 dòng record thôi.  Ví dụ: Lấy tên người dùng, lấy chi tiết bài viết: global $wpdb; $wrp_table = $wpdb->prefix . 'wrp';  $query = "SELECT * FROM $wrp_table WHERE id = " . $_GET['id']; $data = $wpdb->get_row($query); ...

Câu lệnh insert trong wordpress

Để insert một dữ liệu trong wordpress như sau <?php     $wpdb->insert($wpdb->prefix . 'wrp', $settings); ?> Tham số thứ 1: là tên bảng Tham số thứ 2: là 1 mảng các giá trị Mảng đó như sau, ví dụ:         $settings['name']               = $_POST['name'];         $settings['key_active']       = $_POST['key_active']; $wpdb->prefix: Lấy tiền tố của bảng (thường là : wp_) Để lấy id trả về nếu insert thành công dùng: $wpdb->insert_id...

Chuyển hướng (redirect) trong wordpress

Để chuyển hướng trong wordpress, bạn sử dụng hàm sau: <?php     wp_redirect( $location, $status );     exit; ?> $location: là một URL $status: Mặc định là 302 Ví dụ: <?php wp_redirect( home_url() ); exit; ?> <?php wp_redirect( 'http://www.example.com', 301 ); exit; ?&g...