Hiện tại mình đang có dự án, lấy toàn bộ dữ liệu của trường Portfolio trong themes Flatsome ra bằng code, sau đó chỉ lấy mỗi trường dữ liệu tên + url (the_permalink) của nó để tùy biến phù hợp với dữ liệu bên mình cần. Mà mình tham khảo trên mạng code mà không lấy được bạn nào giúp mình với. Cách mình đang làm: Vào themes child tạo 1 file có tên: PortfolioList.php bên trong có code: PHP: <?php/*Template Name: Portfolio List*/get_header();?><?php $args = array( 'post_type' => 'portfolio', 'orderby' => 'title', 'sort_order'=>'asc' ); query_posts($args);?><div class="divider"></div><?php if (have_posts()) { ?><div class="cs-portfolio"> <?php $i = 0; ?> <ul class="cs-item"> <?php while (have_posts()) : the_post(); $i++; ?> <?php if ($i == 1 OR $i % 5 == 0) echo '<li><ul>'; ?> <li class="col1-4<?php if ($i % 4 == 0) echo ' omega'; ?>"> <a href="<?php the_permalink(); ?>" class="cs-portfolioname" title="<?php the_title(); ?>"><?php the_title(); ?></a> </li> <?php if ($i % 4 == 0) echo '</ul></li>'; ?> <?php endwhile; ?> <?php if ($i % 4 != 0) echo '</ul></li>'; ?> </ul></div><?php } ?><?phpget_footer(); Sau đó mình vào quản trị web -> Page. Mình tạo 1 trang mới và chọn khai báo ở phần Giao diện là: Portfolio List.
Với 1 số themes khác họ tạo post_type tên là: portfolio, còn themes flatsome type của nó là: featured_item Nên bạn đổi lại code thành: PHP: <?php $args = array( 'post_type' => 'featured_item', 'orderby' => 'title', //'cat' => 'category_id', //'category_name' => 'slug_category', 'sort_order'=>'asc' ); query_posts($args);?>