Szablon nie wyświetla treści/contentu z edytora
-
Witam, modyfikuję stronę, którą zrobił ktoś inny, i chciałbym żeby na stronie strona dodać trochę treści wprost z edytora stron wordpress, jednak żadna wpisana treść w okno w panelu, nie wyświetla się na stronie. Próbowałem również za pomocą własnych pól – też nic. To jest szablon strony. Macie jakieś pomysły, czemu to nie działa?
<?php /* Template name: Lista produktów */ ?> <?php get_header(); ?> <!-- #content --> <div id="content" class="clearfix productList"> <header id="pageHeader" class="smallHeader-0<?php echo rand(1,3); ?>"> <h1><?php bcn_display(); ?></h1> </header> <?php $postIDs = array(); $pageChildren = get_pages('child_of=' . $post->ID . '&exclude=' . $exclude_page ); if ( $pageChildren ) { foreach ( $pageChildren as $pageChild ) { $postIDs[] = $pageChild->ID; } $paged = (intval(get_query_var('paged'))) ? intval(get_query_var('paged')) : 1; $args = array( 'post_type' => 'page', 'paged' => $paged, 'post_parent' => $post->ID, 'posts_per_page' => 9, 'depth' => '1' ); query_posts($args); if (have_posts()) : while (have_posts()) : the_post(); ?><div><?php the_content(); ?></div> <!-- .product --><?php $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'thumb'); $url = $thumb['0']; ?> <article class="product" id="item-<?php echo $post->ID; ?>"> <div style="background-image: url('<?php echo $url; ?>')" class="wrapper"> <div class="desc"> <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> </div> </div> </article> <!-- /.product --> <?php endwhile; ?> <?php if(function_exists('wp_paginate')) { wp_paginate(); } ?> <?php endif; ?> <?php } ?> </div> <!-- /#content --> <div class="tresc"><p><?php the_field('opis'); ?></p></div> <?php get_footer(); ?>
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- Temat ‘Szablon nie wyświetla treści/contentu z edytora’ jest zamknięty na nowe odpowiedzi.