WordPress.org

Ready to get started?Download WordPress

Forums

Category by iteself (2 posts)

  1. xman888
    Member
    Posted 3 years ago #

    Hello,

    Is it possible to create a 'category' that therefore has it's own url address, that I want to place on another place on my website from my original blog (ie. maybe in an iframe) that only shows the content from that category, and not the content from the other categories that I have?

    Kind regards,
    Anthony

  2. mheltone
    Member
    Posted 3 years ago #

    You can probably try to create a custom page for that.

    Example:

    <?php
    /* Template Name: Specific Category Page */
    ?>
    
    <?php get_header(); ?>
    
    <?php query_posts('category_name=Articles'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    
    <?php the_excerpt(); ?>
    
    <?php endwhile; ?>
    <?php endif; ?>
    <?php wp_reset_query(); ?>
    
    <?php get_footer();?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.