Niestety Parse error: syntax error, unexpected T_VARIABLE in D:\xampp\htdocs\web\project1\includes\pages-functions.php on line 18
Funkcja nie działa. Ale czy to niebędzie zbyt mało optymalnie nie dość że w have_pages jest pętla while to jeszcze w każdej innej funkcji tworzyć foreach?
Nie wiesz może jak zrobić coś podobnego do systemu szablonów w wordpressie?
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<h3><?php the_title(); ?></h3>
<div id="add_to"></div>
<?php the_content('Czytaj całość »'); ?>
<div id="info_i">Dodał <?php the_author(); ?> dnia <?php the_date(); ?> | <?php comments_popup_link('Komentarzy: 0', 'Komentarzy: 1', 'Komentarzy: %'); ?></div>
<?php comments_template( '', true ); ?>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
Chodzi mi o to jakim cudem funkcje umieszczone w pętli while pobierają wartości z have_posts() lub the_post()?