I am very new in PHP and WordPress development and I have the following problem trying to insert some HTML code into the posts loop.
I tried something like it:
<?php
if (have_posts()) :
<ul>
// Start the Loop.
while (have_posts()) : the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
<li>
get_template_part('contentArchive', get_post_format());
</li>
endwhile;
</ul>
endwhile;
?>
As you can see I want an unordered list (the < ul>**tag) and into it I want put the one list element (the **< li> tag) for each interation of the while cycle but Aptana Studio give me a syntax error message on the < ul> and on the < li>
Why? Where is the problem? How can I fix it?
Tnx