Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can't filter posts on Single Post display

Discussion in 'Troubleshooting & How-To's' started by frankF12, Dec 12, 2015.

  1. frankF12

    New Member

    Joined:
    Dec 12, 2015
    Messages:
    2
    Likes Received:
    0
    I created a Wordpress site with 2 grids on the main page. Each grid is drawn based on a custom loop.php.
    So far so good. When I click on a grid post, it navigates to a single post display with 2 nav links at the bottom (previous, next).

    Now the problem: The dataset (wp_query?) is not filtered at that point. Meaning that it contains all my posts and not the ones that were contained by the source (grid). How do i filter it at that point?

    I have tried everything. I am not an expert but not a newbie either. I tried pre_get_posts on my functions.php but it doesn't fire (it's probably me).

    I can add a custom link to the grid links such as ..../category/?p=1234. Right now it is set to ..../?p=1234. Can I hook off of that somehow? I need a different filter depending on which grid I come from.

    Any guidance would be more than appreciated and it will save my small dog who will not be loved tonight!
     
    #1

Share This Page

Web Hosting