• Resolved imransilvake

    (@imransilvake)


    I have 2 categories:
    1. Games with view: <?php echo do_shortcode(‘[pt_view id=”XXX”]’); ?>
    2. Music with view: <?php echo do_shortcode(‘[pt_view id=”YYY”]’); ?>

    Now can you tell me how can i get only games post when i click on the Games category. Should not display Music posts.

    and when i click on the Music Category, only Music posts should display and not the Games.

    How can i achieve this in generic sense?. Hope you get my question.

    https://wordpress.org/plugins/content-views-query-and-display-post-page/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Content Views

    (@pt-guy)

    Hi,

    Does each Views XXX, YYY work like you expect in Preview panel?

    And what is code you are using to show posts on Games category page, Music category page?

    Thread Starter imransilvake

    (@imransilvake)

    I am explaining you what I am doing

    1. First, I am making a custom theme. no other theme used.
    2. Second, I have a page called ‘single.php’ for showing posts (full content of the clicked post). It directs to this page when click on a particular post.
    3. Third, for showing all posts, I have a page called ‘index.php’. When you select a category, it should filter the posts and display the selected category posts which in case of using your plugin is not working.
    4. On plugin Preview, Games posts are showing e.g (post 4, and post 5).
    5. On plugin Preview, Music posts are showing e.g (post 29, and post 33).

    What I Want:

    6. Using your plugin, how can I show all posts when no category is selected. (on index.php)
    7. Using your plugin, how can I show only those posts when a particular category is selected. (on index.php)

    I think this sums up My all question.

    Note: (below code does what I am asking but I want to style the Posts that’s why I am using your plugin)


    index.php File:

    Showing MY categories:

    <?php wp_list_categories('orderby=name&title_li='); ?>

    showing My content (Posts):

    <?php while (have_posts()) : the_post(); ?>
      <h3>
         <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
      </h3>
      <p><?php the_excerpt(); ?></p>
      <p class="text-muted">Posted by: <?php the_author(); ?> on <?php the_time('F jS, Y'); ?></p>
    <?php endwhile; wp_reset_query(); ?>

    Plugin Author Content Views

    (@pt-guy)

    As I understand, do you want somethings like this http://sample.contentviewspro.com/shuffle-filter/ ?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘generic view posts’ is closed to new replies.