<?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; SeoStack</title>
	<atom:link href="https://www.seostack.net/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.seostack.net</link>
	<description>SEO, Blogging, Affiliate Marketing, Wordpress and more</description>
	<lastBuildDate>Thu, 16 Jul 2020 10:00:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.3.2</generator>
	<item>
		<title>How to boost PageSpeed score of your wordpress blog in 2020</title>
		<link>https://www.seostack.net/boost-pagespeed-score-in-wordpress/</link>
					<comments>https://www.seostack.net/boost-pagespeed-score-in-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Thu, 16 Jul 2020 09:42:04 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://www.seostack.net/?p=682</guid>

					<description><![CDATA[Faster Load Time is good for SEO Having a fast loading website with a good pagespeed score is essential for good seo. It is not a ranking factor that is going to increase your rankings, but is a technical requirement so that visitors don&#8217;t have to wait too long for your website to load. If... <span class="read-more"><a href="https://www.seostack.net/boost-pagespeed-score-in-wordpress/">Read More &#187;</a></span>]]></description>
										<content:encoded><![CDATA[<h3>Faster Load Time is good for SEO</h3>
<p>Having a fast loading website with a good pagespeed score is essential for good seo. It is not a ranking factor that is going to increase your rankings, but is a technical requirement so that visitors don&#8217;t have to wait too long for your website to load.</p>
<p><a href="http://www.seostack.net/blog/wp-content/uploads/2020/07/pagespeed-insights-score.jpg"><img decoding="async" fetchpriority="high" src="http://www.seostack.net/blog/wp-content/uploads/2020/07/pagespeed-insights-score-640x347.jpg" alt="" width="640" height="347" class="aligncenter size-post-body wp-image-777" srcset="https://www.seostack.net/blog/wp-content/uploads/2020/07/pagespeed-insights-score-640x347.jpg 640w, https://www.seostack.net/blog/wp-content/uploads/2020/07/pagespeed-insights-score-300x163.jpg 300w, https://www.seostack.net/blog/wp-content/uploads/2020/07/pagespeed-insights-score-1024x555.jpg 1024w, https://www.seostack.net/blog/wp-content/uploads/2020/07/pagespeed-insights-score-768x416.jpg 768w, https://www.seostack.net/blog/wp-content/uploads/2020/07/pagespeed-insights-score-250x135.jpg 250w, https://www.seostack.net/blog/wp-content/uploads/2020/07/pagespeed-insights-score.jpg 1425w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p>If you are running a wordpress blog, then its easy to boost your pagespeed score easily by installing a few plugins and some extra tweaks.</p>
<h3>1. Install the Autoptimize Plugin</h3>
<p><a href="https://wordpress.org/plugins/autoptimize/" rel="noopener noreferrer" target="_blank">Autoptimize</a> is one of the most popular and widely used plugin for website performance optimisation and the best part is that its completely free for basic usage.</p>
<p><b>The Autoptimize plugin will do the following things:</b></p>
<ul>
<li>Combine and minify CSS</li>
<li>Combine and minify JS</li>
<li>Combine and optimise loading of Google Fonts</li>
<li>Lazy load images</li>
</ul>
<p><a href="http://www.seostack.net/blog/wp-content/uploads/2020/07/autoptimize-plugin.jpg"><img decoding="async" src="http://www.seostack.net/blog/wp-content/uploads/2020/07/autoptimize-plugin-640x347.jpg" alt="Autoptimize plugin" width="640" height="347" class="aligncenter size-post-body wp-image-764" srcset="https://www.seostack.net/blog/wp-content/uploads/2020/07/autoptimize-plugin-640x347.jpg 640w, https://www.seostack.net/blog/wp-content/uploads/2020/07/autoptimize-plugin-300x163.jpg 300w, https://www.seostack.net/blog/wp-content/uploads/2020/07/autoptimize-plugin-1024x555.jpg 1024w, https://www.seostack.net/blog/wp-content/uploads/2020/07/autoptimize-plugin-768x416.jpg 768w, https://www.seostack.net/blog/wp-content/uploads/2020/07/autoptimize-plugin-250x135.jpg 250w, https://www.seostack.net/blog/wp-content/uploads/2020/07/autoptimize-plugin.jpg 1425w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p>Now thats a ton of optimisation alread. Your website shall see a significant boost in pagespeed score just from this one plugin alone.</p>
<h3>2. Install a caching plugin</h3>
<p>A caching plugin will prepare and serve all pages from cache, reducing the server response time. There are actually multiple caching plugins available and each one has a slightly different set of features, but all of them do the same basic things.</p>
<p>I use WP Fastest Cache on many of my blogs and it works great. It has both a free and paid version but the free version works great for basic caching and is sufficient for most websites.</p>
<p><img decoding="async" src="http://www.seostack.net/blog/wp-content/uploads/2020/07/wp-fastest-cache-plugin.jpg" alt="WP Fastest Cache Plugin" width="1425" height="772" class="aligncenter size-full wp-image-759" srcset="https://www.seostack.net/blog/wp-content/uploads/2020/07/wp-fastest-cache-plugin.jpg 1425w, https://www.seostack.net/blog/wp-content/uploads/2020/07/wp-fastest-cache-plugin-300x163.jpg 300w, https://www.seostack.net/blog/wp-content/uploads/2020/07/wp-fastest-cache-plugin-1024x555.jpg 1024w, https://www.seostack.net/blog/wp-content/uploads/2020/07/wp-fastest-cache-plugin-768x416.jpg 768w, https://www.seostack.net/blog/wp-content/uploads/2020/07/wp-fastest-cache-plugin-250x135.jpg 250w, https://www.seostack.net/blog/wp-content/uploads/2020/07/wp-fastest-cache-plugin-640x347.jpg 640w" sizes="(max-width: 1425px) 100vw, 1425px" /></p>
<p>There are lots of free caching plugins available for wordpress and some of the popular ones are :</p>
<ul>
<li>1. <a href="https://wordpress.org/plugins/litespeed-cache/" rel="noopener noreferrer" target="_blank">Litespeed Cache</a></li>
<li>2. <a href="https://wordpress.org/plugins/w3-total-cache/" rel="noopener noreferrer" target="_blank">WP Total Cache</a></li>
<li>3. <a href="https://wordpress.org/plugins/wp-super-cache/" rel="noopener noreferrer" target="_blank">WP Super Cache</a></li>
<li>4. <a href="https://wordpress.org/plugins/comet-cache/" rel="noopener noreferrer" target="_blank">Comet Cache</a></li>
</ul>
<p>Get any one of those and you are good to go. The set of features of different plugins varies. Some caching plugins support js/css minification while some don&#8217;t.</p>
<p>If you are using Autoptimize for minifying css and js you don&#8217;t need to use this feature from a cache plugin.</p>
<h3>3. Increase the expiry time of static resources (browser caching)</h3>
<p>Set the expiry time to 6 months or more. There are different ways to do it on different server setup. We shall talk about 3 typical scenarios, apache, nginx and cloudflare.</p>
<p>On apache (most cpanel hostings use this) you need to add directives to the .htaccess file. This is applicable on hostings like Bluehost, Hostgator, A2 hosting and all similar cPanel based shared hosting providers.</p>
<p><b>.htaccess code for browser caching</b></p>
<pre class="source-code" >&lt;IfModule mod_expires.c&gt;
        ExpiresActive on
        ExpiresDefault                                    &quot;access plus 3 month&quot;

    # CSS
        ExpiresByType text/css                            &quot;access plus 1 year&quot;

    # Data interchange
        ExpiresByType application/json                    &quot;access plus 0 seconds&quot;
        ExpiresByType application/xml                     &quot;access plus 0 seconds&quot;
        ExpiresByType text/xml                            &quot;access plus 0 seconds&quot;

    # Favicon (cannot be renamed!)
        ExpiresByType image/x-icon                        &quot;access plus 3 week&quot;

    # HTML components (HTCs)
        ExpiresByType text/x-component                    &quot;access plus 3 month&quot;

    # HTML
        ExpiresByType text/html                           &quot;access plus 0 seconds&quot;

    # JavaScript
        ExpiresByType application/javascript              &quot;access plus 1 year&quot;

    # Manifest files
        ExpiresByType application/x-web-app-manifest+json &quot;access plus 0 seconds&quot;
        ExpiresByType text/cache-manifest                 &quot;access plus 0 seconds&quot;

    # Media
        ExpiresByType audio/ogg                           &quot;access plus 6 month&quot;
        ExpiresByType image/gif                           &quot;access plus 6 month&quot;
        ExpiresByType image/jpeg                          &quot;access plus 6 month&quot;
        ExpiresByType image/png                           &quot;access plus 6 month&quot;
        ExpiresByType video/mp4                           &quot;access plus 6 month&quot;
        ExpiresByType video/ogg                           &quot;access plus 6 month&quot;
        ExpiresByType video/webm                          &quot;access plus 6 month&quot;

    # Web feeds
        ExpiresByType application/atom+xml                &quot;access plus 1 hour&quot;
        ExpiresByType application/rss+xml                 &quot;access plus 1 hour&quot;

    # Web fonts
        ExpiresByType application/font-woff2              &quot;access plus 3 month&quot;
        ExpiresByType application/font-woff               &quot;access plus 3 month&quot;
        ExpiresByType application/vnd.ms-fontobject       &quot;access plus 3 month&quot;
        ExpiresByType application/x-font-ttf              &quot;access plus 3 month&quot;
        ExpiresByType font/opentype                       &quot;access plus 3 month&quot;
        ExpiresByType image/svg+xml                       &quot;access plus 3 month&quot;
&lt;/IfModule&gt;</pre>
<p>If you are using your own shell server from digitalocean or linode then you are probably using nginx webserver. On nginx server you need to add a few lines to the sites configuration file to enable browser caching and change the expiry time.</p>
<p>If you are using the cloudflare CDN, or any other cdn then you have to implement the changes inside the configuration area of the cdn admin panel, which again is easy.</p>
<h3>4. Use a Content Delivery Network</h3>
<p>A Content Delivery Network takes your website speed to the next level, by storing and serving your website&#8217;s content via distribution servers that are geographically closer to the actually location of the visitor.</p>
<p>So if your website&#8217;s actual server is location in Europe, but the visitor is from the US, the the CDN will store and serve the website&#8217;s content from a server that is actually located in US. This makes the data transfer faster.</p>
<p>Visitor <=> Your Website&#8217;s address <=> Cloudflare <=> Your website&#8217;s actual server</p>
<p>For most bloggers, <a href="https://www.cloudflare.com/" rel="noopener noreferrer" target="_blank">Cloudflare</a> is an excellent free service to use for CDN. The free version of cloudflare has all the necessary features of a CDN. You have to point your domain name&#8217;s nameserver to the CDN and the CDN will in turn connect to the actual hosting server to fetch data.</p>
<p><a href="http://www.seostack.net/blog/wp-content/uploads/2020/07/cloudflare-cdn.jpg"><img decoding="async" src="http://www.seostack.net/blog/wp-content/uploads/2020/07/cloudflare-cdn-640x347.jpg" alt="cloudflare cdn" width="640" height="347" class="aligncenter size-post-body wp-image-766" srcset="https://www.seostack.net/blog/wp-content/uploads/2020/07/cloudflare-cdn-640x347.jpg 640w, https://www.seostack.net/blog/wp-content/uploads/2020/07/cloudflare-cdn-300x163.jpg 300w, https://www.seostack.net/blog/wp-content/uploads/2020/07/cloudflare-cdn-1024x555.jpg 1024w, https://www.seostack.net/blog/wp-content/uploads/2020/07/cloudflare-cdn-768x416.jpg 768w, https://www.seostack.net/blog/wp-content/uploads/2020/07/cloudflare-cdn-250x135.jpg 250w, https://www.seostack.net/blog/wp-content/uploads/2020/07/cloudflare-cdn.jpg 1425w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<h3>5. Disable Gutenberg block library on frontend</h3>
<p>If you don&#8217;t use the gutenberg editor then you can disable it on the front end. The block library loads additional css file which is not needed.</p>
<p>To disable the block library add the following code to your theme&#8217;s function.php or your own custom plugin:</p>
<pre class="source-code" >// Disable gutenberg style in Front
function wps_deregister_styles() {
    wp_dequeue_style( &#039;wp-block-library&#039; );
}
add_action( &#039;wp_print_styles&#039;, &#039;wps_deregister_styles&#039;, 100 );</pre>
<h3>Conclusion</h3>
<p>If you have any third party javascript code on your website, the pagespeed score will be lowered. You have no control over the optimisation of those javascript files the come from other servers and hence there is very little that can be done, other than removing those.</p>
<p>If you have adsense units on your website, then the pagespeed score will be affected due to the additional javascript that is loaded and processed by the adsense code. </p>
<p>There is not easy and adsense compliant method to deal with this and the pagespeed score will for most of the time be stuck around 70 for mobile devices.</p>
<h3>Resources</h3>
<p>The following article from geekflare shows some optimizations that can be done without using a plugin. Note that you would have to add custom php code to wordpress functions file.</p>
<p><a href="https://geekflare.com/wordpress-performance-optimization-without-plugin/" rel="noopener noreferrer" target="_blank">https://geekflare.com/wordpress-performance-optimization-without-plugin/</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.seostack.net/boost-pagespeed-score-in-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to show or hide widgets on certain posts and pages in WordPress</title>
		<link>https://www.seostack.net/wordpress-select-widgets-to-show/</link>
					<comments>https://www.seostack.net/wordpress-select-widgets-to-show/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Fri, 27 Nov 2015 04:14:06 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://blog.seostack.net/?p=84</guid>

					<description><![CDATA[Need to hide or show a particular widget on a certain page ? Here are some wordpress plugins that allow you to control the display of widgets on selected pages or posts.]]></description>
										<content:encoded><![CDATA[<h3>Display selected widgets only</h3>
<p>At times certain widgets need to be hidden from or shown on selected pages or posts only. For example you might want to remove a sidebar advertisement from &#8220;About Us&#8221; page.</p>
<p>So in this post we are going to talk about some plugins that provide users with the ability to selectively show or hide widgets on specific pages or posts.</p>
<h4>1. Widget Logic</h4>
<p>It adds a code box (text field) in each widget where you have to specify the condition for displaying the widget using php code. This is quite simple if you know php and need to implement few simple conditions.</p>
<p><a href="https://wordpress.org/plugins/widget-logic/" target="_blank">https://wordpress.org/plugins/widget-logic/</a></p>
<h4>2. Display Widgets</h4>
<p>It adds a set of configuration options in each widget box, where you can specify to either hide or show the widget in a given set of pages or posts specified by id.</p>
<p><a href="https://wordpress.org/plugins/display-widgets/" target="_blank">https://wordpress.org/plugins/display-widgets/</a></p>
<h4>3. Widget Context</h4>
<p><a href="https://wordpress.org/plugins/widget-context/">Widget Context</a> is another plugin similar to Display Widgets and allows to show or hide widgets on selected areas like pages, posts, archives or categories. It allows to target specific pages using the url.</p>
<p><a href="https://wordpress.org/plugins/widget-context/" target="_blank">https://wordpress.org/plugins/widget-context/</a></p>
<h4>4. Restrict Widgets</h4>
<p>The <a href="https://wordpress.org/plugins/restrict-widgets/">Restrict Widgets</a> plugin is similar to Widget Context and Display widgets. It allows user to select pages, category of posts or even device types to show or hide the selected widget.</p>
<p><a href="https://wordpress.org/plugins/restrict-widgets/" target="_blank">https://wordpress.org/plugins/restrict-widgets/</a></p>
<h4>5. Dynamic Widgets</h4>
<p>The <a href="https://wordpress.org/plugins/dynamic-widgets/"> Dynamic Widgets</a> plugin is similar to the above widgets in a way, that it allows users to specify display criteria for individual widgets. However it supports a vast list of options when it comes to specifying the criterias.</p>
<p>In addition to pages and posts, Dynamic Widgets can also controls visibility of widgets based on browser, device type, ip address, dates, user roles and author.</p>
<p><a href="https://wordpress.org/plugins/dynamic-widgets/" target="_blank">https://wordpress.org/plugins/dynamic-widgets/</a></p>
<h4>6. WP Page Widget</h4>
<p><a href="https://wordpress.org/plugins/wp-page-widget/">WP Page Widget</a> takes a different approach to control widget visibility. It allows you to specify widgets for every single post or page right inside the editor area. </p>
<p>This is useful when you need a very high level of precision at individual post/page level to select the widgets to display.</p>
<p><a href="https://wordpress.org/plugins/wp-page-widget/" target="_blank">https://wordpress.org/plugins/wp-page-widget/</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.seostack.net/wordpress-select-widgets-to-show/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
		<item>
		<title>How to add code to functions.php in wordpress via a plugin</title>
		<link>https://www.seostack.net/wordpress-custom-code-plugin/</link>
					<comments>https://www.seostack.net/wordpress-custom-code-plugin/#respond</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Fri, 27 Nov 2015 04:12:45 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://blog.seostack.net/?p=82</guid>

					<description><![CDATA[Learn how to add your own custom php code to functions.php without editing the file directly. Instead use a plugin to add the code and keep it across different themes.]]></description>
										<content:encoded><![CDATA[<h3>Custom code without hacking functions.php</h3>
<p>So you wan&#8217;t to hack into the code of your wordpress theme to make things more like you want. But for this you need to add some code in the form of a function to the &#8220;functions.php&#8221; file of your active theme.</p>
<p>This is how its mostly done, but has a little drawback. When you change your theme that piece of code is no longer in effect and you need to code it again in the new theme.</p>
<p>So if you wish to have portability, then it should be done via some kind of a plugin. So that the effect is persistent across themes. And the good news is, that there indeed are few plugins for the task.</p>
<h3>1. Functionality Plugin</h3>
<p>The <a href="https://wordpress.org/plugins/functionality/">Functionality Plugin</a> is a sneaky little plugin that installs itself, and creates a &#8220;blank plugin&#8221; bearing the name of the site. It creates an option &#8220;Plugins > Edit functions&#8221; which takes the user to the editor page for the new blank plugin.</p>
<p>The user can add all custom functions inside this new blank plugin and it would run alongside the theme functions and other plugins. Simple and effective.</p>
<h3>2. Pluginception</h3>
<p><a href="https://wordpress.org/plugins/pluginception/">Pluginception</a> is another simple plugin that is similar to the Functionality plugin but with some differences. It adds an option &#8220;Plugins > Create a New Plugin&#8221; where the user can create multiple new blank plugins and put code inside each of them.</p>
<p>The plugin can then be managed from the Plugins list and code inside these new plugins would work just like other plugins or functions inside functions.php</p>
<h3>3. My Custom Functions</h3>
<p><a href="https://wordpress.org/plugins/my-custom-functions/">My Custom Functions</a> creates a simple option &#8220;Appearance > Custom Functions&#8221; in the admin panel where you can type in any of your own php code/functions and it would take effect. </p>
<p>The plugin also ensures that the code is error free before applying it. So even if you code contains any syntax errors, you can fix it without having to get inside the file manager.</p>
<h3>4. Code Snippets</h3>
<p>The <a href="https://wordpress.org/plugins/code-snippets/">Code Snippets</a> is a much more elaborate plugin that has provides the user with a user interface to create and manage multiple snippets each with a name and descriptions. The snippets can be deactivated when not needed.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.seostack.net/wordpress-custom-code-plugin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to display last modified date of posts in wordpress</title>
		<link>https://www.seostack.net/display-last-modified-date-wordpress/</link>
					<comments>https://www.seostack.net/display-last-modified-date-wordpress/#comments</comments>
		
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Fri, 27 Nov 2015 04:11:30 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://blog.seostack.net/?p=80</guid>

					<description><![CDATA[Do you update your old posts to provide uptodate content. Then it can be useful to display the last modified date of a post in the content. This tells the user how recent the content is. This post shows you how to use a filter function to do the same.]]></description>
										<content:encoded><![CDATA[<p>If you are in the habit of regularly updating your old posts, then might you want to display the last modified date of posts, so indicate how recent or fresh the content in the post is. Your theme might already have the option to display that, but if it doesn&#8217;t then doing it is easy, but would need you to mess a little with the code of the theme.</p>
<p>Here is a quick little function that you can add to your functions.php file in the theme (at the end ofcourse).</p>
<pre class="source-code" >function add_post_content($content)
{
$date = &#039;&lt;div class=&quot;updated_on&quot;&gt;Last Updated On : &#039; . get_the_modified_time(&lsquo;jS F Y&rsquo;) . &#039;&lt;/div&gt;&#039;;
return $content . $date;
}
add_filter(&#039;the_content&#039;, &#039;add_post_content&#039; , 9);</pre>
<p>The function get_the_modified_time gets the modified time of the current post in any given format. The same is added to the post content using the ‘add_filter’ api function.</p>
<p>The add_filter takes a second parameter called priority. Default is 10, giving anything lesser will mean a higher priority. So we specify 9 to make it higher in priority. </p>
<p>Higher priority is necessary so that this function is able to do its task before any other plugins get into the way to modify the content.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.seostack.net/display-last-modified-date-wordpress/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
