Ondersteuning » Algemeen WordPress » hoe kan ik een specifieke categorie op de voorpagina zetten?

  • Opgelost dennisv1982

    (@dennisv1982)


    hoi mensen, ik had deze al op een engelstalig forum geplaatst maar geen reacties dus hopelijk kan hier iemand me helpen, ik heb even de engelse txt gecopied

    alvast bedankt!!

    hi there all,

    i am editing a template i bought myself because i want it to have a different feature than available in the template

    http://www.totalgamer.nl

    if you scroll down a little under “nieuws”, i want it to have posts from a single categorie and than displayed like this”:

    post title
    >> here a small piece of the text from the post <<
    Read more (the link that goes to the actual post

    but i cant find and/or get the right code to work… the official template just shows a few of the latest videos but i dont want it there.. i just want plain text with a read more link from a specific categorie.

    i hope someone can help me out?

1 reactie aan het bekijken (van in totaal 1)
  • Thread starter dennisv1982

    (@dennisv1982)

    zelf gefixed, als andere het nodig hebben:

    <div id="content" class="narrowcolumn" role="main">
    
    	<?php if (have_posts()) : ?>
    <?php query_posts('category_name=nieuws&showposts=10'); ?>
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    				<div class="entry">
    					<?php the_content('Lees Verder... &raquo;'); ?>
    				</div>
    
    				<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?><?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('Geen Reacties »', '1 Reactie »', '% Reacties »'); ?></p>
    			</div>
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Eerdere Berichten') ?></div>
    			<div class="alignright"><?php previous_posts_link('Nieuwe Berichten &raquo;') ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php get_search_form(); ?>
    
    	<?php endif; ?>
    
    	</div>
1 reactie aan het bekijken (van in totaal 1)
  • Het onderwerp ‘hoe kan ik een specifieke categorie op de voorpagina zetten?’ is gesloten voor nieuwe reacties.