Chào mừng!

Bằng cách đăng ký với chúng tôi, bạn sẽ có thể thảo luận, chia sẻ và nhắn tin riêng tư với các thành viên khác trong cộng đồng của chúng tôi.

Đăng ký ngay!
  • Chào Khách,
    Bạn cần liên hệ với admin ??? ZALO & TELEGRAM

Hỏi - Đáp Pro cho em hỏi này là lỗi gì vậy ạ?

Tham gia
27/6/21
Bài viết
12
Lượt Thích
0
Coins
1,000
Chả là em đang tập tành làm web truyện theo hướng dẫn này
nhưng khi chèn code ở PHP Snippets Dropdown khi lưu thì nó báo lỗi như hình ạ, không biết fix dòng 4 đó kiểu gì luôn? mọi người giúp em với
Mã:
function get_dropdown_part( $id ) {
    global $post, $wpdb;
    $query = $wpdb->get_results(sprintf('select * from %s where post_type = \'%s\' and post_parent = %d and post_status = \'%s\'  order by post_date asc', $wpdb->posts, 'story', $id, 'publish'));
    if ($query) {
        echo '<form id="selectpart" class="story__form">
  <select name="part" onchange="window.location.href = (this.options[this.selectedIndex].value)">
    <option value="">- Chọn tập -</option>'; foreach ( $query as $k ) { $uri = get_permalink($k->ID); if ( ! preg_match('/.*page-[0-9].*/', $uri)) echo '<option value="'.$uri.'">'.$k->post_title .'</option>'; } echo '</select></form>';
}
}
 
Top Bottom
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock
No Thanks