I have a script in place in my wordpress install which shows all the posts which reside under the custom post type 'publicnews'.
The outcome is great and displays all the posts I want to be displayed but the the list is not clickable.
I would like it so each post displayed in the output links to their permalink page.
Essentially what I am looking to do is, display all the posts which sit under the custom post type 'publicnews' in a list outside the loop. The posts which display should be clickable and lead to their full page.
Below is a view of the full code:
<!-- Dynamic News Box -->
<div class="col-md-8 col-sm-6">
<div class="row">
<div class="col-md-6">
<div class="panel panel-template panel-color<?=$color?>">
<div class="panel-body small-text newspagesmall">
<h3 class="h3_title">
<span class="icon-fleche"></span>
<a class="titre_href" href="">
NEWS BOX
</a>
</h3>
<div class="scrollablenews_div">
<ul>
<?php
query_posts( array( 'post_type' => 'publicnews', 'showposts' => 10 ) );
if ( have_posts() ) : while ( have_posts() ) : the_post();
?>
<li><?php the_title(); ?></li>
<?php endwhile; endif; wp_reset_query(); ?>
</ul>
</div>
</div>
</div>
</div>
I hope you can help!
<?php query_posts( array( 'post_type' => 'publicnews', 'showposts' => 10 ) ); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> /* There Should Be Something Here */ <?php endwhile; endif; wp_reset_query(); ?><-- look inside your code, where it should have some code outputting your supposed list. It's missing. Please, provide it. - al'einthe_post()is a WordPress function which simply sets up post data. It's not responsible for content output. Which means that the above code alone cannot be responsible for outputting the list in the screenshot. - rnevius