Hello guys,
I have a bigger problem with the invoices links. They show up in my sitemap, where I use the following code to show the content in 3 rows, the Invoices show up in the first row with the directory entries in first place. The row starts with: <div class=”sitemap-spalte1″>
<div class="sitemap">
<a name="sitemap-spalte1"></a>
<div class="sitemap-spalte1">
<h2 id="custom_posts" class="hop-schrift">Dienstleister / Events / Trauorte</h2>
<?php
foreach(
get_post_types( array('public' => true) ) as $post_type ) {
if ( in_array( $post_type, array('post','page','attachment') ) ) continue;
$pt = get_post_type_object( $post_type );
echo '<h2>'.$pt->labels->name.'</h2>';
echo '<ul>';
query_posts('post_type='.$post_type.'&posts_per_page=-1');
while( have_posts() ) {
the_post();
echo '<li><a href="'.get_permalink().'">'.get_the_title().'</a></li>';
}
echo '</ul>'; }
?>
</div>
<a name="sitemap-spalte2"></a>
<div class="sitemap-spalte2">
<h2 id="posts" class="hop-schrift">Beiträge</h2>
<?php
$cats = get_categories('exclude=');
foreach ($cats as $cat) { echo "<h3>".$cat->cat_name."</h3>";
echo "<ul>";
query_posts('posts_per_page=-1&cat='.$cat->cat_ID);
while(have_posts()) { the_post();
$category = get_the_category();
if ($category[0]->cat_ID == $cat->cat_ID) { echo '<li><a href="'.get_permalink().'">'.get_the_title().'</a></li>'; } } echo "</ul>";}
?>
</div>
<a name="sitemap-spalte3"></a>
<div class="sitemap-spalte3">
<h2 id="pages" class="hop-schrift">Seiten</h2>
<?php // Add pages you'd like to exclude in the exclude here wp_list_pages( array( 'exclude' => '', 'title_li' => '', ) );
wp_list_pages( array( 'exclude' => false, ) );
?>
</div>
</div>
You have any idea how I should change my script, so the invoices don`t show up in the sitemap.
Thank you very much,
Atilla