Support Forums

Looking for support? You can access the support system via your account.

Noeste IJver

Forum Replies Created

Viewing 10 posts - 11 through 20 (of 69 total)
  • Noeste IJver in reply to:
    Count of filters not correct after using pre_get_posts
    #242064

    Hi Trevor,

    That’s working for me, thanks!

    I does seem that the hooked in function is running twice. That’s not ideal, because some query changes are also added twice this way. How can we fix this?

    Noeste IJver in reply to:
    Post Meta option with post/term id’s
    #235735

    Hi Trevor,

    Just what I was looking for. Already got it working, thanks!

    Ticket can be closed.
    -Kevin

    Noeste IJver in reply to:
    Filtering on custom taxonomy for attachment post-type
    #235727
    This reply has been marked as private.
    Noeste IJver in reply to:
    Filtering on custom taxonomy for attachment post-type
    #235688

    I figured out that the main problem is that WordPress doesn’t seem to update term-relationships for terms in the post type ‘attachment’. I think that’s the main problem and that’s not really related to Search and Filter.

    I wrote an SQL statement to update the count, and added it to the hooks ‘add_attachment’ and ‘edit_attachment’:
    “UPDATE wp_term_taxonomy SET count = (
    SELECT COUNT(*) FROM wp_term_relationships rel
    LEFT JOIN wp_posts po ON (po.ID = rel.object_id)
    WHERE
    rel.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
    )”

    This works, the count on the taxonomy page seems correct now. However, I added some extra filters in the ‘Post Meta’ tab of Search & Filter. The filter counters in Search & Filter don’t seem to take those into account. Do you notice this as well?

    Noeste IJver in reply to:
    Filtering on custom taxonomy for attachment post-type
    #235664
    This reply has been marked as private.
    Noeste IJver in reply to:
    Remove S&F on search page
    #233654

    Hi Ross,

    Never mind, I’ve found a solution. Thanks!

    -Kevin

    Noeste IJver in reply to:
    Remove S&F on search page
    #233532

    Hi Ross,

    You might have been looking when I was testing some stuff. Are the URLs working for you now?

    I’m not quite sure which hooks I should remove at what moment. Could you help me out with that?

    Noeste IJver in reply to:
    Remove S&F on search page
    #233204

    But: how is it possible when I apply sfid=0, the results do show results from other subsites? It seems that (somehow) it is possible to override your query by just removing/disabling the sfid..

    Noeste IJver in reply to:
    Remove S&F on search page
    #233198

    For the search page, we are using it as an archive.

    I’ve tried to remove the sfid value from the query with pre_get_posts. It removes the value, but the S&F functionality is still there it seems.

    I’ve also tried to do this:

    remove_action('parse_request', 'archive_query_init', 10 );

    But no luck there..

    Noeste IJver in reply to:
    Remove S&F on search page
    #233183

    Hi Trevor,

    I understand that S&F doesn’t do multisite search. Therefore we made a separate search function, which is at the same page. The problem is, that this page still thinks it should use the S&F form/results.

    Is there a way to disconnect the S&F from the query/results before the query has run?

Viewing 10 posts - 11 through 20 (of 69 total)