<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wordpress &#8211; BeatificaBytes</title>
	<atom:link href="https://www.BeatificaBytes.be/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.BeatificaBytes.be</link>
	<description>The Joys of Computing</description>
	<lastBuildDate>Sun, 22 Nov 2020 13:36:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8</generator>
	<item>
		<title>Plugin &#8220;Move WordPress Comment&#8221; not working anymore</title>
		<link>https://www.BeatificaBytes.be/plugin-move-wordpress-comment-not-working-anymore/</link>
					<comments>https://www.BeatificaBytes.be/plugin-move-wordpress-comment-not-working-anymore/#respond</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Sun, 22 Nov 2020 13:36:43 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://www.beatificabytes.be/?p=4864</guid>

					<description><![CDATA[I just noticed that this really great plugin &#8220;Move WordPress Comment&#8221; was failing when trying to move comments. Fortunately, the fix was easy.]]></description>
										<content:encoded><![CDATA[
<p style="text-align: justify;">I just noticed that this really great plugin &#8220;Move WordPress Comment&#8221; was failing when trying to move comments. Fortunately, the fix was easy.</p>
<p style="text-align: justify;"><span class="collapseomatic " id="id69b276a7d329f"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b276a7d329f'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b276a7d329f" class="collapseomatic_content ">
<p style="text-align: justify;">This plugin is very useful when you started a discussion thread (I.e.: you reply on a comment), but the person does not answer on the last comment. Instead, he starts a new comment. In such a case, the plugin can be used to move his last comment under the last reply in the discussion thread;</p>
<p style="text-align: justify;">Example, here under, I could attach the second discussion thread under the last reply of the first discussion thread by typing the id #46705 of that last reply into the &#8220;parent comment&#8221; of the first comment #46719 of the second discussion thread and clicking &#8220;Move&#8221;.</p>
<p style="text-align: justify;"><img decoding="async" class="alignnone wp-image-4867 size-full" src="http://www.beatificabytes.be/wp-content/uploads/2020/11/Pasted-2.png" /></p>
<p style="text-align: justify;">Unfortunately, this plugin is now returning an error &#8220;Uncaught ArgumentCountError: Too few arguments to function wpdb::prepare()&#8221;</p>
<p style="text-align: justify;">The fix is really simple. Go to your WordPress Dashboard, under the menu &#8220;Plugins&#8221; and select the &#8220;Plugin Editor&#8221;.</p>
<p style="text-align: justify;">Next, in the top-right corner, set &#8220;select plugin to edit&#8221; = &#8220;Move WordPress Comment&#8221; and click &#8220;Select&#8221;.</p>
<p style="text-align: justify;">Then, go to line 63 or search for &#8220;prepare&#8221;. This methods requires 2 parameters. So, in the where clauses of the SQL Update statements, replace the variables by %s and move the variables into a second parameters.</p>
<p style="text-align: justify;">It should result into this:</p>
<p style="padding-left: 40px; text-align: justify;"><code>// move to different post</code><br /><code>if ( $postID != $oldpostID ) {</code><br /><code>$wpdb-&gt;query( $wpdb-&gt;prepare( "UPDATE $wpdb-&gt;comments SET comment_post_ID=$postID WHERE comment_ID=%s;", "$commentID") );</code></p>
<p style="padding-left: 40px; text-align: justify;"><code>// Change post count</code><br /><code>$wpdb-&gt;query( $wpdb-&gt;prepare( "UPDATE $wpdb-&gt;posts SET comment_count=comment_count+1 WHERE ID=%s", "$postID" ) );</code><br /><code>$wpdb-&gt;query( $wpdb-&gt;prepare( "UPDATE $wpdb-&gt;posts SET comment_count=comment_count-1 WHERE ID=%s", "$oldpostID" ) );</code><br /><code>}</code></p>
<p style="padding-left: 40px; text-align: justify;"><code>// move to different parent</code><br /><code>if ( $parentID != $commentID ) {</code><br /><code>$wpdb-&gt;query( $wpdb-&gt;prepare( "UPDATE $wpdb-&gt;comments SET comment_parent=$parentID WHERE comment_ID=%s;", "$commentID" ) );</code><br /><code>}</code></p>
<p style="text-align: justify;">Finally, click on &#8220;Update File&#8221;, at the bottom of the Plugin Editor.</p>
<p style="text-align: justify;">Et voilà,</p>
<p style="text-align: justify;"></div>
<div class="pvc_clear"></div><p id="pvc_stats_4864" class="pvc_stats total_only  " data-element-id="4864" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p><div class="pvc_clear"></div>]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/plugin-move-wordpress-comment-not-working-anymore/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Solve a 504 Gateway Time out nginx with WordPress on Synology</title>
		<link>https://www.BeatificaBytes.be/solve-a-504-gateway-time-out-nginx-with-wordpress-on-synology/</link>
					<comments>https://www.BeatificaBytes.be/solve-a-504-gateway-time-out-nginx-with-wordpress-on-synology/#respond</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Sun, 12 Aug 2018 08:44:44 +0000</pubDate>
				<category><![CDATA[Synology]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://www.BeatificaBytes.be/?p=3847</guid>

					<description><![CDATA[Recently, accessing WordPress on my Synology started to result in &#8220;504 Gateway Time out nginx&#8221; errors. I found the solution here.]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify">Recently, accessing WordPress on my Synology started to result in &#8220;504 Gateway Time out nginx&#8221; errors.</p>
<p style="text-align: justify">I found the solution <a href="https://forum.synology.com/enu/viewtopic.php?t=118557" target="_blank" rel="noopener noreferrer">here.</a></p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b276a7d4b18"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b276a7d4b18'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b276a7d4b18" class="collapseomatic_content "></p>
<ol style="text-align: justify">
<li>Open a ssh console using Putty as explained <a href="https://www.beatificabytes.be/launch-a-ssh-console-onto-synology-with-putty/" target="_blank" rel="noopener noreferrer">here</a>.</li>
<li>Enter root mode by typing: sudo -i</li>
<li>cd /etc/nginx/</li>
<li>chown -hR http:http conf.d/</li>
<li>cd conf.d</li>
<li>vi www.WordPress.conf
<ol>
<li>Add: proxy_connect_timeout 600;</li>
<li>Modify: proxy_read_timeout 600;</li>
</ol>
</li>
</ol>
<p style="text-align: justify"></div></p>
<div class="pvc_clear"></div>
<p id="pvc_stats_3847" class="pvc_stats total_only  " data-element-id="3847" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/solve-a-504-gateway-time-out-nginx-with-wordpress-on-synology/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress RewriteRule to &#8220;Redirect&#8221; after moving the blog</title>
		<link>https://www.BeatificaBytes.be/wordpress-rewriterule-to-redirect-after-moving-the-blog/</link>
					<comments>https://www.BeatificaBytes.be/wordpress-rewriterule-to-redirect-after-moving-the-blog/#respond</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Sun, 05 Nov 2017 14:21:34 +0000</pubDate>
				<category><![CDATA[Synology]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://www.BeatificaBytes.be/?p=3646</guid>

					<description><![CDATA[I did reconfigure my Synology Web Stations to access my blog directly at www.beatificabytes.be instead of www.beatificabytes.be/wordpress/. The problem was to redirect next the old pages still [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">I did reconfigure my Synology Web Stations to access my blog directly at www.beatificabytes.be instead of www.beatificabytes.be/wordpress/. The problem was to redirect next the old pages still referenced by google onto their new address. Ex.: www.beatificabytes.be/wordpress/softwares onto www.beatificabytes.be/softwares. Using a RewriteRule did the trick.</p>
<p style="text-align: justify;"><span class="collapseomatic " id="id69b276a7d6617"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b276a7d6617'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b276a7d6617" class="collapseomatic_content "></p>
<p style="text-align: justify;">Concretely, I did configure a Virtual Host in the Web Station</p>
<p style="text-align: justify;"><a href="/wp-content/uploads/2017/11/WebStationVirtualHost.png"><img fetchpriority="high" decoding="async" class="aligncenter wp-image-3647 size-medium" src="/wp-content/uploads/2017/11/WebStationVirtualHost-300x270.png" alt="WebStation VirtualHost" width="300" height="270" /></a></p>
<p style="text-align: justify;">Next, I did reconfigure wordpress&#8217;s wp-config.php by replacing:</p>
<div class="callout" style="text-align: justify;">
<p>define(&#8216;WP_HOME&#8217;,&#8217;/wordpress&#8217;);<br />
define(&#8216;WP_SITEURL&#8217;,&#8217;/wordpress&#8217;);<br />
define(&#8216;WP_SITEURL&#8217;, $pageURL . &#8216;/wordpress&#8217;);</p>
</div>
<p style="text-align: justify;">with:</p>
<div class="callout" style="text-align: justify;">
<p>define(&#8216;WP_HOME&#8217;,&#8217;https://www.BeatificaBytes.be&#8217;);<br />
define(&#8216;WP_SITEURL&#8217;,&#8217;https://www.BeatificaBytes.be&#8217;);<br />
define(&#8216;WP_SITEURL&#8217;, $pageURL&#8217;);</p>
</div>
<p style="text-align: justify;">Finally, I did remove &#8220;/wordpress&#8221; from all URL&#8217;s in my own posts. I didn&#8217;t use a Search &amp; Replace plugin like the &#8220;<a href="https://nl.wordpress.org/plugins/better-search-replace/" target="_blank" rel="noopener noreferrer">Better Search and Replace</a>&#8221; to do the update directly in the database. Instead, I did use the plugin &#8220;<a href="https://wordpress.org/plugins/broken-link-checker/" target="_blank" rel="noopener noreferrer">Broken Link Checker</a>&#8221; to Bulk Edit broken URLs.</p>
<p style="text-align: justify;"><a href="/wp-content/uploads/2017/11/BulkEditBrokenURL.png"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-3648" src="/wp-content/uploads/2017/11/BulkEditBrokenURL-300x142.png" alt="Bulk Edit Broken URL" width="300" height="142" /></a>It took more time but was a much more &#8220;clean&#8221; approach as I only touched for sure broken links. (Notice: This Plugin runs in the background so you need patience for it to get the complete list of broken URLs. What&#8217; really great is that for broken external links, it suggests the replacement by an archived version of the missing pages &#8211; via the WayBack Machine)</p>
<p style="text-align: justify;"><a href="/wp-content/uploads/2017/11/WayBackMachine.png"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-3649" src="/wp-content/uploads/2017/11/WayBackMachine-300x119.png" alt="WayBack Machine" width="300" height="119" /></a></p>
<p>NB.: <a href="http://www.createdbypete.com/articles/simple-way-to-find-broken-links-with-wget/" target="_blank" rel="noopener noreferrer">Here is another nice trick</a> to list all broken URL&#8217;s in a website</p>
<pre class="highlight plaintext"><code>wget --spider -o /var/log/wget.log -e robots=off -w 1 -r -p http://&lt;youraddress&gt;</code></pre>
<p style="text-align: justify;">Finally, I had to redirect all old pages still referenced on Google to their new location. The obvious solution was to use a RewriteRule to be added in the .htaccess file used by WordPress (In my case, in /var/services/web/wordpress/.htaccess). Unfortunately, it took me hours to find the trick as, instead of reading the whole apache&#8217;s RewriteEngine documentation, I tried to figure out myself how to do it, based on samples found on the web.</p>
<p style="text-align: justify;">Finally, I read these french documentations:</p>
<ul style="text-align: justify;">
<li><a href="https://craym.eu/tutoriels/referencement/url_rewriting.html" target="_blank" rel="noopener noreferrer">URL Rewriting</a></li>
<li><a href="https://craym.eu/tutoriels/referencement/variables_url_rewriting.html#REQUEST_URI" target="_blank" rel="noopener noreferrer">Variables used in URL Rewriting</a></li>
<li><a href="https://craym.eu/tutoriels/referencement/flag_url_rewriting.html#l" target="_blank" rel="noopener noreferrer">Flags used in URL Rewritting</a></li>
</ul>
<p style="text-align: justify;">And it&#8217;s only by reading the documentation about the flag that I understood the need to use the special flag [R] (I already tried at least more than 20 various rules before understanding I had to specify the flag R(edirect)&#8230;)</p>
<p style="text-align: justify;">So, here it is: RewriteRule ^wordpress/(.*)$ /$1 [R,L]</p>
<ul style="text-align: justify;">
<li>Match any path starting with &#8220;wordpress/&#8221; and followed by &#8220;anything else&#8221;</li>
<li>Replace it with the part matching &#8220;anything else&#8221;</li>
<li>And if a match was found, do a R(edirect) and this was the L(ast) rule to apply (i.e.: stop).</li>
</ul>
<p style="text-align: justify;">I didn&#8217;t change anything else. Also, changes in the .htaccess are taken into account immediately, without the need to restart the WebStation.</p>
<div class="callout" style="text-align: justify;">
<p># Synology PHP<br />
AddHandler default-handler .htm .html .shtml<br />
AddHandler php-fastcgi .php<br />
AddType text/html .php<br />
Action php-fastcgi /php56-fpm-handler.fcgi<br />
# Synology PHP</p>
<p># BEGIN WordPress<br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteBase /<br />
<span style="color: #ff0000;"><strong>RewriteRule ^wordpress/(.*)$ /$1 [R,L]</strong></span><br />
RewriteRule ^index\.php$ &#8211; [L]<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]<br />
&lt;/IfModule&gt;</p>
<p># END WordPress</p>
</div>
<p style="text-align: justify;">Et voilà.</p>
<p>NB.: <a href="https://htaccess.madewithlove.be/" target="_blank" rel="noopener noreferrer">Here is a useful website</a> to test online .htaccess RewriteRule&#8217;s</p>
<p style="text-align: justify;"></div></p>
<div class="pvc_clear"></div>
<p id="pvc_stats_3646" class="pvc_stats total_only  " data-element-id="3646" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/wordpress-rewriterule-to-redirect-after-moving-the-blog/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Display standard quotes in a WordPress post</title>
		<link>https://www.BeatificaBytes.be/display-standard-quotes-in-a-wordpress-post/</link>
					<comments>https://www.BeatificaBytes.be/display-standard-quotes-in-a-wordpress-post/#respond</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Thu, 03 Aug 2017 15:34:20 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://www.BeatificaBytes.be/wordpress/?p=2988</guid>

					<description><![CDATA[Single and double quotes typed in a post are displayed by WordPress as directionnal quotes: &#8216;blabla&#8217; or &#8220;blabla&#8221; (I.e.: left/right single/double quotes). This becomes an [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify">Single and double quotes typed in a post are displayed by WordPress as <em>directionnal</em> quotes: &#8216;blabla&#8217; or &#8220;blabla&#8221; (I.e.: left/right single/double quotes). This becomes an issue when publishing &#8220;shell scripts&#8221; samples to be copy/pasted. The solution is to type &#8220;encoded quotes&#8221;. Ex.: &amp; #39; for &#039; or &amp; #34; for &#034; (without the blanks between &amp; and #).</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b276a7d8449"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b276a7d8449'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b276a7d8449" class="collapseomatic_content "><br />
This is due to the WordPress converting <em>Straight</em> <em>Quotes</em> to <em>Pretty Quotes</em>&#8230; a feature also named <em>Smart Quotes</em> and due to a filter running in WordPress: the &#8220;wptexturize&#8221;.</p>
<p>Here after, an example I used to post to illustrate how to send custom notifications from a script running on a Synology. The code was directly copy/pasted here from a shell script opened within Notepad++ (where the quotes appeared as &amp;#39 and &amp;#34).</p>
<div class="callout" style="text-align: justify">
<p>/usr/syno/bin/synonotify Tag_Name &#8216;{&#8220;[%VAR1%]&#8221;: &#8220;value1&#8221;, &#8220;[%VAR2%]&#8221;: &#8220;value2&#8221;}&#8217;</p>
</div>
<p>As you can see above, the single and double quotes are displayed by WordPress as symbols: &#8216;&#8230;&#8217; and &#8220;&#8230;&#8221;.</p>
<p>The problem is that readers who copied/pasted as-is this sample in their script got execution errors. Indeed, a &#8216; and a &amp;#39 are not interpreted the same way within a shell.</p>
<p>To solve this issue, I did replace all &#8216; and &#8221; respectively by &amp; #39 and &amp; #34 (without the blanks between &amp; and #). I don&#8217;t use the menu Insert &gt; Special Character as</p>
<p>Another option would be to disable the &#8220;pretty-fication&#8221; feature&#8230; This can be done by opening up your theme&#8217;s functions.php file and pasting the following code at the bottom right before the closing ?&gt; PHP tag:</p>
<div>
<pre>remove_filter('the_content', 'wptexturize');</pre>
</div>
<p style="padding-left: 30px">Notice that Quotes in preformatted text (as here just above) are not replaced by <em>Smart Quotes.</em> But one one side, this can&#8217;t be used on Quotes typed inline, and on the other side, I don&#8217;t use preformatted text for my code samples&#8230;</p>
<p>Yet another option would be to use a plugin like the <a href="https://wordpress.org/plugins/smart-quote-fixer" target="_blank" rel="noopener">Smart Quote Fixer</a> to remove the Smart Quotes.</p>
<p>But I prefer to use type the num codes as I don&#8217;t want to disable <em>Smart Quotes</em> on the complete post&#8230;</p>
<p style="text-align: justify"></div></p>
<div class="pvc_clear"></div>
<p id="pvc_stats_2988" class="pvc_stats total_only  " data-element-id="2988" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/display-standard-quotes-in-a-wordpress-post/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Open WordPress&#8217; Media in a floating popup instead of the current window</title>
		<link>https://www.BeatificaBytes.be/open-wordpress-media-in-a-floating-popup-instead-of-the-current-window/</link>
					<comments>https://www.BeatificaBytes.be/open-wordpress-media-in-a-floating-popup-instead-of-the-current-window/#respond</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Thu, 31 Dec 2015 20:46:27 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">/wordpress/?p=2497</guid>

					<description><![CDATA[When one clicked on a picture in my WordPress blog, inserted as a Media with the standard &#8220;Add Media&#8221; button, it was opened in the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify">When one clicked on a picture in my WordPress blog, inserted as a Media with the standard &#8220;Add Media&#8221; button, it was opened in the current window. To open it into a floating popup windows without modifying anything (code or theme), I simply used the plugin &#8220;<a href="http://status301.net/wordpress-plugins/easy-fancybox/" target="_blank" rel="noopener noreferrer">Easy FancyBox</a>&#8220;.</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b276a7d9b70"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b276a7d9b70'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b276a7d9b70" class="collapseomatic_content "></p>
<p style="text-align: justify">All supported media are automatically handled by the plugin and opened in a smooth overlay.</p>
<p style="text-align: justify">With the plugin installed (using its default settings):</p>
<p><figure id="attachment_2498" aria-describedby="caption-attachment-2498" style="width: 300px" class="wp-caption aligncenter"><a href="https://www.beatificabytes.be/wp-content/uploads/2015/12/SampleOpenInPopup.png" rel="attachment wp-att-2498"><img loading="lazy" decoding="async" class="size-medium wp-image-2498" src="https://www.beatificabytes.be/wp-content/uploads/2015/12/SampleOpenInPopup-300x200.png" alt="Sample Open In Popup" width="300" height="200" /></a><figcaption id="caption-attachment-2498" class="wp-caption-text">Sample Open In Popup</figcaption></figure></p>
<p style="text-align: justify">Without the plugin (the plugin can be disabled by adding this in the &lt;a href&gt; tag: class=&#8221;nofancybox&#8221;):</p>
<p><figure id="attachment_2499" aria-describedby="caption-attachment-2499" style="width: 300px" class="wp-caption aligncenter"><a class="nofancybox" href="https://www.beatificabytes.be/wp-content/uploads/2015/12/SampleOpenInWindow.png" rel="attachment wp-att-2499"><img loading="lazy" decoding="async" class="size-medium wp-image-2499" src="https://www.beatificabytes.be/wp-content/uploads/2015/12/SampleOpenInWindow-300x200.png" alt="Sample Open In Window" width="300" height="200" /></a><figcaption id="caption-attachment-2499" class="wp-caption-text">Sample Open In Window</figcaption></figure></p>
<p>&nbsp;</p>
<p>All the details on <a href="https://wordpress.org/plugins/easy-fancybox/" target="_blank" rel="noopener noreferrer">https://wordpress.org/plugins/easy-fancybox</a></p>
<p style="text-align: justify"></div></p>
<div class="pvc_clear"></div>
<p id="pvc_stats_2497" class="pvc_stats total_only  " data-element-id="2497" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/open-wordpress-media-in-a-floating-popup-instead-of-the-current-window/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Run &#8220;Use Google Libraries&#8221; and &#8220;Root Relative URLs&#8221; plugins for WordPress Side by side</title>
		<link>https://www.BeatificaBytes.be/run-use-google-libraries-and-root-relative-urls-plugins-for-wordpress-side-by-side/</link>
					<comments>https://www.BeatificaBytes.be/run-use-google-libraries-and-root-relative-urls-plugins-for-wordpress-side-by-side/#respond</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Sat, 26 Jul 2014 21:43:59 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">/wordpress/?p=1785</guid>

					<description><![CDATA[I recently tried to install the plugin &#8220;Use Google Libraries&#8221; for WordPress but it didn&#8217;t work because all its URLs where rewritten by the plugin [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify">I recently tried to install the plugin &#8220;Use Google Libraries&#8221; for WordPress but it didn&#8217;t work because all its URLs where rewritten by the plugin &#8220;Root Relative URLs&#8221;. This can be solved with a black list url&#8230;</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b276a7db4c3"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b276a7db4c3'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b276a7db4c3" class="collapseomatic_content "></p>
<p style="text-align: justify">Concretely, the plugin &#8220;Use Google Libraries&#8221; uses URLs like  src=&#8217;//ajax.googleapis.com/ajax/libs/&#8230;&#8217;. Those were rewritten by mistake into src=&#8217;/ajax/libs/&#8230;&#8217;</p>
<p style="text-align: justify">I couldn&#8217;t disable the plugin &#8220;Root Relative URLs&#8221; as it&#8217;s the only way to make my blog accessible seamlessly from both internet and my intranet, using either the netbios name of my NAS, its IP or its dynamic DNS name.</p>
<p style="text-align: justify">So, I tried to add //ajax.googleapis.com in the &#8220;black list urls&#8221; of  &#8220;Root Relative URLs&#8221;. Those can be set in the Dashboard &gt; Settings &gt; General &gt; (scroll to the bottom) &#8220;<label for="emc2_blacklist_urls">Root Relative Blacklist URLs&#8221;.</label></p>
<p style="text-align: justify">Unfortunately it didn&#8217;t work&#8230; Until Hube2, who wrote <a title="Hack of Root Relative URLs" href="https://github.com/Hube2/root-relative-urls" target="_blank" rel="noopener">a hack of &#8220;Root Relative URLs&#8221;</a>, told me how to set it correctly: one may not use the domain name in the black listed URL&#8217;s.</p>
<p style="text-align: justify">Conclusion, in my case, I had to black list &#8220;ajax/libs&#8221;, et voilà!</p>
<p style="text-align: justify"></div></p>
<div class="pvc_clear"></div>
<p id="pvc_stats_1785" class="pvc_stats total_only  " data-element-id="1785" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/run-use-google-libraries-and-root-relative-urls-plugins-for-wordpress-side-by-side/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Modal Popups don&#8217;t open anymore within WordPress 3.8.2&#8217;s Visual Editor</title>
		<link>https://www.BeatificaBytes.be/modal-popups-dont-open-anymore-within-wordpress-3-8-2s-visual-editor/</link>
					<comments>https://www.BeatificaBytes.be/modal-popups-dont-open-anymore-within-wordpress-3-8-2s-visual-editor/#comments</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Sat, 26 Jul 2014 21:16:04 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">/wordpress/?p=1779</guid>

					<description><![CDATA[Since a few months, I couldn&#8217;t &#8220;Add Media&#8221; or &#8220;Insert/Edit Link&#8221; anymore within the Visual Editor of my WordPress, when editing existing Posts. Everything was [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify">Since a few months, I couldn&#8217;t &#8220;Add Media&#8221; or &#8220;Insert/Edit Link&#8221; anymore within the Visual Editor of my WordPress, when editing existing Posts. Everything was however working fine when creating new Posts&#8230; According to me, it is due to the use of a too recent version of ajax/jQuery, not compatible/conflicting with WordPress 3.8.2&#8217;s libraries. I found indeed some plugins recently updated/installed that had to be removed to solve the problem.</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b276a7dcb65"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b276a7dcb65'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b276a7dcb65" class="collapseomatic_content "></p>
<p style="text-align: justify">Concretely, Modal Popups didn&#8217;t open anymore&#8230;</p>
<p style="text-align: justify">I didn&#8217;t get time to investigate that issue before this week-end. But it took me only a few minutes to discover that everything was working again when disabling the plugin Akismet 3.0.0 (updated by the way from 2.5.9 a few months ago).</p>
<p style="padding-left: 30px;text-align: justify">Instead of disabling all the plugins and re-enabling them one by one, I did compare the html source of the pages used to create a new Post and to edit an existing Post (As the problem only occurred when editing). I noticed immediately that the main difference was the inclusion of some Akismet&#8217;s javascripts. Reason why I tried first to disable that plugin&#8230;. and Bingo!</p>
<p style="text-align: justify">As suggested on WordPress&#8217; forum, I tried to installed the plugin &#8220;Use Google Libraries&#8221;. But it didn&#8217;t solve the problem. Actually, using that plugin while Akismet is disabled also results in Modal Popups not opening&#8230;</p>
<p style="text-align: justify">When the problem occurs, there are errors logged in the Chrome&#8217;s developer Console (F12 &gt; tab &#8220;Console&#8221;) : Uncaught TypeError: undefined is not a function. This error occurs in scripts from jquery-ui.min.js</p>
<p style="text-align: justify">So, IMO, both &#8220;Use Google Libraries&#8221; and &#8220;Akismet&#8221; use a too recent version of ajax/jquery for WordPress 3.8.2. But as I didn&#8217;t want to upgrade to WordPress 3.9 or 4.0 beta (as long as Synology don&#8217;t provide its own package) I did simply rollback to Akismet 2.5.9. I had fortunately a backup&#8230; And did uninstall &#8220;Use Google Libraries&#8221;&#8230; Et voilà !</p>
<p style="text-align: justify"></div></p>
<div class="pvc_clear"></div>
<p id="pvc_stats_1779" class="pvc_stats total_only  " data-element-id="1779" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/modal-popups-dont-open-anymore-within-wordpress-3-8-2s-visual-editor/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress: Create a page of Posts</title>
		<link>https://www.BeatificaBytes.be/create-a-page-of-posts-in-wordpress/</link>
					<comments>https://www.BeatificaBytes.be/create-a-page-of-posts-in-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Sun, 29 Sep 2013 20:24:02 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">/wordpress/?p=1217</guid>

					<description><![CDATA[I don&#8217;t use menus that simply display all posts from one category as one can do using a custom menu (to be created via the Dashboard [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify">I don&#8217;t use menus that simply display all posts from one category as one can do using <a title="Custom Menu in WordPress" href="https://www.beatificabytes.be/wordpress-sort-items-in-the-header-using-a-custom-menu/" target="_blank" rel="noopener noreferrer">a custom menu</a> (to be created via the Dashboard &gt; Appearance &gt; Menus). Instead, I use pages with a &#8220;custom Template&#8221; that displays such post with futher flexibility.</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b276a7de4e1"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b276a7de4e1'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b276a7de4e1" class="collapseomatic_content "></p>
<ol style="text-align: justify">
<li>Create a new &#8220;<a title="Page Templates" href="https://developer.wordpress.org/themes/basics/page-templates/" target="_blank" rel="noopener noreferrer">Page Template</a>&#8221; (a php file) named &#8220;page-of-post.php&#8221; and save that one into the root folder of your theme if not yet available: \\&lt;<em>YourSynology</em>&gt;\web\wordpress\wp-content\themes\&lt;<em>YourTheme</em>&gt;\</li>
<li>In this page Template, you should have the code provided at the bottom of this post.</li>
<li>Go to the &#8220;Dashboard&#8221; &gt; &#8220;Pages&#8221;, and click &#8220;Add New&#8221; to create a blank page.</li>
<li>Type a name for your page. This name will be displayed in the menu (Header).</li>
<li>In the &#8220;Page Attributes&#8221; pane, select &#8220;Page of Post&#8221; as a &#8220;Template&#8221; for the new page.</li>
<li>Publish the page</li>
<li>Add now that page to the Custom Menu (via the Dashboard &gt; Appearance &gt; Menus).</li>
<li>Finally, possibly create one &#8220;Category Sticky&#8221; post which will stay at the bottom of the page and introduce the topic (E.g.: when creating a post, add a category in the &#8220;Category Sticky&#8221; pane made available via the Plugin &#8220;Category Sticky Posts&#8221; 0.13 of  Brian Zeligson)</li>
</ol>
<p style="text-align: justify">Here is the code of the page Template. Pay attention that I am using the theme &#8216;twentyeleven&#8217;:</p>
<p>[code language=&#8221;php&#8221;]<br />
&lt;?php<br />
/*<br />
Template Name: Page Of Posts<br />
*/</p>
<p>// if you are not using this in a child of Twenty Eleven, you need to replicate the html structure of your own theme.</p>
<p>get_header(); ?&gt;</p>
<p>	&lt;div id=&quot;primary&quot;&gt;<br />
		&lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;</p>
<p>		&lt;?php<br />
			$slug = basename(get_permalink());<br />
			$paged = (get_query_var(&#8216;paged&#8217;)) ? get_query_var(&#8216;paged&#8217;) : 1;<br />
			$args= array(<br />
				&#8216;category_name&#8217; =&gt; $slug, // Change these category SLUGS to suit your use. Ex.: &quot;categ1, categ2&quot;<br />
				&#8216;paged&#8217; =&gt; $paged<br />
			);<br />
			query_posts($args);</p>
<p>			$category = get_category_by_slug($slug);<br />
			if(empty($category))<br />
				$name = $slug;<br />
			else<br />
				$name = $category-&gt;name;<br />
			if( have_posts() ) :?&gt;</p>
<p>				&lt;?php twentyeleven_content_nav( &#8216;nav-above&#8217; ); ?&gt;</p>
<p>				&lt;?php /* Start the Loop */ ?&gt;<br />
				&lt;?php while ( have_posts() ) : the_post(); ?&gt;</p>
<p>					&lt;?php get_template_part( &#8216;content&#8217;, get_post_format() ); ?&gt;</p>
<p>				&lt;?php endwhile; ?&gt;</p>
<p>				&lt;?php twentyeleven_content_nav( &#8216;nav-below&#8217; ); ?&gt;</p>
<p>			&lt;?php else : ?&gt;</p>
<p>				&lt;article id=&quot;post-0&quot; class=&quot;post no-results not-found&quot;&gt;<br />
					&lt;header class=&quot;entry-header&quot;&gt;<br />
						&lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php _e( &#8216;Nothing Found in the Category &quot;&#8217;.$name.&#8217;&quot;&#8217;, &#8216;twentyeleven&#8217; ); ?&gt;&lt;/h1&gt;<br />
					&lt;/header&gt;&lt;!&#8211; .entry-header &#8211;&gt;</p>
<p>					&lt;div class=&quot;entry-content&quot;&gt;<br />
						&lt;p&gt;&lt;?php _e( &#8216;Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.&#8217;, &#8216;twentyeleven&#8217; ); ?&gt;&lt;/p&gt;<br />
						&lt;?php get_search_form(); ?&gt;<br />
					&lt;/div&gt;&lt;!&#8211; .entry-content &#8211;&gt;<br />
				&lt;/article&gt;&lt;!&#8211; #post-0 &#8211;&gt;</p>
<p>			&lt;?php endif; ?&gt;</p>
<p>			&lt;/div&gt;&lt;!&#8211; #content &#8211;&gt;<br />
		&lt;/div&gt;&lt;!&#8211; #primary &#8211;&gt;</p>
<p>&lt;?php get_sidebar(); ?&gt;<br />
&lt;?php get_footer(); ?&gt;<br />
[/code]</p>
<p style="text-align: justify"></div></p>
<div class="pvc_clear"></div>
<p id="pvc_stats_1217" class="pvc_stats total_only  " data-element-id="1217" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/create-a-page-of-posts-in-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress: Sort items in the Header using a Custom Menu</title>
		<link>https://www.BeatificaBytes.be/wordpress-sort-items-in-the-header-using-a-custom-menu/</link>
					<comments>https://www.BeatificaBytes.be/wordpress-sort-items-in-the-header-using-a-custom-menu/#respond</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Sun, 29 Sep 2013 19:57:02 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">/wordpress/?p=1209</guid>

					<description><![CDATA[So far, I didn&#8217;t configure anything special in WordPress to get my &#8220;Home&#8221; menu and my various &#8220;pages&#8221; displayed in the header. I only had [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">So far, I didn&#8217;t configure anything special in WordPress to get my &#8220;Home&#8221; menu and my various &#8220;pages&#8221; displayed in the header. I only had to customize WordPress to <a title="Add a dropdown menu with Categories" href="https://www.beatificabytes.be/add-categories-as-dropdown-menu-in-wordpress-navigation-bar/" target="_blank" rel="noopener noreferrer">display a dropdow menu &#8220;Categories&#8221;</a>. But to sort those items, I add to create a menu via the &#8220;Dashboard&#8221; &gt; &#8220;Appearance&#8221; Menu.</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b276a7dfd06"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b276a7dfd06'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b276a7dfd06" class="collapseomatic_content "></p>
<ol style="text-align: justify;">
<li>Go to the &#8220;Dashboard&#8221;, open &#8220;Appearance&#8221; and select &#8220;Menus&#8221;.</li>
<li>Create a new Menu. The name of that menu won&#8217;t be displayed in the blog</li>
<li>Select that menu as &#8220;primary menu&#8221; in the &#8220;Theme locations&#8221; pane.</li>
<li>Add the &#8220;Home&#8221; entry in that menu. It&#8217;s available in the &#8220;Pages&#8221; pane &gt; &#8220;View all&#8221;</li>
<li>Add other &#8220;Pages&#8221; and &#8220;Categories&#8221;.</li>
<li>Sort them according to your needs.</li>
</ol>
<p>Notice that using this feature, it&#8217;s easy to create one entry for each category. I don&#8217;t use this tip however to display all posts from one category. Instead, I create <a title="Page of Posts" href="https://www.beatificabytes.be/create-a-page-of-posts-in-wordpress/" target="_blank" rel="noopener noreferrer">a custom page that displays only those posts</a>. Doing so, I can customize further the display.</p>
<p style="text-align: justify;"></div></p>
<div class="pvc_clear"></div>
<p id="pvc_stats_1209" class="pvc_stats total_only  " data-element-id="1209" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/wordpress-sort-items-in-the-header-using-a-custom-menu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress: exclude categories from the Home Page</title>
		<link>https://www.BeatificaBytes.be/wordpress-exclude-categories-from-the-home-page/</link>
					<comments>https://www.BeatificaBytes.be/wordpress-exclude-categories-from-the-home-page/#respond</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Sun, 29 Sep 2013 19:41:04 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">/wordpress/?p=1196</guid>

					<description><![CDATA[I don&#8217;t want my posts from categories &#8220;Softwares&#8221; and &#8220;Wishlist&#8221; to appear in the main thread of my blog. In the past, I had to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">I don&#8217;t want my posts from categories &#8220;Softwares&#8221; and &#8220;Wishlist&#8221; to appear in the main thread of my blog. In the past, I had to add some code in the &#8220;functions.php&#8221; page of my theme (twentyeleven) to filter that posts from the home page. Now, I am using the plugin &#8220;WP Exclude From Homepage 1.1.2&#8221;.</p>
<p style="text-align: justify;"><span class="collapseomatic " id="id69b276a7e12d3"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b276a7e12d3'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b276a7e12d3" class="collapseomatic_content "><br />
The code I used to add in \\&lt;<em>YourSynology</em>&gt;\web\wordpress\wp-content\themes\&lt;<em>YourTheme</em>&gt;\function.php was:</p>
<p>[code language=&#8221;php&#8221;]</p>
<p>/**<br />
* Excludes post in category &quot;softwares&quot; from the home page<br />
*/<br />
function exclude_cat_from_home($query) {<br />
if ( $query-&gt;is_home) {</p>
<p>$acats = array();<br />
foreach ( array(&#8216;wishlist&#8217;,&#8217;softwares&#8217;) as $catName ) {<br />
$cat = get_category_by_slug( $catName );<br />
$acats[] = &#8216;-&#8216;.$cat-&gt;cat_ID;<br />
}<br />
$cats = join(&#8216;,&#8217;, $acats);<br />
$query-&gt; set(&#8216;cat&#8217;,$cats);<br />
}</p>
<p>return $query;<br />
}<br />
add_filter(&#8216;pre_get_posts&#8217;,&#8217;exclude_cat_from_home&#8217;);</p>
<p>[/code]</p>
<p style="text-align: justify;">It was located at the very bottom of the file</p>
<p style="text-align: justify;"></div></p>
<div class="pvc_clear"></div>
<p id="pvc_stats_5318" class="pvc_stats total_only  " data-element-id="5318" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/wordpress-exclude-categories-from-the-home-page/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
