{"id":5189,"date":"2023-04-09T14:39:52","date_gmt":"2023-04-09T02:39:52","guid":{"rendered":"https:\/\/www.zoyinc.com\/?p=5189"},"modified":"2024-04-06T13:57:57","modified_gmt":"2024-04-06T00:57:57","slug":"yarpp-tweaks","status":"publish","type":"post","link":"http:\/\/www.zoyinc.com\/?p=5189","title":{"rendered":"YARPP tweaks"},"content":{"rendered":"\n<p>These are the customizations I made to get &#8220;Yet Another Related Posts Plugin&#8221;, YARPP, doing what I wanted on the Zoyinc site. Bear in mind this is being done for the &#8220;Twenty Twenty-Three&#8221; theme which is &#8220;<em>designed to take advantage of the new design tools introduced in WordPress 6.1<\/em>&#8221; using Gutenberg and blocks.<\/p>\n\n\n\n<p>It is worth noting that there were previously significant issues with performance for YARPP. The plugin was purchased by Jay Meattle and a team of dedicated developers. Apparently they then began optimizing YARPP to a point where there are now apparently no significant performance issues &#8211; see &#8220;YARPP\u2014Yet Another Related Posts Plugin\u2014Now Supported On WP Engine&#8221; from WP Engine <a  href=\"https:\/\/wpengine.com\/blog\/yet-another-related-posts-plugin-now-supported-wp-engine\/\">https:\/\/wpengine.com\/blog\/yet-another-related-posts-plugin-now-supported-wp-engine\/<\/a> and <\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Plugins<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">Install plugins<\/h3>\n\n\n\n<p>Install the following plugins:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>YARPP \u2013 Yet Another Related Posts Plugin&#8221; by YARPP<\/li>\n\n\n\n<li>Advanced File manager by modalweb<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Disable or remove other related posts plugins<\/h3>\n\n\n\n<p>It appears that many of these plugins share the same name for functions and this can cause obvious problems. For this reason I suggest removing or disabling all other &#8220;related posts&#8221; plugins such as &#8220;Custom Related Posts&#8221;, &#8220;WordPress Related Posts Thumbnails&#8221;, and &#8220;Similar Posts&#8221;. For the purposes of this post, I have actually deleted the plugins.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configure YARPP<\/h2>\n\n\n\n<p>Go to &#8220;Dashboard | Settings | YARPP&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"338\" height=\"645\" src=\"https:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-6.png\" alt=\"\" class=\"wp-image-5210\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-6.png 338w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-6-157x300.png 157w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-6-79x150.png 79w\" sizes=\"auto, (max-width: 338px) 100vw, 338px\" \/><\/figure>\n\n\n\n<p>Ensure you disable &#8220;Automatically display related content on&#8221;. By default &#8220;Posts&#8221; will be selected. We will be putting YARPP specifically where we want it. <strong>Remember to Save<\/strong> your changes. It should end up looking like: <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"549\" height=\"77\" src=\"https:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-7.png\" alt=\"\" class=\"wp-image-5211\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-7.png 549w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-7-300x42.png 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-7-150x21.png 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-7-500x70.png 500w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/figure>\n\n\n\n<p>In my case I set the &#8220;Maximum number of posts&#8221; to 4. Note you may also need to set it to 4 on any templates where you use it &#8211; such as the &#8220;Single&#8221; template.<\/p>\n\n\n\n<p>We need to create a custom file, I do this using File Manager, this should go to:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:0.9rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#000000;--cbp-line-number-width:calc(1 * 0.6 * 0.9rem);line-height:1.4rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"\/srv\/www\/zoyinc\/wp-content\/themes\/twentytwentythree\/yarpp-template-zoyinc1.php\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">\/srv\/www\/zoyinc\/wp-content\/themes\/twentytwentythree\/yarpp-template-zoyinc1<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #000000\">php<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Alternatively you can create it in File Manager:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"561\" src=\"https:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-4.png\" alt=\"\" class=\"wp-image-5206\" style=\"width:563px;height:428px\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-4.png 738w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-4-300x228.png 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-4-150x114.png 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/04\/image-4-395x300.png 395w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/figure>\n\n\n\n<p>Then edit it in the File Manager &#8220;Code Editor&#8221;. My file looks like:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:0.9rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#000000;--cbp-line-number-width:calc(2 * 0.6 * 0.9rem);line-height:1.4rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"<?php\n\/*\nYARPP Template: Zoyinc Thumbnails\nDescription: Zoyinc custom YARPP thumbnail to display 'medium' thumnails and subjects. https:\/\/www.zoyinc.com\nAuthor: Zoyinc\nThe tags used in YARPP templates are the same as the template tags used in any WordPress template. In fact, \nany WordPress template tag will work in the YARPP Loop. You can use these template tags to display the excerpt, \nthe post date, the comment count, or even some custom metadata. In addition, template tags from other plugins will also work.\nSpecial template tags which only work within a YARPP Loop:\n1. the_score()\t\t\/\/ this will print the YARPP match score of that particular related post\n2. get_the_score()\t\t\/\/ or return the YARPP match score of that particular related post\nNotes:\n1. If you would like Pinterest not to save an image, add `data-pin-nopin=&quot;true&quot;` to the img tag.\n*\/\n\/\/\n\/\/ Specify the thumbnail size\n\/\/\n$thumbnailWidthPx = get_option('medium_size_w');\n$yarppHeading = &quot;Related&quot;;\n$headingHeight = &quot;40&quot;;\n$headingUnderline = &quot;3&quot;;\n$headingSpacer = &quot;10&quot;;\n$spacerBetweenThumbnails = &quot;20&quot;;\n$titlePadding = &quot;5&quot;;\n$titleBackground = &quot;#f6f6f6&quot;;\n$headerUnderlineColor = &quot;black&quot;;\n$headerUnderlineHeight = &quot;3&quot;;\n$spacerBelowHeader = &quot;25&quot;;\n\/\/ Header, underline and spacer\n?&gt;<div style=&quot;width:<?php print($thumbnailWidthPx); ?&gt;px;height:<?php print($headingHeight); ?&gt;px;border-bottom-color:<?php print($headerUnderlineColor); \n?&gt;;border-bottom-width:<?php print($headerUnderlineHeight); ?&gt;px;padding-bottom:<?php print($titlePadding); ?&gt;px;&quot;&gt;<h4&gt;<?php print($yarppHeading); ?&gt;<\/h4&gt;<\/div&gt;\n<div style=&quot;width:<?php print($thumbnailWidthPx); ?&gt;px;height:<?php print($spacerBelowHeader); ?&gt;px;&quot;&gt;<\/div&gt;\n<?php \nif ( have_posts() ) :\n\t$postsArray = array();\n\twhile ( have_posts() ) :\n\t\tthe_post();\n        \n        \/\/ Thumbnail, title and spacer for each post\n        ?&gt;<div style=&quot;margin:0;&quot;&gt;<a href=&quot;<?php the_permalink(); ?&gt;&quot; rel=&quot;bookmark norewrite&quot; title=&quot;<?php the_title_attribute();  ?&gt;&quot;&gt;<div style=&quot;vertical-align: bottom;&quot;  &gt;<?php \n        the_post_thumbnail( 'medium', array('style' =&gt; 'vertical-align: bottom;') ); ?&gt;<\/div&gt;<div style=&quot;padding:<?php print($titlePadding); ?&gt;px;margin:0px;width:<?php print($thumbnailWidthPx); ?&gt;px;background-color:<?php  print($titleBackground); ?&gt;;&quot;&gt;<?php the_title(); ?&gt;<\/div&gt;<\/div&gt;\n        <div style=&quot;width:<?php print($thumbnailWidthPx); ?&gt;px;height:<?php print($spacerBetweenThumbnails); ?&gt;px;&quot;&gt;<\/div&gt;<\/a&gt;<?php\n\tendwhile;\nendif;\n?&gt;\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">\/*<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">YARPP Template: Zoyinc Thumbnails<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">Description: Zoyinc custom YARPP thumbnail to display &#39;medium&#39; thumnails and subjects. https:\/\/www.zoyinc.com<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">Author: Zoyinc<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">The tags used in YARPP templates are the same as the template tags used in any WordPress template. In fact, <\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">any WordPress template tag will work in the YARPP Loop. You can use these template tags to display the excerpt, <\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">the post date, the comment count, or even some custom metadata. In addition, template tags from other plugins will also work.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">Special template tags which only work within a YARPP Loop:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">1. the_score()\t\t\/\/ this will print the YARPP match score of that particular related post<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">2. get_the_score()\t\t\/\/ or return the YARPP match score of that particular related post<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">Notes:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">1. If you would like Pinterest not to save an image, add `data-pin-nopin=&quot;true&quot;` to the img tag.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">*\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">\/\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">\/\/ Specify the thumbnail size<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">\/\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">$thumbnailWidthPx<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #795E26\">get_option<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&#39;medium_size_w&#39;<\/span><span style=\"color: #000000\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">$yarppHeading<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;Related&quot;<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">$headingHeight<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;40&quot;<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">$headingUnderline<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;3&quot;<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">$headingSpacer<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;10&quot;<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">$spacerBetweenThumbnails<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;20&quot;<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">$titlePadding<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;5&quot;<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">$titleBackground<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;#f6f6f6&quot;<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">$headerUnderlineColor<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;black&quot;<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">$headerUnderlineHeight<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;3&quot;<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">$spacerBelowHeader<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;25&quot;<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">\/\/ Header, underline and spacer<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">?&gt;&lt;div style=<\/span><span style=\"color: #A31515\">&quot;width:&lt;?php print(<\/span><span style=\"color: #001080\">$thumbnailWidthPx<\/span><span style=\"color: #A31515\">); ?&gt;px;height:&lt;?php print(<\/span><span style=\"color: #001080\">$headingHeight<\/span><span style=\"color: #A31515\">); ?&gt;px;border-bottom-color:&lt;?php print(<\/span><span style=\"color: #001080\">$headerUnderlineColor<\/span><span style=\"color: #A31515\">); <\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">?&gt;;border-bottom-width:&lt;?php print(<\/span><span style=\"color: #001080\">$headerUnderlineHeight<\/span><span style=\"color: #A31515\">); ?&gt;px;padding-bottom:&lt;?php print(<\/span><span style=\"color: #001080\">$titlePadding<\/span><span style=\"color: #A31515\">); ?&gt;px;&quot;<\/span><span style=\"color: #000000\">&gt;&lt;h4&gt;&lt;?php <\/span><span style=\"color: #795E26\">print<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">$yarppHeading<\/span><span style=\"color: #000000\">); ?&gt;&lt;\/h4&gt;&lt;\/div&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">&lt;div style=<\/span><span style=\"color: #A31515\">&quot;width:&lt;?php print(<\/span><span style=\"color: #001080\">$thumbnailWidthPx<\/span><span style=\"color: #A31515\">); ?&gt;px;height:&lt;?php print(<\/span><span style=\"color: #001080\">$spacerBelowHeader<\/span><span style=\"color: #A31515\">); ?&gt;px;&quot;<\/span><span style=\"color: #000000\">&gt;&lt;\/div&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">&lt;?php <\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">if<\/span><span style=\"color: #000000\"> ( <\/span><span style=\"color: #795E26\">have_posts<\/span><span style=\"color: #000000\">() ) :<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\t<\/span><span style=\"color: #001080\">$postsArray<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #795E26\">array<\/span><span style=\"color: #000000\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\t<\/span><span style=\"color: #AF00DB\">while<\/span><span style=\"color: #000000\"> ( <\/span><span style=\"color: #795E26\">have_posts<\/span><span style=\"color: #000000\">() ) :<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\t\t<\/span><span style=\"color: #795E26\">the_post<\/span><span style=\"color: #000000\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #008000\">\/\/ Thumbnail, title and spacer for each post<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        ?&gt;&lt;div style=<\/span><span style=\"color: #A31515\">&quot;margin:0;&quot;<\/span><span style=\"color: #000000\">&gt;&lt;a href=<\/span><span style=\"color: #A31515\">&quot;&lt;?php the_permalink(); ?&gt;&quot;<\/span><span style=\"color: #000000\"> rel=<\/span><span style=\"color: #A31515\">&quot;bookmark norewrite&quot;<\/span><span style=\"color: #000000\"> title=<\/span><span style=\"color: #A31515\">&quot;&lt;?php the_title_attribute();  ?&gt;&quot;<\/span><span style=\"color: #000000\">&gt;&lt;div style=<\/span><span style=\"color: #A31515\">&quot;vertical-align: bottom;&quot;<\/span><span style=\"color: #000000\">  &gt;&lt;?php <\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #795E26\">the_post_thumbnail<\/span><span style=\"color: #000000\">( <\/span><span style=\"color: #A31515\">&#39;medium&#39;<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #795E26\">array<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&#39;style&#39;<\/span><span style=\"color: #000000\"> =&gt; <\/span><span style=\"color: #A31515\">&#39;vertical-align: bottom;&#39;<\/span><span style=\"color: #000000\">) ); ?&gt;&lt;\/div&gt;&lt;div style=<\/span><span style=\"color: #A31515\">&quot;padding:&lt;?php print(<\/span><span style=\"color: #001080\">$titlePadding<\/span><span style=\"color: #A31515\">); ?&gt;px;margin:0px;width:&lt;?php print(<\/span><span style=\"color: #001080\">$thumbnailWidthPx<\/span><span style=\"color: #A31515\">); ?&gt;px;background-color:&lt;?php  print(<\/span><span style=\"color: #001080\">$titleBackground<\/span><span style=\"color: #A31515\">); ?&gt;;&quot;<\/span><span style=\"color: #000000\">&gt;&lt;?php <\/span><span style=\"color: #795E26\">the_title<\/span><span style=\"color: #000000\">(); ?&gt;&lt;\/div&gt;&lt;\/div&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        &lt;div style=<\/span><span style=\"color: #A31515\">&quot;width:&lt;?php print(<\/span><span style=\"color: #001080\">$thumbnailWidthPx<\/span><span style=\"color: #A31515\">); ?&gt;px;height:&lt;?php print(<\/span><span style=\"color: #001080\">$spacerBetweenThumbnails<\/span><span style=\"color: #A31515\">); ?&gt;px;&quot;<\/span><span style=\"color: #000000\">&gt;&lt;\/div&gt;&lt;\/a&gt;&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\t<\/span><span style=\"color: #AF00DB\">endwhile<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">endif<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">?&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Once you have created and saved this file switch YARPP to use it:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"836\" height=\"658\" src=\"https:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/05\/image-3.png\" alt=\"\" class=\"wp-image-5252\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/05\/image-3.png 836w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/05\/image-3-300x236.png 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/05\/image-3-150x118.png 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/05\/image-3-768x604.png 768w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2023\/05\/image-3-381x300.png 381w\" sizes=\"auto, (max-width: 836px) 100vw, 836px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Resources<\/h2>\n\n\n\n<p><strong>Developer Resources &#8211; Functions<\/strong><br><a  href=\"https:\/\/developer.wordpress.org\/reference\/functions\/\">https:\/\/developer.wordpress.org\/reference\/functions\/<\/a><\/p>\n\n\n\n<p><strong>YARPP plugin page<\/strong><br><a  href=\"https:\/\/wordpress.org\/plugins\/yet-another-related-posts-plugin\/#installation\">https:\/\/wordpress.org\/plugins\/yet-another-related-posts-plugin\/#installation<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>These are the customizations I made to get &#8220;Yet Another Related Posts Plugin&#8221;, YARPP, doing what I wanted on the Zoyinc site. Bear in mind this is being done for the &#8220;Twenty Twenty-Three&#8221; theme which is &#8220;designed to take advantage of the new design tools introduced in WordPress 6.1&#8221; using Gutenberg and blocks. It is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":5278,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[796,10],"tags":[782,784,182,783,785,297,781],"class_list":["post-5189","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-home-page","category-wordpress","tag-blocks","tag-custom","tag-plugin","tag-template","tag-thumbnail","tag-wordpress","tag-yarpp"],"_links":{"self":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/5189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5189"}],"version-history":[{"count":26,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/5189\/revisions"}],"predecessor-version":[{"id":6135,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/5189\/revisions\/6135"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/media\/5278"}],"wp:attachment":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5189"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}