Forum Replies Created

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter clsklvr

    (@clsklvr)

    Great, thanks!

    Best
    Claas

    Thread Starter clsklvr

    (@clsklvr)

    Ah ok, great!

    Thanks
    Cls

    Thread Starter clsklvr

    (@clsklvr)

    Hi maui2wp,

    thanks for replying, I thought that could be useful for others too. Is it possible to integrate that into the plugin regularly?

    But I had one issue that I was not able to solve. Therefore I had to disable the fullscreen mode to make it work. Otherwise the view jumps to to top of the page when leaving the fullscreen mode.

    Best
    Cls

    Great, thank you!

    Best
    Cls

    Hey,

    I have the same problem.

    Best
    Cls

    Thread Starter clsklvr

    (@clsklvr)

    Hi YOP,

    hm, yes both is set to yes.

    Do I need the pro version or does it also work with the free version?

    Best
    Cls

    Thread Starter clsklvr

    (@clsklvr)

    Hi YOP.

    thank you.

    It seems like custom answers gets now saved when the user selects two or more answers at the same time. It only saves the first not custom answer.

    Best
    Cls

    Yes, great that words!

    Thanks a lot.

    Best
    Cls

    Ok thanks, I will look into this option.

    58 is a custom taxonomy.

    But CRP 3x still should work with pages instead of posts right?

    Hey @ajay,

    I printed in the public function posts_where( $where, $query ) {...} the array $this->query_args and the query string in $where:

    Array ( [include_cat_ids] => 58 [include_post_ids] => 0 [offset] => 0 [postid] => 30 [strict_limit] => [cache_posts] => 0 [cache] => 0 [add_to] => Array ( [page] => page ) [content_filter_priority] => 999 [insert_after_paragraph] => -1 [disable_on_mobile] => 0 [disable_on_amp] => 0 [uninstall_options] => 0 [uninstall_indices] => 0 [uninstall_indices_deactivate] => 0 [show_metabox] => 1 [show_metabox_admins] => 0 [show_credit] => 0 [limit] => 6 [daily_range] => 9999 [ordering] => random [random_order] => [match_content] => 1 [match_content_words] => 0 [post_types] => page [same_post_type] => 0 [same_author] => 0 [exclude_post_ids] => 89,30,3248,303,20,541,542,539,3282,540,3281,3283,4801,4738,4917,3 [exclude_cat_slugs] => [exclude_categories] => [exclude_output_header] => 0 [exclude_on_post_ids] => [exclude_on_post_types] => [html_wrapper_header] => 0 [post_thumb_op] => inline [thumb_size] => crp_thumbnail [thumb_width] => 325 [thumb_height] => 217 [thumb_crop] => 1 [thumb_create_sizes] => 1 [thumb_html] => html [thumb_meta] => post-image [scan_images] => 1 [thumb_default_show] => 1 [thumb_default] => http://hostingkunde.de/wp-content/plugins/contextual-related-posts/default.png [crp_styles] => rounded_thumbs [custom_css] => .related-posts-headline { margin-bottom: 10px !important; } [feed_options_desc] => 0 [limit_feed] => 5 [show_excerpt_feed] => 0 [post_thumb_op_feed] => text_only [thumb_width_feed] => 250 [thumb_height_feed] => 250 [exclude_on_cat_slugs] => [exclude_on_categories] => [same_taxes] => post_tag [match_all] => 0 [no_of_common_terms] => 1 [disable_contextual] => 0 [disable_contextual_cpt] => 1 [crpt_same_taxes] => [crpt_match_all] => 0 [crpt_no_of_taxes] => 1 [crpt_disable_contextual] => 0 [crpt_disable_contextual_cpt] => 1 [is_widget] => [is_shortcode] => [is_manual] => [is_block] => 1 [echo] => 1 [heading] => [extra_class] => add-bottom-40 [more_link_text] => [other_attributes] => include_cat_ids=58 [className] => add-bottom-40 [crp_query] => 1 [suppress_filters] => [ignore_sticky_posts] => 1 [no_found_rows] => 1 [posts_per_page] => 18 [taxonomy_count] => 1 [tax_query] => Array ( [0] => Array ( [taxonomy] => category [field] => term_taxonomy_id [terms] => Array ( [0] => 58 ) ) ) [post_type] => Array ( [0] => page ) [date_query] => Array ( [0] => Array ( [after] => 1993-09-06 [before] => 2021-01-21 17:47:27 [inclusive] => 1 ) ) [post_status] => Array ( [0] => publish [1] => inherit ) [post__not_in] => Array ( [0] => 89 [1] => 30 [2] => 3248 [3] => 303 [4] => 20 [5] => 541 [6] => 542 [7] => 539 [8] => 3282 [9] => 540 [10] => 3281 [11] => 3283 [12] => 4801 [13] => 4738 [14] => 4917 [15] => 3 [16] => 3247 [17] => 3248 [18] => 540 [19] => 3276 [20] => 30 ) )

    AND ( ( wp_posts.post_date >= '1993-09-06 00:00:00' AND wp_posts.post_date <= '2021-01-21 17:47:27' ) ) AND wp_posts.ID NOT IN (89,30,3248,303,20,541,542,539,3282,540,3281,3283,4801,4738,4917,3,3247,3248,540,3276,30) AND ( 0 = 1 ) AND wp_posts.post_type = 'page' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'inherit')) AND MATCH (wp_posts.post_title,wp_posts.post_content) AGAINST ('…')

    I see the term id 58 in the array, but not in the query string. apply_filters is a WordPress function as far as I can see. Is the array structure valid in this case?

    Best
    Cls

    I tested it with quotes and without and also in a new post or page in my case.

    Hm, this is strange. I will also start debugging at the weekend and I tell you, if I find something out.

    Thanks you for your effort so or so!

    Best, Cls

    Yes, caching is disabled.

    When the CRP Gutenberg Block is inserted, there is a field in the Block-Settings named “Other attributes”. Here I added “include_cat_ids=58”.

    I also tested it with the shortcode now. It does not work with 3x, only with 2.9.4.
    The query with 3x is

    SELECT wp_posts.*, MATCH (wp_posts.post_title,wp_posts.post_content) AGAINST ('Casström ') as score
    FROM wp_posts
    WHERE 1=1
    AND ( ( wp_posts.post_date >= '1993-09-03 00:00:00'
    AND wp_posts.post_date <= '2021-01-18 22:52:45' ) )
    AND wp_posts.ID NOT IN (89,30,3248,303,20,541,542,539,3282,540,3281,3283,4801,4738,4917,3,3247,3248,540,3276,5005)
    AND ( 0 = 1 )
    AND wp_posts.post_type = 'page'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'inherit'))
    AND MATCH (wp_posts.post_title,wp_posts.post_content) AGAINST ('Casström ')
    GROUP BY wp_posts.ID
    ORDER BY score DESC
    LIMIT 0, 6

    I was wondering if CRP may only be included once per page, because I was wondering why all the crp queries e.g. on my startpage looks the same although there is the standard CRP and some custom CRP with specific taxonomies embeded.

    But also on a fresh new page with CRP deactivated for this page, the query of 3x looks like this:

    
    SELECT wp_posts.*, MATCH (wp_posts.post_title,wp_posts.post_content) AGAINST ('Casström ') as score
    FROM wp_posts
    WHERE 1=1
    AND ( ( wp_posts.post_date >= '1993-09-02 00:00:00'
    AND wp_posts.post_date <= '2021-01-17 21:52:25' ) )
    AND wp_posts.ID NOT IN (89,30,3248,303,20,541,542,539,3282,540,3281,3283,4801,4738,4917,3247,3248,540,3276,5005)
    AND ( 0 = 1 )
    AND wp_posts.post_type = 'page'
    AND ((wp_posts.post_status = 'publish'
    OR wp_posts.post_status = 'inherit'))
    AND MATCH (wp_posts.post_title,wp_posts.post_content) AGAINST ('Casström ')
    GROUP BY wp_posts.ID
    ORDER BY score DESC
    LIMIT 0, 6
    

    There is no LEFT JOIN and no wp_term_relationships.term_taxonomy_id IN.

    Do I have to deactivate the “Related Posts by Categories and Tags” plugin maybe? – No does not work either.

    Best
    Cls

    • This reply was modified 5 years, 3 months ago by clsklvr.

    Hey, it seems like my custom settings are ignored by CRP. This are the queries that are generared:

    SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.term_taxonomy_id = 58 LIMIT 1

    ————–

    SELECT wp_posts.*, MATCH (wp_posts.post_title) AGAINST (‘⸺ Outdoorknives Magazin ⸺’) as score
    FROM wp_posts
    WHERE 1=1
    AND ( ( wp_posts.post_date >= ‘1993-09-02 00:00:00’
    AND wp_posts.post_date <= ‘2021-01-17 13:01:03’ ) )
    AND wp_posts.ID NOT IN (89,30,3248,303,20,541,542,539,3282,540,3281,3283,4801,4738,4917,3247,3248,540,3276,30)
    AND ( 0 = 1 )
    AND wp_posts.post_type = ‘page’
    AND ((wp_posts.post_status = ‘publish’
    OR wp_posts.post_status = ‘inherit’))
    AND MATCH (wp_posts.post_title) AGAINST (‘⸺ Outdoorknives Magazin ⸺’)
    GROUP BY wp_posts.ID
    ORDER BY score DESC
    LIMIT 0, 18

    I normaly match also against the content, that I excluded here to make the query a little bit shorter.

    I added CRP as Gutenberg Blocks. In the Block Settings I added include_cat_ids=58 for this Element.

    All my taxonomies are tags related to pages. I have multiple CRP Elements on each page including the autogenerated CRP.

    It works fine with CRP 2.9.4 and the “Related Posts by Categories and Tags” plugin.

    With CRP 2.9.4 the query looks like this

    SELECT DISTINCT wp_posts.ID, wp_posts.post_date
    FROM wp_posts
    WHERE 1=1
    AND MATCH (post_title,post_content) AGAINST (‘⸺ Outdoorknives Magazin ⸺ Outdoorknives are knives ……………….…’)
    AND wp_posts.post_date < ‘2021-01-17 13:20:48’
    AND wp_posts.post_date >= ‘1993-09-02 13:20:48’
    AND wp_posts.post_status IN (‘publish’,’inherit’)
    AND wp_posts.ID != 30
    AND wp_posts.ID NOT IN (89,30,3248,303,20,541,542,539,3282,540,3281,3283,4801,4738,4917,3247,3248,540,3276)
    AND wp_posts.post_type IN (‘page’)
    AND wp_posts.ID IN (
    SELECT object_id
    FROM wp_term_relationships
    WHERE term_taxonomy_id IN (58) )
    LIMIT 0, 18

    Best
    Cls

    • This reply was modified 5 years, 3 months ago by clsklvr.
    • This reply was modified 5 years, 3 months ago by clsklvr.
    • This reply was modified 5 years, 3 months ago by clsklvr.
Viewing 15 replies - 1 through 15 (of 20 total)