• theresident

    (@theresident)


    Hi,

    I’m using the theme, MyMag, on my site: https://www.theresident.net

    The bottom slider on the homepage features all posts, which is fine. The piece of code that calls that is:

    <div id=”bottom-container”>
    <div class=”bottomslider” id=”slider-bottom”>

      <?php $page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
      if ($myOptions[‘bottom_cat’]) {
      $category = $myOptions[‘bottom_cat’];
      } else {
      $category = 0;
      }
      if ($myOptions[‘bottom_posts’]) {
      $posts = $myOptions[‘bottom_posts’];
      } else {
      $posts = 0;
      }
      query_posts(“cat=$category&paged=$page&posts_per_page=$posts”);
      while ( have_posts() ) : the_post() ?>

      I’d like for single post pages to have a bottom slider as well, but have it only contain posts from within the category of the post. So, for instance, on this page: https://www.theresident.net/social-commentary-videos/how-fresh-direct-is-ruining-communities/

      I’d like the bottom slider to contain only posts from the /social-commentary-videos category, not all videos.

      Is there a way to edit the above code so that I might place it in my single.php to accomplish this?

      Thanks for any help!

  • The topic ‘customizing category of bottom slider’ is closed to new replies.