• Resolved ycerro

    (@ycerro)


    Hi!
    I′ve been trying several plugins to relate post, and yours seems like the right fit.

    I want to show related listings (a custom post type) in landing pages (another custom post type). They’re connect by pods, sharing the same taxonomy.
    For some reason, this plugin doesn′t see the share custom taxonomies, to show the right listings.
    I′ve selected Match all taxonomy terms and only category and It doesn’t seem to work.

    Thanks in advance!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Ajay

    (@ajay)

    Please uncheck match all taxonomy terms as that becomes the most restrictive setting. I assume you can see the custom taxonomy in the Fetch Related posts only from option before this one?

    You might need to do check with Query Monitor to see exactly what query is being run

    Thread Starter ycerro

    (@ycerro)

    Hi! Thanks for answering.
    Last week it was working and for some reason, it doesn’t anymore. Now It’s constantly showing the same results, even though I’ve changed the category and region (the shared taxonomies between CPT).

    As checkboxes, I can only see Categories, Tags and Formats on Fetch Related posts only from.

    I run Query Monitor and this came put:

    	SELECT wposts.ID
    FROM wpem_posts wposts, wpem_postmeta wpostmeta
    WHERE wposts.ID = wpostmeta.post_id
    AND wpostmeta.meta_key = '_wp_attached_file'
    AND wpostmeta.meta_value = '2020/01/155777034.jpg'
    AND wposts.post_type = 'attachment'

    Thanks again!

    Plugin Author Ajay

    (@ajay)

    Please can you disable the plugin cache in the settings page and find the query that includes the MATCH clause. It’s get_crp_* function when looking for the caller in QM.

    Separately, can you post a screenshot and link it here of the settings page so I can see the options.

    e.g. https://ps.w.org/crp-taxonomy/assets/screenshot-1.png?rev=2061732

    Thread Starter ycerro

    (@ycerro)

    Hi again!
    I disabled the cache.
    The only thing that I found on QM, the caller is get_crp_posts_id(): ` SELECT DISTINCT wpem_posts.ID, wpem_posts.post_date
    FROM wpem_posts
    WHERE 1=1
    AND wpem_posts.post_date < ‘2020-09-30 11:47:44’
    AND wpem_posts.post_date >= ‘2017-10-01 11:47:44’
    AND wpem_posts.post_status IN (‘publish’,’inherit’)
    AND wpem_posts.ID != 41739
    AND wpem_posts.post_type IN (‘job_listing’)
    LIMIT 0, 4`

    This is the screenshot of plugin: https://snipboard.io/OU31rS.jpg

    These are my settings on the widget, just in case it brings some information: https://snipboard.io/459wkh.jpg

    Plugin Author Ajay

    (@ajay)

    Thanks for this. That’s the query I was looking for.
    The post type setting is working well in line with your second screenshot.

    What are the other custom taxonomies on your site? I’m thinking there is an issue with the way the taxonomies list is being generated as I can only see the same categories that you do on my test install.

    Plugin Author Ajay

    (@ajay)

    I think I’ve found the bug. Would you be in a position to make this edit?

    Are you able to delete this line from the main Contextual Related Ports file:
    https://github.com/WebberZone/contextual-related-posts/blob/v2.9.4/includes/admin/settings-page.php#L646

    This is restricting the taxonomies being pulled out to only the three.

    Thread Starter ycerro

    (@ycerro)

    I just did it and it works! The custom taxonomies are showing again.
    Thank you so much!

    Plugin Author Ajay

    (@ajay)

    Thank you for confirming. I’ll fix it in the next version

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Relate custom post type with the same taxonomy’ is closed to new replies.