Skip to main content
added 39 characters in body
Source Link

My page here: https://blackfreedom.proquest.com/category/civil-rights-and-black-power-movements/activism/selma-demonstrations-and-marches/

is displaying all pages on the site, not just the ones that are associated with this 'Selma' category. Which piece am i missing? Should I be using WP_query instead? I'd like to have this dynamic so that all of category pages show the correct pages associated with their cats.

Putting this in my archive.php code:

<ul>

   <?php
        $cat = get_query_var('cat');
        $PozCat = get_category ($this_category);
        $PozCat->id;
        query_posts('&post_type=page”.'.$PozCat->id);
        if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

        <li><a href="<?php the_permalink();?>"><?php the_title(); ?></a></li>
        <p> <?php the_excerpt()?> </p>
    <?php endwhile; endif; ?>
</ul>

My page here: https://blackfreedom.proquest.com/category/civil-rights-and-black-power-movements/activism/selma-demonstrations-and-marches/

is displaying all pages on the site, not just the ones that are associated with this 'Selma' category. Which piece am i missing? Should I be using WP_query instead? I'd like to have this dynamic so that all of category pages show the correct pages associated with their cats.

<ul>

   <?php
        $cat = get_query_var('cat');
        $PozCat = get_category ($this_category);
        $PozCat->id;
        query_posts('&post_type=page”.'.$PozCat->id);
        if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

        <li><a href="<?php the_permalink();?>"><?php the_title(); ?></a></li>
        <p> <?php the_excerpt()?> </p>
    <?php endwhile; endif; ?>
</ul>

My page here: https://blackfreedom.proquest.com/category/civil-rights-and-black-power-movements/activism/selma-demonstrations-and-marches/

is displaying all pages on the site, not just the ones that are associated with this 'Selma' category. Which piece am i missing? Should I be using WP_query instead? I'd like to have this dynamic so that all of category pages show the correct pages associated with their cats.

Putting this in my archive.php code:

<ul>

   <?php
        $cat = get_query_var('cat');
        $PozCat = get_category ($this_category);
        $PozCat->id;
        query_posts('&post_type=page”.'.$PozCat->id);
        if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

        <li><a href="<?php the_permalink();?>"><?php the_title(); ?></a></li>
        <p> <?php the_excerpt()?> </p>
    <?php endwhile; endif; ?>
</ul>
Source Link

Category Page Displaying all Pages

My page here: https://blackfreedom.proquest.com/category/civil-rights-and-black-power-movements/activism/selma-demonstrations-and-marches/

is displaying all pages on the site, not just the ones that are associated with this 'Selma' category. Which piece am i missing? Should I be using WP_query instead? I'd like to have this dynamic so that all of category pages show the correct pages associated with their cats.

<ul>

   <?php
        $cat = get_query_var('cat');
        $PozCat = get_category ($this_category);
        $PozCat->id;
        query_posts('&post_type=page”.'.$PozCat->id);
        if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

        <li><a href="<?php the_permalink();?>"><?php the_title(); ?></a></li>
        <p> <?php the_excerpt()?> </p>
    <?php endwhile; endif; ?>
</ul>