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

11/29/13

add_image_size thêm kích thước ảnh mới trong wordpress

Tùy theo theme mà có kích thước ảnh khác nhau. Các ảnh này được resize theo 1 kích thước đã được khai báo trong file functions.php Trong quá trình viết theme, bạn cần bổ sung 1 hình có kích thước mới ví dụ 152 X 92 pixels      Trong wordpress hỗ trợ tốt chúng ta trong phần này                  add_image_size('franchise-thumbnails', 152, 92, true);      => Đây là hàm thêm kích thước ảnh mới với: tên, width, height, True hoặc false là drop ảnh hay không  ...

11/20/13

Sắp xếp post type trong admin wordpress

Mặc định bạn tạo ra 1 post type mới, danh sách các bài post sẽ sắp xếp theo 1 thứ tự mặc định (theo tiêu đề ASC). Bạn muốn tùy chỉnh việc sắp xếp này, có thể theo tiêu đề, theo ID, theo ngày Tham khảo mẫu code dưới đâu. Code này được chèn trong file functions.php (hoặc kèm trong 1 plugin của bạn) function set_custom_post_types_admin_order($wp_query) {         if (is_admin()) {             // Get the post type from the query             $post_type = $wp_query->query['post_type'];  ...

11/6/13

Wordpress Upload Image from front-end and get its url

function agp_process_woofile($files, $post_id, $caption){ require_once(ABSPATH . "wp-admin" . '/includes/image.php'); require_once(ABSPATH . "wp-admin" . '/includes/file.php'); require_once(ABSPATH . "wp-admin" . '/includes/media.php'); $attachment_id = media_handle_upload($files, $post_id); $attachment_url = wp_get_attachment_url($attachment_id); add_post_meta($post_id, '_file_paths', $attachment_url); $attachment_data = array( 'ID' => $attachment_id, 'post_excerpt' => $caption ); wp_update_post($attachment_data); ...

10/30/13

Hiển thị danh sách "post_type" trong wordpress

Hàm lấy danh sách post type theo tên post_type <?php         $args = array(                                 'numberposts' => 0,                                 'post_type'   => 'country-origin'                             );          $result = get_posts($args);...

Wordpress lấy danh mục - get categories

Description Returns an array of category objects matching the query parameters. Arguments are pretty much the same as wp_list_categories and can be passed as either array or in query syntax. Usage  <?php $categories = get_categories( $args ); ?>  Default Usage <?php $args = array( 'type' => 'post', 'child_of' => 0, 'parent' => '', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty'...

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,...