{"id":144,"date":"2019-07-07T14:04:56","date_gmt":"2019-07-07T14:04:56","guid":{"rendered":"https:\/\/round-lake.dustinice.workers.dev:443\/http\/webberzone.com\/support\/?post_type=wz_knowledgebase&#038;p=144"},"modified":"2024-05-06T21:56:53","modified_gmt":"2024-05-06T20:56:53","slug":"contextual-related-posts-shortcode","status":"publish","type":"wz_knowledgebase","link":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/support\/knowledgebase\/contextual-related-posts-shortcode\/","title":{"rendered":"Contextual Related Posts shortcode"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Contextual Related Posts includes a shortcode the related posts list. If you&#8217;re not familiar with shortcodes, please read <a href=\"https:\/\/round-lake.dustinice.workers.dev:443\/https\/codex.wordpress.org\/Shortcode\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">this article in the WordPress Codex<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">[crp]<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This shortcode lets you insert the contextually related posts anywhere in your post content. It takes the following optional attributes:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">Parameter<\/th><th class=\"has-text-align-left\" data-align=\"left\">Type<\/th><th class=\"has-text-align-left\" data-align=\"left\">Description<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">limit<\/td><td class=\"has-text-align-left\" data-align=\"left\">Integer<\/td><td class=\"has-text-align-left\" data-align=\"left\">Maximum number of posts to return. The actual number displayed may be lower depending on the category \/ post exclusion settings.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">heading<\/td><td class=\"has-text-align-left\" data-align=\"left\">Boolean<\/td><td class=\"has-text-align-left\" data-align=\"left\">Set to 0 to disable the heading specified in <strong>Title of related posts:<\/strong> under <strong>Output options<\/strong>.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">show_author<\/td><td class=\"has-text-align-left\" data-align=\"left\">Integer<\/td><td class=\"has-text-align-left\" data-align=\"left\">Display the author of the post. 1 to display, 0 to hide.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">show_date<\/td><td class=\"has-text-align-left\" data-align=\"left\">Boolean<\/td><td class=\"has-text-align-left\" data-align=\"left\">Display the published date of the post. 1 to display, 0 to hide.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">show_excerpt<\/td><td class=\"has-text-align-left\" data-align=\"left\">Boolean<\/td><td class=\"has-text-align-left\" data-align=\"left\">Display the excerpt of the post. 1 to display, 0 to hide.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">title_length<\/td><td class=\"has-text-align-left\" data-align=\"left\">Integer<\/td><td class=\"has-text-align-left\" data-align=\"left\">Limit the length of titles in the display. This sets the maximum number of characters in the title.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">offset<\/td><td class=\"has-text-align-left\" data-align=\"left\">Integer<\/td><td class=\"has-text-align-left\" data-align=\"left\">Number of posts to displace or pass over.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">post_types<\/td><td class=\"has-text-align-left\" data-align=\"left\">String<\/td><td class=\"has-text-align-left\" data-align=\"left\">Comma-separated list of post types from which to select related posts.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">exclude_post_ids<\/td><td class=\"has-text-align-left\" data-align=\"left\">String<\/td><td class=\"has-text-align-left\" data-align=\"left\">Comma-separated list of post, page or custom post type IDs to exclude from selection.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">thumb_size<\/td><td class=\"has-text-align-left\" data-align=\"left\">String<\/td><td class=\"has-text-align-left\" data-align=\"left\">Name of the thumbnail size to display the related posts. This can be the default WordPress media sizes or any custom size set by a theme or plugin. The default size set by Contextual Related Posts is <code>crp_thumbnail<\/code>.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">thumb_width<\/td><td class=\"has-text-align-left\" data-align=\"left\">Integer<\/td><td class=\"has-text-align-left\" data-align=\"left\">Width of the thumbnail image. This might get overridden if the image of the exact size isn&#8217;t found.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">thumb_height<\/td><td class=\"has-text-align-left\" data-align=\"left\">Integer<\/td><td class=\"has-text-align-left\" data-align=\"left\">Height of the thumbnail image. This might get overridden if the image of the exact size isn&#8217;t found.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">post_thumb_op<\/td><td class=\"has-text-align-left\" data-align=\"left\">String<\/td><td class=\"has-text-align-left\" data-align=\"left\">Location of the post thumbnail. Values: inline, after, text_only, thumbs_only.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">link_nofollow<\/td><td class=\"has-text-align-left\" data-align=\"left\">Boolean<\/td><td class=\"has-text-align-left\" data-align=\"left\">Add nofollow attribute to links. 1 to add, 0 to exclude.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">link_new_window<\/td><td class=\"has-text-align-left\" data-align=\"left\">Boolean<\/td><td class=\"has-text-align-left\" data-align=\"left\">Add _blank attribute to links. 1 to add, 0 to exclude.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">daily_range<\/td><td class=\"has-text-align-left\" data-align=\"left\">Integer<\/td><td class=\"has-text-align-left\" data-align=\"left\">Sets the oldest date of related posts (in days).<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">ordering<\/td><td class=\"has-text-align-left\" data-align=\"left\">String<\/td><td class=\"has-text-align-left\" data-align=\"left\">Options for ordering related posts: relevance, random, date.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">same_post_type<\/td><td class=\"has-text-align-left\" data-align=\"left\">Boolean<\/td><td class=\"has-text-align-left\" data-align=\"left\">Limit to the same post type. 1 to include, 0 to exclude.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">same_author<\/td><td class=\"has-text-align-left\" data-align=\"left\">Boolean<\/td><td class=\"has-text-align-left\" data-align=\"left\">Limit to the same post author. 1 to include, 0 to exclude.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">include_cat_ids<\/td><td class=\"has-text-align-left\" data-align=\"left\">String<\/td><td class=\"has-text-align-left\" data-align=\"left\">Comma-separated list of term_taxonomy_id for categories and custom taxonomies. Related posts will only selected from these taxonomies. If you have an older WordPress install, this might differ from the term_id.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">include_post_ids<\/td><td class=\"has-text-align-left\" data-align=\"left\">String<\/td><td class=\"has-text-align-left\" data-align=\"left\">Comma-separated list of post IDs to always include in the selection.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">display_only_on_tax_ids (pro only)<\/td><td class=\"has-text-align-left\" data-align=\"left\">String<\/td><td class=\"has-text-align-left\" data-align=\"left\">Comma-separated list of term_taxonomy_id for categories and custom taxonomies. Limit the display of the related posts to only these taxonomies. If you have an older WordPress install, this might differ from the term_id.<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Contextual Related Posts includes a shortcode the related posts list. If you&#8217;re not familiar with shortcodes, please read this article in the WordPress Codex. This shortcode lets you insert the contextually related posts anywhere in your post content. It takes the following optional attributes: Parameter Type Description limit Integer Maximum number of posts to return&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":7165,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_wp_convertkit_post_meta":{"form":"-1","landing_page":"","tag":"0","restrict_content":"0"},"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_wzkb_product_ids":[],"_wzkb_section_ids":[],"footnotes":""},"wzkb_product":[138],"wzkb_category":[79],"wzkb_tag":[47,70],"class_list":["post-144","wz_knowledgebase","type-wz_knowledgebase","status-publish","has-post-thumbnail","hentry","wzkb_product-contextual-related-posts","wzkb_category-02-crp-advanced","wzkb_tag-contextual-related-posts","wzkb_tag-shortcode"],"_links":{"self":[{"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/wz_knowledgebase\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/wz_knowledgebase"}],"about":[{"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/types\/wz_knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":4,"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/wz_knowledgebase\/144\/revisions"}],"predecessor-version":[{"id":8052,"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/wz_knowledgebase\/144\/revisions\/8052"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/media\/7165"}],"wp:attachment":[{"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"wzkb_product","embeddable":true,"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/wzkb_product?post=144"},{"taxonomy":"wzkb_category","embeddable":true,"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/wzkb_category?post=144"},{"taxonomy":"wzkb_tag","embeddable":true,"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/webberzone.com\/wp-json\/wp\/v2\/wzkb_tag?post=144"}],"curies":[{"name":"wp","href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/api.w.org\/{rel}","templated":true}]}}