WordPress.org

Ready to get started?Download WordPress

Forums

Link template to a specific page (1 post)

  1. Sophiamolino
    Member
    Posted 1 year ago #

    I'm trying to link a template to a page, with the aim to show a certain category on that page. I know there are plugins to do this for you, but I like to show my posts in my own way (plugins shows for example only the post title).

    I tried it like this (trends=category & corresponding cat_id=8):

    <?php is_page('trends'); ?>
    
    <?php
    $paged = $wp_query->get( 'trends' ); ?>
    
    <? php $recent = new WP_Query("cat=8"); while($recent->have_posts()) : $recent->the_post();{?>

    Can somebody help me out? :)

Topic Closed

This topic has been closed to new replies.

About this Topic