<?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>Blog - ThemesDNA.com</title>
	<atom:link href="https://themesdna.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>https://themesdna.com/blog/</link>
	<description>Simple and Elegant WordPress Themes</description>
	<lastBuildDate>Tue, 27 Jan 2026 12:36:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://themesdna.com/wp-content/uploads/2025/05/cropped-themesdna-logo-32x32.png</url>
	<title>Blog - ThemesDNA.com</title>
	<link>https://themesdna.com/blog/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Disable WordPress File Editing</title>
		<link>https://themesdna.com/blog/disable-wordpress-file-editing/</link>
					<comments>https://themesdna.com/blog/disable-wordpress-file-editing/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Tue, 27 Jan 2026 12:36:40 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4400</guid>

					<description><![CDATA[<p>WordPress has a default functionality that allows the administrators to make changes to the theme and the plugin files by...</p>
<p>The post <a href="https://themesdna.com/blog/disable-wordpress-file-editing/">How to Disable WordPress File Editing</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>WordPress has a default functionality that allows the administrators to make changes to the theme and the plugin files by directly accessing the dashboard. Although this is convenient, in case an account is compromised, this could pose a serious security risk. In this brief tutorial, we are going to demonstrate the steps required to turn off file editing on the WordPress administration screen with just a simple configuration change.</p>
<p>You have to make amendments to the file <strong>wp-config.php</strong> that is found in the root folder of your WordPress installation.</p>
<p>Insert the line of the code below the line, which is <strong>/* That's all, stop editing! Happy blogging. */</strong>.</p>
<pre><code class="language-php">define( 'DISALLOW_FILE_EDIT', true );</code></pre>
<p>Click save and reload your WordPress dashboard. The <strong>Theme Editor</strong> and <strong>Plugin Editor</strong> will not be provided anymore.</p>
<p>File editing should be disabled as it can help in the prevention of malicious code injection, and it is also a good security practice that should be observed by all WordPress websites.</p>
<p>The post <a href="https://themesdna.com/blog/disable-wordpress-file-editing/">How to Disable WordPress File Editing</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-wordpress-file-editing/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Replace WordPress Admin Bar Logo with Your Own Logo</title>
		<link>https://themesdna.com/blog/replace-wordpress-admin-bar-logo/</link>
					<comments>https://themesdna.com/blog/replace-wordpress-admin-bar-logo/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sun, 20 Apr 2025 02:01:08 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4111</guid>

					<description><![CDATA[<p>Customizing the WordPress admin experience is an essential part of building polished, white-labeled websites — especially when handing off a...</p>
<p>The post <a href="https://themesdna.com/blog/replace-wordpress-admin-bar-logo/">How to Replace WordPress Admin Bar Logo with Your Own Logo</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>
  Customizing the WordPress admin experience is an essential part of building polished, white-labeled websites — especially when handing off a project to a client. One of the most recognizable elements in the admin interface is the default WordPress “W” logo located in the top-left corner of the admin bar.
</p>
<p>
  While it links to useful resources, many developers and agencies prefer to remove or replace this logo with their own branding to maintain a cohesive experience. Whether you're working on a client dashboard, a personal project, or a multi-user admin panel, swapping the default logo for your own can make the backend feel more tailored and professional.
</p>
<p>
  In this tutorial, we’ll walk through how to completely remove the default WordPress logo and replace it with a custom image of your choice — all with a simple PHP snippet.
</p>
<h2>The Code Snippet</h2>
<p>Copy and paste the following code into your theme’s <code class="magdna-inline-code">functions.php</code> file or a custom functionality plugin:</p>
<pre><code class="language-php">add_action('admin_bar_menu', 'themesdna_replace_wp_logo', 11); // Use priority 11 to come after default

function themesdna_replace_wp_logo($wp_admin_bar) {
    // Remove the default WordPress logo
    $wp_admin_bar-&gt;remove_node('wp-logo');

    // Add a new logo with the same ID and group
    $wp_admin_bar-&gt;add_node([
        'id'    =&gt; 'wp-logo',
        'title' =&gt; '&lt;img src=&quot;ADD-YOUR-LOGO-IMAGE-URL-HERE&quot; style=&quot;height:20px; margin-top:6px;&quot; alt=&quot;Logo&quot;&gt;',
        'href'  =&gt; admin_url(),
        'meta'  =&gt; [
            'title' =&gt; 'Go to Dashboard',
        ],
    ]);
}</code></pre>
<h2>Step 1: Add Your Logo</h2>
<p>Replace the placeholder text <code class="magdna-inline-code">ADD-YOUR-LOGO-IMAGE-URL-HERE</code> in the code above with the actual URL of your logo image.</p>
<p><strong>Tip:</strong> For best results, use a small, transparent <strong>PNG</strong> or <strong>SVG</strong> image sized approximately <strong>20×20 pixels</strong>.</p>
<h2>Step 2: Change the Link</h2>
<p>This change is optional. By default, clicking your logo will bring users to the WordPress Dashboard. You can change this link by editing the <code class="magdna-inline-code">'href'</code> value:</p>
<ul>
<li><code class="magdna-inline-code">admin_url()</code> – Links to the WordPress dashboard</li>
<li><code class="magdna-inline-code">home_url()</code> – Links to your site’s homepage</li>
<li><code class="magdna-inline-code">'https://yourdomain.com/support'</code> – Links to any website</li>
</ul>
<h2>Step 3: Adjust Logo Positioning</h2>
<p>If your logo appears misaligned, you can tweak the <code class="magdna-inline-code">style</code> attribute directly inside the HTML:</p>
<pre><code class="language-php">style="height:20px; margin-top:6px;"</code></pre>
<p>Increase or decrease <code class="magdna-inline-code">margin-top</code> slightly to align the logo vertically within the admin bar.</p>
<h2>Conclusion</h2>
<p>Replacing the WordPress admin bar logo with your own branding is a small but effective way to make the dashboard feel more polished and personalized. Whether you're branding a site for a client or creating a consistent identity across projects, this tweak adds a professional touch with minimal effort.</p>
<p>The post <a href="https://themesdna.com/blog/replace-wordpress-admin-bar-logo/">How to Replace WordPress Admin Bar Logo with Your Own Logo</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/replace-wordpress-admin-bar-logo/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Redirect HTTP to HTTPS on WordPress using .htaccess</title>
		<link>https://themesdna.com/blog/redirect-http-to-https-wordpress-htaccess/</link>
					<comments>https://themesdna.com/blog/redirect-http-to-https-wordpress-htaccess/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Mon, 23 Sep 2024 01:19:38 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4029</guid>

					<description><![CDATA[<p>Ensuring that your WordPress website uses HTTPS instead of HTTP is a crucial step for security and SEO. In this...</p>
<p>The post <a href="https://themesdna.com/blog/redirect-http-to-https-wordpress-htaccess/">How to Redirect HTTP to HTTPS on WordPress using .htaccess</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Ensuring that your WordPress website uses HTTPS instead of HTTP is a crucial step for security and SEO. In this post, we'll guide you through the process of redirecting all HTTP traffic to HTTPS on your WordPress website by modifying the <strong>.htaccess</strong> file on your WordPress site. This method is both efficient and straightforward, especially when you have an SSL certificate already installed on your hosting server.</p>
<p>You can find the "<strong>.htaccess</strong>" file in the root directory of your WordPress installation (the same place as wp-config.php).</p>
<p>1. First make a backup of your .htaccess file in case something goes wrong.</p>
<p>2. Now Access it via an FTP client or your hosting file manager.</p>
<p>3. Add the following code at the top of your .htaccess file:</p>
<pre><code class="language-php">&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
&lt;/IfModule&gt;</code></pre>
<p>4. Save your changes and visit your website using <strong>http://</strong>. It should automatically redirect to <strong>https://</strong>. Ensure all pages load correctly.</p>
<p>By adding the above code to your .htaccess file, you can now rest assured that both your users' data and your site's search engine performance are protected. If you run into any issues, remember to check for SSL certificate installation or mixed content problems to fully complete your site's migration to HTTPS.</p>
<p>The post <a href="https://themesdna.com/blog/redirect-http-to-https-wordpress-htaccess/">How to Redirect HTTP to HTTPS on WordPress using .htaccess</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/redirect-http-to-https-wordpress-htaccess/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Block IP Addresses in WordPress using PHP</title>
		<link>https://themesdna.com/blog/block-ip-addresses-wordpress-php/</link>
					<comments>https://themesdna.com/blog/block-ip-addresses-wordpress-php/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 13 Sep 2024 04:19:24 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4025</guid>

					<description><![CDATA[<p>There may be times when you need to block certain IP addresses from accessing your WordPress site, whether due to...</p>
<p>The post <a href="https://themesdna.com/blog/block-ip-addresses-wordpress-php/">How to Block IP Addresses in WordPress using PHP</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>There may be times when you need to block certain IP addresses from accessing your WordPress site, whether due to malicious activity, repeated login attempts, or other security concerns. While there are plugins available to manage this, you can achieve the same result with a simple custom code snippet.</p>
<p>In this post, we'll show you how to <strong>block specific IP addresses</strong> in WordPress using a PHP function. By adding the code below to your theme’s functions.php file, you can prevent users from accessing your site based on their IP addresses and display a custom message to them.</p>
<pre><code class="language-php">function themesdna_block_ip_address() {
    // List of blocked IP addresses
    $blocked_ips = array( 
        '123.45.67.89', 
        '98.76.54.32'
    );

    // Get the user's real IP address, accounting for proxies
    $user_ip = '';
    if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {
        $user_ip = $_SERVER['HTTP_CLIENT_IP']; // IP from shared internet
    } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
        $user_ip = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] )[0]; // IP passed from proxy
    } else {
        $user_ip = $_SERVER['REMOTE_ADDR']; // Direct IP
    }

    // Ensure IP is sanitized
    $user_ip = filter_var( $user_ip, FILTER_VALIDATE_IP );

    // Check if the user's IP is in the blocked list
    if ( $user_ip &amp;&amp; in_array( $user_ip, $blocked_ips ) ) {
        wp_die(
            wp_kses_post( '&lt;h1&gt;Access Blocked&lt;/h1&gt;&lt;p&gt;Your IP address (' . esc_html( $user_ip ) . ') has been blocked from accessing this site. Please contact the administrator if you believe this is a mistake.&lt;/p&gt;' ),
            esc_html__( 'Access Blocked', 'themesdna' ),
            array( 'response' =&gt; 403 ) // Send a 403 Forbidden HTTP response
        );
    }
}
add_action( 'init', 'themesdna_block_ip_address' );</code></pre>
<p><strong style="font-size:120%;">Important Notes:</strong></p>
<ul>
<li>The <strong>$blocked_ips</strong> array contains the IP addresses you want to block. The values "123.45.67.89" and "98.76.54.32" are sample addresses; be sure to replace them with the specific IPs you wish to block. You can easily add or remove IP addresses from this list as needed.</li>
<li>You can also customize the message that’s displayed to blocked users by modifying the text in the <strong>wp_die()</strong> function.</li>
<li>Regularly update the <strong>$blocked_ips</strong> array as needed and keep an eye on any suspicious activity on your site.</li>
</ul>
<p>This solution gives you flexibility and control over which IP addresses are blocked without needing to install additional plugins.</p>
<p>The post <a href="https://themesdna.com/blog/block-ip-addresses-wordpress-php/">How to Block IP Addresses in WordPress using PHP</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/block-ip-addresses-wordpress-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Enable Maintenance Mode in WordPress</title>
		<link>https://themesdna.com/blog/enable-maintenance-mode-wordpress/</link>
					<comments>https://themesdna.com/blog/enable-maintenance-mode-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Thu, 12 Sep 2024 16:36:27 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4023</guid>

					<description><![CDATA[<p>When performing updates or changes to your WordPress site, it's essential to inform visitors that the site is temporarily unavailable....</p>
<p>The post <a href="https://themesdna.com/blog/enable-maintenance-mode-wordpress/">How to Enable Maintenance Mode in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>When performing updates or changes to your WordPress site, it's essential to inform visitors that the site is temporarily unavailable. While many plugins can handle this, you can manually enable <strong>maintenance mode</strong> by adding a custom PHP snippet to your theme. This allows for greater control and flexibility.</p>
<p>The following code can be added to your theme's functions.php file to enable maintenance mode for non-admin users, while still allowing administrators and critical processes (like AJAX requests, cron jobs, and REST API calls) to function normally.</p>
<pre><code class="language-php">function themesdna_maintenance_mode() {
    // Allow access for admins and specific non-front-end requests
    if ( current_user_can( 'manage_options' ) || is_admin() || wp_doing_ajax() || wp_doing_cron() || defined( 'REST_REQUEST' ) &amp;&amp; REST_REQUEST ) {
        return; // Allow access for admin, AJAX, CRON, or REST requests
    }

    // Maintenance mode message
    $maintenance_message = '&lt;h1&gt;Maintenance Mode&lt;/h1&gt;&lt;p&gt;We are performing scheduled maintenance. Please check back soon.&lt;/p&gt;';

    // Output the maintenance mode message for non-admin users
    wp_die( $maintenance_message, 'Maintenance Mode', array( 'response' =&gt; 503 ) );
}

// Enable Maintenance Mode for non-admin users
add_action( 'template_redirect', 'themesdna_maintenance_mode' );</code></pre>
<p>By using this code, you can control exactly who sees the maintenance page and ensure your site remains operational behind the scenes while you perform updates.</p>
<p>The post <a href="https://themesdna.com/blog/enable-maintenance-mode-wordpress/">How to Enable Maintenance Mode in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/enable-maintenance-mode-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Remove WordPress Logo from the Admin Bar</title>
		<link>https://themesdna.com/blog/remove-wordpress-logo-from-admin-bar/</link>
					<comments>https://themesdna.com/blog/remove-wordpress-logo-from-admin-bar/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Mon, 09 Sep 2024 03:09:13 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4020</guid>

					<description><![CDATA[<p>By default, WordPress displays a logo in the admin bar at the top of the dashboard. While this is a...</p>
<p>The post <a href="https://themesdna.com/blog/remove-wordpress-logo-from-admin-bar/">How to Remove WordPress Logo from the Admin Bar</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>By default, WordPress displays a logo in the admin bar at the top of the dashboard. While this is a minor feature, you may want to remove it for a cleaner or more personalized appearance, especially when working on a client site or custom project.</p>
<h2>Why Remove the WordPress Logo?</h2>
<p>Here are a few reasons you might consider removing the WordPress logo:</p>
<ul>
<li><strong>Branding:</strong> When developing a custom theme for a client, removing WordPress-specific elements can create a more polished, branded experience.</li>
<li><strong>Simplify the Admin Bar:</strong> If the admin bar contains too many items, removing non-essential elements like the WordPress logo can streamline the interface and reduce clutter.</li>
</ul>
<h2>How to Remove the WordPress Logo</h2>
<p>To remove the WordPress logo from the admin bar, simply add the following code snippet to your theme's functions.php file:</p>
<pre><code class="language-php">function themesdna_remove_wp_logo_from_admin_bar($wp_admin_bar) {
    // Remove the WordPress logo from the admin bar
    $wp_admin_bar-&gt;remove_node('wp-logo');
}

// Customize the admin bar by removing the WordPress logo
add_action('admin_bar_menu', 'themesdna_remove_wp_logo_from_admin_bar', 999);</code></pre>
<p>Once you've added this snippet, refresh your WordPress dashboard, and the WordPress logo will no longer be visible in the admin bar.</p>
<p>The post <a href="https://themesdna.com/blog/remove-wordpress-logo-from-admin-bar/">How to Remove WordPress Logo from the Admin Bar</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/remove-wordpress-logo-from-admin-bar/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Add a Author Bio Box to WordPress Posts</title>
		<link>https://themesdna.com/blog/add-author-bio-box-wordpress/</link>
					<comments>https://themesdna.com/blog/add-author-bio-box-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sat, 07 Sep 2024 16:55:45 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4018</guid>

					<description><![CDATA[<p>Displaying an author bio box at the end of your blog posts is a wonderful way to provide readers with...</p>
<p>The post <a href="https://themesdna.com/blog/add-author-bio-box-wordpress/">How to Add a Author Bio Box to WordPress Posts</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Displaying an author bio box at the end of your blog posts is a wonderful way to provide readers with more information about the author, improve engagement, and build a personal connection between the author and the audience. This can be especially important for blogs with multiple authors, as it helps highlight individual contributors and their expertise.</p>
<p>Add below code snippet to the functions.php file of your theme to add a custom author bio box to your WordPress posts. This box will display the author's profile picture, name, and biography at the end of every single post.</p>
<pre><code class="language-php">// Display Author Bio box after the post content
function themesdna_author_bio_box($content) {
    if (is_single() &amp;&amp; get_the_author_meta('description')) {
        $author_bio = '&lt;div class=&quot;tdna-ab-box&quot;&gt;';
        $author_bio .= get_avatar(get_the_author_meta('ID'), 100); // Display author profile picture
        $author_bio .= '&lt;div class=&quot;tdna-ab-details&quot;&gt;&lt;h4 class=&quot;tdna-ab-name&quot;&gt;' . get_the_author_meta('display_name') . '&lt;/h4&gt;'; // Display author name
        $author_bio .= '&lt;div class=&quot;tdna-ab-description&quot;&gt;' . get_the_author_meta('description') . '&lt;/div&gt;&lt;/div&gt;'; // Display author bio
        $author_bio .= '&lt;/div&gt;';
        $content .= $author_bio;
    }
    return $content;
}
add_filter('the_content', 'themesdna_author_bio_box');

// Add CSS for the author bio box
function themesdna_author_bio_css() {
    echo '
    &lt;style&gt;
    .tdna-ab-box {
        margin: 20px 0;
        padding: 10px;
        background: #f9f9f9;
        border: 1px solid #ddd;
        display: -webkit-box;
        display: -webkit-flex;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -webkit-align-items: center;
           -moz-box-align: center;
            -ms-flex-align: center;
                align-items: center;
    }
    .tdna-ab-box img {
        -webkit-border-radius: 50%;
           -moz-border-radius: 50%;
                border-radius: 50%;
        margin-right: 20px;
    }
    .tdna-ab-box h4 {
        margin: 0 0 10px;
        font-size: 1.5em;
    }
    .tdna-ab-description {
        margin: 0;
    }
    &lt;/style&gt;
    ';
}
add_action('wp_head', 'themesdna_author_bio_css');</code></pre>
<p><strong>Note:</strong> To take full advantage of this feature, make sure each author on your site has a completed bio. You can add this by going to the WordPress admin panel:</p>
<p>1. Navigate to Users > Profile.<br />
2. Fill in the "Biographical Info" section with the author’s bio.<br />
3. Optionally, you can upload a profile picture by associating the email with a Gravatar account.</p>
<p>The post <a href="https://themesdna.com/blog/add-author-bio-box-wordpress/">How to Add a Author Bio Box to WordPress Posts</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/add-author-bio-box-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Remove Related Products from WooCommerce Products</title>
		<link>https://themesdna.com/blog/remove-related-products-woocommerce/</link>
					<comments>https://themesdna.com/blog/remove-related-products-woocommerce/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Tue, 27 Aug 2024 02:32:35 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4015</guid>

					<description><![CDATA[<p>WooCommerce has several tools to improve your online store. This includes the Related Products area on product pages, which helps...</p>
<p>The post <a href="https://themesdna.com/blog/remove-related-products-woocommerce/">How to Remove Related Products from WooCommerce Products</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>WooCommerce has several tools to improve your online store. This includes the Related Products area on product pages, which helps shoppers find additional products. However, you might want to remove the related products section from your WooCommerce product pages for a variety of reasons, such as a cleaner product page design, increased conversion rates, improved load times, or other factors.</p>
<p>Add below code snippet to the functions.php file of your theme to remove related products from WooCommerce product pages:</p>
<pre><code class="language-php">// Remove related products from WooCommerce product pages
remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);</code></pre>
<p>If you ever decide to enable related products section again, simply remove or comment out this code, and the related products will reappear.</p>
<p>The post <a href="https://themesdna.com/blog/remove-related-products-woocommerce/">How to Remove Related Products from WooCommerce Products</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/remove-related-products-woocommerce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Hide Reviews on WooCommerce Product Pages</title>
		<link>https://themesdna.com/blog/hide-reviews-woocommerce-product-pages/</link>
					<comments>https://themesdna.com/blog/hide-reviews-woocommerce-product-pages/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Mon, 26 Aug 2024 06:26:51 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4013</guid>

					<description><![CDATA[<p>WooCommerce is a popular eCommerce plugin for WordPress. It offers many features, including customer reviews on product pages. While reviews...</p>
<p>The post <a href="https://themesdna.com/blog/hide-reviews-woocommerce-product-pages/">How to Hide Reviews on WooCommerce Product Pages</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>WooCommerce is a popular eCommerce plugin for WordPress. It offers many features, including customer reviews on product pages. While reviews can be a great way to build trust and provide social proof, some store owners may want to hide or remove this section for various reasons. You can quickly hide the reviews tab on WooCommerce product pages by adding the PHP snippet shown below to the functions.php file in your theme.</p>
<pre><code class="language-php">// Function to remove the reviews tab from WooCommerce product pages
function themesdna_remove_woocommerce_reviews_tab($tabs) {
    unset($tabs['reviews']); // Remove the reviews tab
    return $tabs;
}

// Hook the function to WooCommerce to disable the reviews tab
add_filter('woocommerce_product_tabs', 'themesdna_remove_woocommerce_reviews_tab', 98);</code></pre>
<p>The snippet above not only visually hides the reviews but also prevents them from loading on the product page, thereby improving load times. If you ever decide to enable reviews again, simply remove or comment out this code, and the reviews will reappear.</p>
<p>The post <a href="https://themesdna.com/blog/hide-reviews-woocommerce-product-pages/">How to Hide Reviews on WooCommerce Product Pages</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/hide-reviews-woocommerce-product-pages/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable Update Notifications on WordPress</title>
		<link>https://themesdna.com/blog/disable-update-notifications-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-update-notifications-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sat, 17 Aug 2024 13:44:14 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4010</guid>

					<description><![CDATA[<p>WordPress sends notifications about updates to core files, themes, and plugins on a regular basis. Even though staying up to...</p>
<p>The post <a href="https://themesdna.com/blog/disable-update-notifications-wordpress/">How to Disable Update Notifications on WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>WordPress sends notifications about updates to core files, themes, and plugins on a regular basis. Even though staying up to date is important for performance and security, there are times when you may want to turn off these notifications. Whether you manage multiple sites and prefer to handle updates manually, or you're developing a site and don't want the distraction, disabling update notifications can help keep your dashboard clean and focused.</p>
<p>If you need to disable update notifications on WordPress for core, plugins, and themes, add the following code snippet at the bottom of your theme's functions.php file:</p>
<pre><code class="language-php">/* Disable WordPress core update notifications */
add_filter('pre_site_transient_update_core', '__return_null');

/* Disable WordPress theme update notifications */
remove_action('load-update-core.php', 'wp_update_themes');
add_filter('pre_site_transient_update_themes', '__return_null');

/* Disable WordPress plugin update notifications */
remove_action('load-update-core.php', 'wp_update_plugins');
add_filter('pre_site_transient_update_plugins', '__return_null');</code></pre>
<p>The post <a href="https://themesdna.com/blog/disable-update-notifications-wordpress/">How to Disable Update Notifications on WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-update-notifications-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Completely Disable Comments on WordPress</title>
		<link>https://themesdna.com/blog/disable-comments-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-comments-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sat, 17 Aug 2024 10:14:13 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4008</guid>

					<description><![CDATA[<p>You can completely disable comments on your WordPress site by using the code below. It will get rid of comments...</p>
<p>The post <a href="https://themesdna.com/blog/disable-comments-wordpress/">How to Completely Disable Comments on WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>You can completely disable comments on your WordPress site by using the code below. It will get rid of comments on both the front end and the back end, so you won't have to deal with comments on WordPress. It's great for developers and site owners who want a clean site with few distractions.</p>
<p>Add the below code to the functions.php file of your active theme:</p>
<pre><code class="language-php">/* Function to disable comments throughout the site */
function themesdna_disable_comments_admin_init() {
    /* Redirect any user trying to access comments page */
    global $pagenow;
    
    if ($pagenow === 'edit-comments.php') {
        wp_redirect(admin_url());
        exit;
    }

    /* Remove comments metabox from dashboard */
    remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');

    /* Disable support for comments and trackbacks in post types */
    foreach (get_post_types() as $post_type) {
        if (post_type_supports($post_type, 'comments')) {
            remove_post_type_support($post_type, 'comments');
            remove_post_type_support($post_type, 'trackbacks');
        }
    }
}

/* Function to remove comments page in menu */
function themesdna_disable_comments_menu_page() {
    remove_menu_page('edit-comments.php');
}

/* Function to remove comments links from admin bar */
function themesdna_disable_comments_admin_bar() {
    if (is_admin_bar_showing()) {
        remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
    }
}

/* Hook the function to the admin_init action */
add_action('admin_init', 'themesdna_disable_comments_admin_init');

/* Hook the function to remove comments page in menu */
add_action('admin_menu', 'themesdna_disable_comments_menu_page');

/* Hook the function to the init action */
add_action('init', 'themesdna_disable_comments_admin_bar');

/* Close comments on the front-end */
add_filter('comments_open', '__return_false', 20, 2);
add_filter('pings_open', '__return_false', 20, 2);

/* Hide existing comments */
add_filter('comments_array', '__return_empty_array', 10, 2);</code></pre>
<p>The post <a href="https://themesdna.com/blog/disable-comments-wordpress/">How to Completely Disable Comments on WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-comments-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable XML-RPC in WordPress</title>
		<link>https://themesdna.com/blog/disable-xmlrpc-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-xmlrpc-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sat, 17 Aug 2024 06:10:24 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4006</guid>

					<description><![CDATA[<p>XML-RPC, an acronym for XML Remote Procedure Call, is a protocol that facilitates online system-to-system communication. With WordPress, it permits...</p>
<p>The post <a href="https://themesdna.com/blog/disable-xmlrpc-wordpress/">How to Disable XML-RPC in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>XML-RPC, an acronym for XML Remote Procedure Call, is a protocol that facilitates online system-to-system communication. With WordPress, it permits remote connections to your website, letting you interact with your WordPress installation through desktop applications, mobile apps, and other services.</p>
<p>While XML-RPC has its uses, attackers can exploit it for brute force attacks, which attempt to guess your password by making numerous login attempts. Attackers can also use the protocol to launch DDoS (Distributed Denial of Service) attacks on your site. Additionally, attackers often target XML-RPC, which can result in unnecessary server load and performance issues, particularly on high-traffic sites.</p>
<p>The WordPress REST API has made many of the functions previously handled by XML-RPC more secure and efficient. As a result, many users no longer need XML-RPC.</p>
<p>If you need to disable XML-RPC for your WordPress website, add the following code snippet at the bottom of your theme's functions.php file:</p>
<pre><code class="language-php">// Disable XML-RPC
add_filter('xmlrpc_enabled', '__return_false');</code></pre>
<p>The post <a href="https://themesdna.com/blog/disable-xmlrpc-wordpress/">How to Disable XML-RPC in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-xmlrpc-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable Emojis in WordPress</title>
		<link>https://themesdna.com/blog/disable-emojis-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-emojis-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sat, 17 Aug 2024 01:55:50 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4004</guid>

					<description><![CDATA[<p>Emojis, or the little smiley faces, thumbs up, and other expressive icons, are supported by WordPress by default. Emojis can...</p>
<p>The post <a href="https://themesdna.com/blog/disable-emojis-wordpress/">How to Disable Emojis in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Emojis, or the little smiley faces, thumbs up, and other expressive icons, are supported by WordPress by default. Emojis can be helpful and give your content personality, but they also have drawbacks. Emoji scripts and styles can make your pages heavier, which could cause your website to load more slowly. Turning off emojis is a wise choice for people who value performance and speed above all else, or who just don't need them.</p>
<p>If you need to disable emojis in WordPress, add the following code snippet at the bottom of your theme's functions.php file:</p>
<pre><code class="language-php">// Disable the emoji's
function themesdna_disable_wp_emojis() {
    // Remove the actions related to emojis
    remove_action('wp_head', 'print_emoji_detection_script', 7);
    remove_action('wp_print_styles', 'print_emoji_styles');
    remove_action('admin_print_scripts', 'print_emoji_detection_script');
    remove_action('admin_print_styles', 'print_emoji_styles');
    remove_filter('the_content_feed', 'wp_staticize_emoji');
    remove_filter('comment_text_rss', 'wp_staticize_emoji');
    remove_filter('wp_mail', 'wp_staticize_emoji_for_email');

    // Filter to remove TinyMCE emojis
    add_filter('tiny_mce_plugins', 'themesdna_disable_emojis_in_tinymce');
    add_filter('wp_resource_hints', 'themesdna_disable_emojis_remove_dns_prefetch', 10, 2);
}

// Remove TinyMCE emojis
function themesdna_disable_emojis_in_tinymce($plugins) {
    if (is_array($plugins)) {
        return array_diff($plugins, array('wpemoji'));
    } else {
        return array();
    }
}

// Remove emoji CDN hostname from DNS prefetching hints
function themesdna_disable_emojis_remove_dns_prefetch($urls, $relation_type) {
    if ('dns-prefetch' == $relation_type) {
        $emoji_svg_url = 'https://s.w.org/images/core/emoji/11/svg/';
        $urls = array_diff($urls, array($emoji_svg_url));
    }
    return $urls;
}

add_action('init', 'themesdna_disable_wp_emojis');</code></pre>
<p>The post <a href="https://themesdna.com/blog/disable-emojis-wordpress/">How to Disable Emojis in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-emojis-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Automatically Set Featured Images for WordPress Posts</title>
		<link>https://themesdna.com/blog/automatically-set-featured-images-for-wordpress-posts/</link>
					<comments>https://themesdna.com/blog/automatically-set-featured-images-for-wordpress-posts/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 09 Aug 2024 03:58:22 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=4000</guid>

					<description><![CDATA[<p>In WordPress, a "Featured Image" is an image that represents a post, page, or custom post type. It is frequently...</p>
<p>The post <a href="https://themesdna.com/blog/automatically-set-featured-images-for-wordpress-posts/">How to Automatically Set Featured Images for WordPress Posts</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In WordPress, a "Featured Image" is an image that represents a post, page, or custom post type. It is frequently used to visually represent content in a variety of places on a website, including blog post lists, homepage sliders, and the post itself when viewed. When a post is shared on a social media platform such as Facebook or Twitter, the featured image is typically displayed alongside the post link, making the content more appealing and clickable.</p>
<p>Typically, to set a featured image in the WordPress post editor, navigate to the "Featured Image" meta box, click "Set featured image," and then select or upload an image from the media library. But what if you frequently forget to set featured images for your posts? Add the below code to your theme's functions.php file. It will set the first image in the post content as the featured image if you already haven't set a featured image for your post.</p>
<pre><code class="language-php">function themesdna_auto_set_featured_image($post_id) {
    if (wp_is_post_revision($post_id) || has_post_thumbnail($post_id)) {
        return;
    }

    $post = get_post($post_id);
    $content = $post-&gt;post_content;

    $matches = [];
    preg_match('/&lt;img.+src=[\'&quot;](?P&lt;src&gt;.+?)[\'&quot;].*&gt;/i', $content, $matches);

    if ($matches) {
        $image_url = $matches['src'];
        $image_id = attachment_url_to_postid($image_url);

        if ($image_id) {
            set_post_thumbnail($post_id, $image_id);
        }
    }
}
add_action('save_post', 'themesdna_auto_set_featured_image');</code></pre>
<p><strong>Note:</strong><br />
The above code works with images regardless of whether they are attached to the post, as long as they are embedded in the content. But it will fail if the image URL is from an external source.</p>
<p>The post <a href="https://themesdna.com/blog/automatically-set-featured-images-for-wordpress-posts/">How to Automatically Set Featured Images for WordPress Posts</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/automatically-set-featured-images-for-wordpress-posts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Order Posts by a Custom Field in WordPress</title>
		<link>https://themesdna.com/blog/order-posts-by-custom-field-wordpress/</link>
					<comments>https://themesdna.com/blog/order-posts-by-custom-field-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Mon, 05 Aug 2024 04:14:09 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3998</guid>

					<description><![CDATA[<p>Ordering posts by a custom field in WordPress can significantly enhance your site’s functionality, especially when you're dealing with complex...</p>
<p>The post <a href="https://themesdna.com/blog/order-posts-by-custom-field-wordpress/">How to Order Posts by a Custom Field in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Ordering posts by a custom field in WordPress can significantly enhance your site’s functionality, especially when you're dealing with complex content structures. Whether you're running a blog, an e-commerce site, or a portfolio, custom post ordering allows you to showcase your content in a way that better meets your visitors' needs. You can use the following code to sort posts by a custom field using the "<strong>pre_get_posts</strong>" hook:</p>
<pre><code class="language-php">function themesdna_order_posts_by_custom_field($query) {
    if (!is_admin() &amp;&amp; $query-&gt;is_main_query()) {
        if ($query-&gt;is_home() || $query-&gt;is_search() || $query-&gt;is_archive()) { // Adjust conditions based on where you want this to apply
            $query-&gt;set('meta_key', 'your_custom_field_key'); // Replace with your custom field key
            $query-&gt;set('orderby', 'meta_value'); // Or 'meta_value_num' for numerical values
            $query-&gt;set('order', 'ASC'); // or 'DESC'
        }
    }
}
add_action('pre_get_posts', 'themesdna_order_posts_by_custom_field');</code></pre>
<p><strong style="font-size:120%;">Note:</strong><br />
<strong style="color:#4caf50;">meta_key</strong> : Replace '<strong style="color:#e91e63;">your_custom_field_key</strong>' with the actual key of the custom field you want to order by.<br />
<strong style="color:#4caf50;">orderby</strong> : If your custom field contains text, use '<strong style="color:#e91e63;">meta_value</strong>'. If it contains numbers (e.g., prices or ratings), use '<strong style="color:#e91e63;">meta_value_num</strong>' to ensure proper numerical sorting.<br />
<strong>order</strong> : Set this to '<strong style="color:#e91e63;">ASC</strong>' for ascending order (lowest to highest) or '<strong style="color:#e91e63;">DESC</strong>' for descending order (highest to lowest).</p>
<p><strong style="font-size:120%;">Example:</strong><br />
Suppose you have a custom field (meta key) called "<strong>event_date</strong>", and you want to order posts by that field. You can do this by adding the following code to your theme's functions.php file:</p>
<pre><code class="language-php">function themesdna_order_posts_by_custom_field($query) {
    if (!is_admin() &amp;&amp; $query-&gt;is_main_query()) {
        if ($query-&gt;is_home() || $query-&gt;is_search() || $query-&gt;is_archive()) {
            $query-&gt;set('meta_key', 'event_date');
            $query-&gt;set('orderby', 'meta_value');
            $query-&gt;set('order', 'ASC');
        }
    }
}
add_action('pre_get_posts', 'themesdna_order_posts_by_custom_field');</code></pre>
<p>The post <a href="https://themesdna.com/blog/order-posts-by-custom-field-wordpress/">How to Order Posts by a Custom Field in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/order-posts-by-custom-field-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Add Custom Post Types to Search Results in WordPress</title>
		<link>https://themesdna.com/blog/add-custom-post-types-to-search-results-wordpress/</link>
					<comments>https://themesdna.com/blog/add-custom-post-types-to-search-results-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sat, 03 Aug 2024 15:04:32 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3995</guid>

					<description><![CDATA[<p>Including custom post types in search results allows you to make all relevant content on your site easily accessible to...</p>
<p>The post <a href="https://themesdna.com/blog/add-custom-post-types-to-search-results-wordpress/">How to Add Custom Post Types to Search Results in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Including custom post types in search results allows you to make all relevant content on your site easily accessible to users. It can enhance your site's search functionality and user experience. By default, WordPress search results only include posts from the standard "<strong>post</strong>" post type. If you have custom post types on your site and want them to be searchable, you can easily achieve this using the "<strong>pre_get_posts</strong>" hook.</p>
<p>Suppose you have a custom post type called "<strong>recipes</strong>", and you want it to appear in search results alongside regular posts. You can do this by adding the following code to your themes's functions.php file:</p>
<pre><code class="language-php">function themesdna_add_custom_post_types_to_search( $query ) {
    // Check if it's the main search query and not in the admin area
    if ( $query-&gt;is_search() &amp;&amp; $query-&gt;is_main_query() &amp;&amp; !is_admin() ) {
        // Include the 'recipes' post type in search results
        $query-&gt;set( 'post_type', array( 'post', 'recipes' ) );
    }
}
add_action( 'pre_get_posts', 'themesdna_add_custom_post_types_to_search' );</code></pre>
<p>The post <a href="https://themesdna.com/blog/add-custom-post-types-to-search-results-wordpress/">How to Add Custom Post Types to Search Results in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/add-custom-post-types-to-search-results-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Move jQuery to Footer in WordPress</title>
		<link>https://themesdna.com/blog/move-jquery-to-footer-wordpress/</link>
					<comments>https://themesdna.com/blog/move-jquery-to-footer-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Wed, 24 Jul 2024 04:26:33 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3992</guid>

					<description><![CDATA[<p>Loading jQuery in your WordPress website's footer can improve page load times and overall site performance. By default, WordPress loads...</p>
<p>The post <a href="https://themesdna.com/blog/move-jquery-to-footer-wordpress/">How to Move jQuery to Footer in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" src="https://themesdna.com/wp-content/uploads/2024/07/How-to-Move-jQuery-to-Footer-in-WordPress.jpg" alt="How to Move jQuery to Footer in WordPress" width="1280" height="731" class="alignnone size-full wp-image-3993" srcset="https://themesdna.com/wp-content/uploads/2024/07/How-to-Move-jQuery-to-Footer-in-WordPress.jpg 1280w, https://themesdna.com/wp-content/uploads/2024/07/How-to-Move-jQuery-to-Footer-in-WordPress-768x439.jpg 768w" sizes="(max-width: 1280px) 100vw, 1280px" /></p>
<p>Loading jQuery in your WordPress website's footer can improve page load times and overall site performance. By default, WordPress loads jQuery in the header, which can delay the rendering of your page. Add the below code to the "functions.php" file of your theme. It will move "<strong>jQuery</strong>", "<strong>jQuery Core</strong>", and "<strong>jQuery Migrate</strong>" loading to the footer of your WordPress site.</p>
<pre><code class="language-php">function themesdna_move_jquery_to_footer() {
    if (!is_admin()) {
        wp_scripts()-&gt;add_data( 'jquery', 'group', 1 );
        wp_scripts()-&gt;add_data( 'jquery-core', 'group', 1 );
        wp_scripts()-&gt;add_data( 'jquery-migrate', 'group', 1 );
    }
}
add_action('wp_enqueue_scripts', 'themesdna_move_jquery_to_footer');</code></pre>
<p>The above code uses the "<strong>wp_scripts()</strong>" function to access the global scripts object in WordPress and then uses the "<strong>add_data</strong>" method to set the "<strong>group</strong>" property of the "<strong>jquery</strong>", "<strong>jquery-core</strong>", and "j<strong>query-migrate</strong>" scripts to "<strong>1</strong>". In WordPress, setting the "<strong>group</strong>" to "<strong>1</strong>" indicates that the script should be loaded in the footer. By default, scripts are loaded in the header unless specified otherwise.</p>
<p>The post <a href="https://themesdna.com/blog/move-jquery-to-footer-wordpress/">How to Move jQuery to Footer in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/move-jquery-to-footer-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable Image Hotlinking in WordPress</title>
		<link>https://themesdna.com/blog/disable-image-hotlinking-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-image-hotlinking-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Tue, 16 Jul 2024 06:28:17 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3987</guid>

					<description><![CDATA[<p>Hotlinking occurs when other websites link directly to your server's files, such as images, videos, or other media, and consume...</p>
<p>The post <a href="https://themesdna.com/blog/disable-image-hotlinking-wordpress/">How to Disable Image Hotlinking in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" src="https://themesdna.com/wp-content/uploads/2024/07/Disable-Image-Hotlinking-in-WordPress.jpg" alt="Disable Image Hotlinking in WordPress" width="1280" height="731" class="alignnone size-full wp-image-3989" srcset="https://themesdna.com/wp-content/uploads/2024/07/Disable-Image-Hotlinking-in-WordPress.jpg 1280w, https://themesdna.com/wp-content/uploads/2024/07/Disable-Image-Hotlinking-in-WordPress-768x439.jpg 768w" sizes="(max-width: 1280px) 100vw, 1280px" /></p>
<p><strong>Hotlinking</strong> occurs when other websites link directly to your server's files, such as images, videos, or other media, and consume your bandwidth without your permission. This can result in increased server load, slower website performance, and higher hosting fees. Fortunately, you can prevent hotlinking in WordPress by configuring the "<strong>.htaccess</strong>" file. This guide will explain how to disable hotlinking using ".htaccess" file, ensuring the security of your resources from unauthorized access.</p>
<p>1. The .htaccess file is usually located in the root directory of your WordPress installation (the same directory as wp-config.php). Before making any changes, download the .htaccess file to your local machine and keep a backup copy in case you need to revert changes.</p>
<p>2. Open your .htaccess file for editing.</p>
<p>3. Add the below hotlink protection code to your .htaccess file. It will prevent hotlinking by blocking requests for specific image files (jpg, jpeg, png, gif, bmp, webp) if the referer is not from your domain.</p>
<pre><code class="language-php"># BEGIN Hotlink Protection
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?yourdomain\.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|bmp|webp)$ - [F,NC,L]
# END Hotlink Protection</code></pre>
<p><strong>Notes:</strong></p>
<ul>
<li>It's best to add it either at the top or just before the # BEGIN WordPress section if it exists.</li>
<li>Remember to replace “yourdomain.com” with your domain name. Look at the example below:</li>
</ul>
<p><img decoding="async" src="https://themesdna.com/wp-content/uploads/2024/07/How-to-Disable-Image-Hotlinking-in-WordPress.png" alt="How to Disable Image Hotlinking in WordPress" width="600" height="430" class="alignnone size-full wp-image-3988" /></p>
<p><strong>Disable Hotlinking for More File Types</strong></p>
<p>If you want to disable hotlinking for more file types, you can simply add the desired file extensions to the RewriteRule regular expression. Here’s how you can modify the .htaccess code given above to include additional file types:</p>
<pre><code class="language-php"># BEGIN Hotlink Protection
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?yourdomain\.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|xls|xlsx|mp3|mp4|avi)$ - [F,NC,L]
# END Hotlink Protection</code></pre>
<p>Note: You can add or remove file types as you like.</p>
<p>4. Finally save your .htaccess file.</p>
<p>The post <a href="https://themesdna.com/blog/disable-image-hotlinking-wordpress/">How to Disable Image Hotlinking in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-image-hotlinking-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Enable WordPress Shortcodes in Text Widgets</title>
		<link>https://themesdna.com/blog/wordpress-shortcodes-in-text-widgets/</link>
					<comments>https://themesdna.com/blog/wordpress-shortcodes-in-text-widgets/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 12 Jul 2024 17:32:35 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3985</guid>

					<description><![CDATA[<p>Text widgets let you add your own text, HTML, or other code to your WordPress sidebar or other widgetized areas....</p>
<p>The post <a href="https://themesdna.com/blog/wordpress-shortcodes-in-text-widgets/">How to Enable WordPress Shortcodes in Text Widgets</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Text widgets let you add your own text, HTML, or other code to your WordPress sidebar or other widgetized areas. Enabling shortcodes in text widgets is a simple yet powerful way to enhance your WordPress site's functionality. Shortcodes make it easy to manage and change the content on your site without having to know a lot about coding. They can be used to add forms, embed media, or show dynamic content.</p>
<p>By adding below line into your theme's functions.php file, you can take full advantage of shortcodes in your text widgets, offering a richer and more interactive experience for your site visitors.</p>
<pre><code class="language-php">add_filter( 'widget_text', 'do_shortcode' );</code></pre>
<p>The code above tells WordPress to handle shortcodes in text widgets, so you can use them the same way you would in posts or pages.</p>
<p>The post <a href="https://themesdna.com/blog/wordpress-shortcodes-in-text-widgets/">How to Enable WordPress Shortcodes in Text Widgets</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/wordpress-shortcodes-in-text-widgets/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Add Custom Excerpt Length in WordPress</title>
		<link>https://themesdna.com/blog/add-custom-excerpt-length-wordpress/</link>
					<comments>https://themesdna.com/blog/add-custom-excerpt-length-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Thu, 04 Jul 2024 03:38:40 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3976</guid>

					<description><![CDATA[<p>Adjusting the length of excerpts in WordPress can enhance the readability of your blog. Here’s a quick way to change...</p>
<p>The post <a href="https://themesdna.com/blog/add-custom-excerpt-length-wordpress/">How to Add Custom Excerpt Length in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Adjusting the length of excerpts in WordPress can enhance the readability of your blog. Here’s a quick way to change the excerpt length using a code snippet.</p>
<h4>Step 1: Access Your Theme’s Functions.php File</h4>
<ol>
<li>Log in to Your WordPress Dashboard and navigate to "Appearance" > "Theme File Editor".</li>
<li>Select the functions.php file clicking on "Theme Functions (functions.php)".</li>
</ol>
<h4>Step 2: Add the Code Snippet</h4>
<p>Add the following code to set your desired excerpt length. For example, this sets the excerpt length to 20 words:</p>
<pre><code class="language-php">function themesdna_custom_excerpt_length( $length ) {
    return 20;
}
add_filter( 'excerpt_length', 'themesdna_custom_excerpt_length', 999 );</code></pre>
<h4>Step 3: Save and Test</h4>
<ol>
<li>Click the "Update File" button to save the changes.</li>
<li>Visit your site and check that the excerpt length has been adjusted.</li>
</ol>
<p>You can manage how much content appears in your excerpts with this quick change, which will enhance the user experience on your site.</p>
<p>The post <a href="https://themesdna.com/blog/add-custom-excerpt-length-wordpress/">How to Add Custom Excerpt Length in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/add-custom-excerpt-length-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Display Search Results After a Specific Date in WordPress</title>
		<link>https://themesdna.com/blog/display-search-results-after-a-specific-date-wordpress/</link>
					<comments>https://themesdna.com/blog/display-search-results-after-a-specific-date-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sun, 26 May 2024 15:24:16 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3930</guid>

					<description><![CDATA[<p>To display search results after a specific date in WordPress, you can customize your theme's search query using the "pre_get_posts"...</p>
<p>The post <a href="https://themesdna.com/blog/display-search-results-after-a-specific-date-wordpress/">How to Display Search Results After a Specific Date in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>To display search results after a specific date in WordPress, you can customize your theme's search query using the "pre_get_posts" action hook. This approach guarantees the display of only posts published after the specified date in the search results.</p>
<p>To filter search results after the specified date, add the following code to the functions.php file of your theme:</p>
<pre><code class="language-php">function themesdna_filter_search_results_by_date( $query ) {
    if( $query-&gt;is_main_query() &amp;&amp; ! is_admin() &amp;&amp; $query-&gt;is_search() ) {
        // Set the date to filter results after
        $after_date = '2022-04-20';

        $date_query = array(
            array(
                'after' =&gt; $after_date,
                'inclusive' =&gt; true, // Include posts published on the specified date
            ),
        );

        $query-&gt;set('date_query', $date_query);
    }
}
add_action( 'pre_get_posts', 'themesdna_filter_search_results_by_date' );</code></pre>
<p>Note: Remember to replace "<strong>2022-04-20</strong>" with your desired date.</p>
<p>The post <a href="https://themesdna.com/blog/display-search-results-after-a-specific-date-wordpress/">How to Display Search Results After a Specific Date in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/display-search-results-after-a-specific-date-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Change the Number of Posts on Category Pages in WordPress</title>
		<link>https://themesdna.com/blog/change-number-of-posts-category-pages-wordpress/</link>
					<comments>https://themesdna.com/blog/change-number-of-posts-category-pages-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Wed, 17 Apr 2024 13:18:25 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3900</guid>

					<description><![CDATA[<p>In WordPress, there is a setting to change the number of posts listed on blog pages (on the non-static homepage,...</p>
<p>The post <a href="https://themesdna.com/blog/change-number-of-posts-category-pages-wordpress/">How to Change the Number of Posts on Category Pages in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In WordPress, there is a setting to change the number of posts listed on blog pages (on the non-static homepage, category pages, tag pages, other archive pages and search results pages). It is called "Blog pages show at most" and located at "WordPress Dashboard" -> "Settings" -> "Reading".</p>
<p>But what if you want to display a different number of posts on category pages than on other blog pages? Let's say you want to display 20 posts on category pages. You can achieve this by adding the below PHP code to the functions.php file of your theme:</p>
<pre><code class="language-php">function themesdna_number_of_posts_on_category_pages( $query ) {
    if( $query-&gt;is_main_query() &amp;&amp; ! is_admin() &amp;&amp; ( $query-&gt;is_category() ) ) {
        $query-&gt;set( 'posts_per_page', '20' );
    }
}
add_action( 'pre_get_posts', 'themesdna_number_of_posts_on_category_pages' );</code></pre>
<p><strong>Note:</strong> Replace the value "20" with the number of posts you want to display on category pages.</p>
<p>The post <a href="https://themesdna.com/blog/change-number-of-posts-category-pages-wordpress/">How to Change the Number of Posts on Category Pages in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/change-number-of-posts-category-pages-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Increase Maximum File Upload Size in WordPress</title>
		<link>https://themesdna.com/blog/increase-maximum-file-upload-size-wordpress/</link>
					<comments>https://themesdna.com/blog/increase-maximum-file-upload-size-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 05 Apr 2024 16:13:46 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3893</guid>

					<description><![CDATA[<p>The maximum file upload size limit for your WordPress installation depends on both your web server's configuration and WordPress settings....</p>
<p>The post <a href="https://themesdna.com/blog/increase-maximum-file-upload-size-wordpress/">How to Increase Maximum File Upload Size in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The maximum file upload size limit for your WordPress installation depends on both your web server's configuration and WordPress settings. You must take care of both if you want to increase the limit. If you receive errors such as "<strong>The uploaded file exceeds the upload_max_filesize directive in php.ini</strong>", it usually means you need to increase the limit.</p>
<p>To increase the maximum file upload size in WordPress, you typically need to edit the "<strong>php.ini</strong>" file or the "<strong>.htaccess</strong>" file or the "<strong>functions.php</strong>" file of your active theme. Here's how you can do it:</p>
<h2>Method 1: Editing php.ini:</h2>
<p>The maximum file upload size can be directly increased in the "php.ini" file on your server if you have access to it.</p>
<p>Find the line that sets "<strong>upload_max_filesize</strong>" and "<strong>post_max_size</strong>". Increase the values to your desired file size limit. For example:</p>
<pre><code class="language-textile">upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 300</code></pre>
<p>Change <strong>256M</strong> to the maximum file upload size you want, e.g., '<strong>512M</strong>' for 512 megabytes. Once the modification is made, save the php.ini file.</p>
<h2>Method 2: Editing .htaccess</h2>
<p>Also, you can increase the maximum file upload size by editing the .htaccess file in your WordPress installation directory. Add the following line:</p>
<pre><code class="language-textile">php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value max_execution_time 300</code></pre>
<p>Replace <strong>256M</strong> with your desired maximum file upload size limit. Save the .htaccess file after making the change.</p>
<h2>Method 3: Editing theme's functions.php:</h2>
<p>Add the following line of code to your active theme's functions.php:</p>
<pre><code class="language-php">@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '300' );</code></pre>
<p>You can replace '<strong>256M</strong>' with the maximum file upload size you want. Save the functions.php file after making the change.</p>
<p>After making any of these changes, navigate to Tools > Site Health > Info in your WordPress admin dashboard to verify if the maximum file upload size has increased. To confirm the new limit, look for the entries under "Server" for "<strong>Upload max filesize</strong>" and "<strong>PHP post max size</strong>".</p>
<p><strong>Note:</strong><br />
Remember that due to server resource limitations, you might not be able to increase the maximum file upload size in some shared hosting environments beyond a particular amount. You should ask for help from your hosting provider if you run into any problems or have any questions.</p>
<p>The post <a href="https://themesdna.com/blog/increase-maximum-file-upload-size-wordpress/">How to Increase Maximum File Upload Size in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/increase-maximum-file-upload-size-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Increase Maximum Execution Time in WordPress</title>
		<link>https://themesdna.com/blog/increase-maximum-execution-time-wordpress/</link>
					<comments>https://themesdna.com/blog/increase-maximum-execution-time-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 05 Apr 2024 13:55:29 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3890</guid>

					<description><![CDATA[<p>The amount of time that a single PHP script can run on your server before it times out is determined...</p>
<p>The post <a href="https://themesdna.com/blog/increase-maximum-execution-time-wordpress/">How to Increase Maximum Execution Time in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The amount of time that a single PHP script can run on your server before it times out is determined by the maximum execution time. You must increase this limit if you see errors such as "<strong>Fatal error: Maximum execution time of 30 seconds exceeded</strong>".</p>
<p>To increase the maximum execution time in WordPress, you typically need to edit the "<strong>php.ini</strong>" file or the "<strong>.htaccess</strong>" file or the "<strong>wp-config.php</strong>" file. Here's how you can do it:</p>
<h2>Method 1: Editing php.ini:</h2>
<p>If you have access to your server's "php.ini" file, you can directly increase the maximum execution time there. Look for the line that sets "<strong>max_execution_time</strong>" and increase its value. For example:</p>
<pre><code class="language-textile">max_execution_time = 300</code></pre>
<p>Replace <strong>300</strong> with your desired maximum execution time limit. For example, '<strong>600</strong>' for 600 seconds. Save the php.ini file after making the change.</p>
<h2>Method 2: Editing .htaccess</h2>
<p>Also, you can increase the time limit by editing the .htaccess file in your WordPress installation directory. Add the following line:</p>
<pre><code class="language-textile">php_value max_execution_time 300</code></pre>
<p>Replace <strong>300</strong> with the maximum execution time you want. Save the .htaccess file after making the change.</p>
<h2>Method 3: Editing wp-config.php:</h2>
<p>Open your WordPress installation directory via FTP or the file manager provided by your hosting provider, and locate the wp-config.php file.</p>
<p>Add the following line of code to wp-config.php, preferably just before the line that says /* That's all, stop editing! Happy publishing. */:</p>
<pre><code class="language-php">set_time_limit(300);</code></pre>
<p>You can replace '300' with the time limit you want to set. Save the wp-config.php file after making the change.</p>
<p>After making any of these changes, navigate to Tools > Site Health > Info in your WordPress admin dashboard to verify if the maximum execution time limit has increased. To confirm the new limit, look for the entry under "Server" for "<strong>Max execution time</strong>".</p>
<p><strong>Note:</strong><br />
Keep in mind that in some shared hosting environments, you might not be able to increase the maximum execution time limit beyond a certain amount due to server resource limitations. If you have any questions or encounter any issues, you should contact your hosting company for assistance.</p>
<p>The post <a href="https://themesdna.com/blog/increase-maximum-execution-time-wordpress/">How to Increase Maximum Execution Time in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/increase-maximum-execution-time-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Increase PHP Memory Limit in WordPress</title>
		<link>https://themesdna.com/blog/increase-php-memory-limit-wordpress/</link>
					<comments>https://themesdna.com/blog/increase-php-memory-limit-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 05 Apr 2024 04:46:13 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3888</guid>

					<description><![CDATA[<p>WordPress allocates a certain amount of memory for its processes. If you receive errors such as "Fatal error: Allowed memory...</p>
<p>The post <a href="https://themesdna.com/blog/increase-php-memory-limit-wordpress/">How to Increase PHP Memory Limit in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>WordPress allocates a certain amount of memory for its processes. If you receive errors such as "<strong>Fatal error: Allowed memory size of ... bytes exhausted</strong>", it usually means you need to increase the limit. Installing large plugins, themes with complex features, or image manipulation are all common scenarios that may require more memory.</p>
<p>To increase the memory limit in WordPress, you typically need to edit the "<strong>wp-config.php</strong>" file or the "<strong>php.ini</strong>" file or the "<strong>.htaccess</strong>" file. Here's how you can do it:</p>
<h2>Method 1: Editing wp-config.php:</h2>
<p>Open your WordPress installation directory via FTP or the file manager provided by your hosting provider, and locate the wp-config.php file.</p>
<p>Add the following line of code to wp-config.php, preferably just before the line that says <strong>/* That's all, stop editing! Happy publishing. */</strong>:</p>
<pre><code class="language-php">define( 'WP_MEMORY_LIMIT', '256M' );</code></pre>
<p>You can replace '<strong>256M</strong>' with the memory limit you want to set, e.g., '<strong>512M</strong>' for 512 megabytes. Save the wp-config.php file after making the change.</p>
<h2>Method 2: Editing php.ini:</h2>
<p>The memory limit can be directly increased in the "php.ini" file on your server if you have access to it. Locate the line that has "<strong>memory_limit</strong>" set, and change its value. For instance:</p>
<pre><code class="language-textile">memory_limit = 256M</code></pre>
<p>Change <strong>256M</strong> to the maximum amount of memory you want. Once the modification is made, save the php.ini file.</p>
<h2>Method 3: Editing .htaccess</h2>
<p>Also, you can increase the memory limit by editing the .htaccess file in your WordPress installation directory. Add the following line:</p>
<pre><code class="language-textile">php_value memory_limit 256M</code></pre>
<p>Replace <strong>256M</strong> with your desired memory limit. Save the .htaccess file after making the change.</p>
<p>After making any of these changes, navigate to Tools > Site Health > Info in your WordPress admin dashboard to verify if the memory limit has increased. To confirm the new limit, look for the entry under "Server" for "<strong>PHP memory limit</strong>".</p>
<p><strong>Note:</strong><br />
Remember that due to server resource limitations, you might not be able to raise the memory limit in some shared hosting environments beyond a particular amount. You should ask for help from your hosting provider if you run into any problems or have any questions.</p>
<p>The post <a href="https://themesdna.com/blog/increase-php-memory-limit-wordpress/">How to Increase PHP Memory Limit in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/increase-php-memory-limit-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Display Custom Post Types on Homepage in WordPress</title>
		<link>https://themesdna.com/blog/display-custom-post-types-on-homepage-wordpress/</link>
					<comments>https://themesdna.com/blog/display-custom-post-types-on-homepage-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Thu, 29 Feb 2024 03:38:36 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3880</guid>

					<description><![CDATA[<p>By default, your WordPress website's blog homepage displays the "post" post type in reverse chronological order, with the most recently...</p>
<p>The post <a href="https://themesdna.com/blog/display-custom-post-types-on-homepage-wordpress/">How to Display Custom Post Types on Homepage in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>By default, your WordPress website's blog homepage displays the "<strong>post</strong>" post type in reverse chronological order, with the most recently published "post" post type at the top. If you use custom post types, you may want to display recent posts of a custom type on your blog homepage with or without default "post" post type.</p>
<p>Let's say you have a custom post type called "<strong>books</strong>". You can display "books" post type on the homepage by choosing a code given below according to your needs and adding it to your theme's "functions.php" file.</p>
<h2>Code 1:</h2>
<p>Display "<strong>post</strong>" and "<strong>books</strong>" post types on the homepage:</p>
<pre><code class="language-php">function themesdna_custom_posts_types_on_homepage( $query ) {
    if( $query-&gt;is_main_query() &amp;&amp; ! is_admin() &amp;&amp; $query-&gt;is_home() ) {
        $query-&gt;set( 'post_type', array( 'post', 'books' ) );
    }
}
add_action( 'pre_get_posts', 'themesdna_custom_posts_types_on_homepage' );</code></pre>
<h2>Code 2:</h2>
<p>Display "<strong>post</strong>" and "<strong>books</strong>" post types on the homepage, archive pages (category pages, tag pages,...), search pages:</p>
<pre><code class="language-php">function themesdna_custom_posts_types_on_nonsingular_pages( $query ) {
    if( $query-&gt;is_main_query() &amp;&amp; ! is_admin() &amp;&amp; ( $query-&gt;is_home() || $query-&gt;is_search() || $query-&gt;is_archive() ) ) {
        $query-&gt;set( 'post_type', array( 'post', 'books' ) );
    }
}
add_action( 'pre_get_posts', 'themesdna_custom_posts_types_on_nonsingular_pages' );</code></pre>
<p>The post <a href="https://themesdna.com/blog/display-custom-post-types-on-homepage-wordpress/">How to Display Custom Post Types on Homepage in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/display-custom-post-types-on-homepage-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Display Older Posts First in WordPress Homepage</title>
		<link>https://themesdna.com/blog/display-older-posts-first-wordpress/</link>
					<comments>https://themesdna.com/blog/display-older-posts-first-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Wed, 07 Feb 2024 13:35:23 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3872</guid>

					<description><![CDATA[<p>Your WordPress blog's homepage will automatically sort all posts (not pages) by publishing date, with the most recent one at...</p>
<p>The post <a href="https://themesdna.com/blog/display-older-posts-first-wordpress/">How To Display Older Posts First in WordPress Homepage</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Your WordPress blog's homepage will automatically sort all posts (not pages) by publishing date, with the most recent one at the top. Both new and returning visitors will appreciate this, since they will not like having to go through multiple steps just to view your most recent posts.</p>
<p>But if you'd rather see older posts displayed first and aren't a fan of having the most recent ones shown first, then copy and paste the code below into your theme's "functions.php" file.</p>
<pre><code class="language-php">function themesdna_display_older_posts_first( $query ) {
    if( $query-&gt;is_main_query() &amp;&amp; ! is_admin() &amp;&amp; ( $query-&gt;is_home() || $query-&gt;is_search() || $query-&gt;is_archive() ) ) {
        $query-&gt;set( 'orderby', 'date' );
        $query-&gt;set( 'order', 'ASC' );
    }
}
add_action( 'pre_get_posts', 'themesdna_display_older_posts_first' );</code></pre>
<p><strong>Note:</strong> If you don't like to edit the functions.php file of your theme, you can use a plugin like "Code Snippets" to run custom code snippets on your site.</p>
<p>The post <a href="https://themesdna.com/blog/display-older-posts-first-wordpress/">How To Display Older Posts First in WordPress Homepage</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/display-older-posts-first-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install a WordPress Theme using FTP</title>
		<link>https://themesdna.com/blog/install-wordpress-theme-using-ftp/</link>
					<comments>https://themesdna.com/blog/install-wordpress-theme-using-ftp/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 15 Dec 2023 09:03:01 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3816</guid>

					<description><![CDATA[<p>Using FTP to install a WordPress theme is pretty easy, but it takes a few more steps than using the...</p>
<p>The post <a href="https://themesdna.com/blog/install-wordpress-theme-using-ftp/">How to Install a WordPress Theme using FTP</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Using FTP to install a WordPress theme is pretty easy, but it takes a few more steps than using the built-in theme installer.</p>
<p>This is how you can install a WordPress theme through FTP:</p>
<p>1. Download the theme's .zip file to your local computer and unzip it.<br />
2. Connect to your hosting account using an FTP client such as "FileZilla" or "Core FTP".<br />
3. Navigate to the "<strong>/wp-content/themes</strong>" folder in the "Remote site" section.<br />
4. In the "Local site" section, locate the unzipped theme folder.<br />
5. Drag and drop the unzipped theme folder from the "Local site" section to the "Remote site" section.<br />
6. Be patient and let the transfer finish.<br />
7. Once the transfer is complete, log in to your WordPress dashboard and navigate to Appearance > Themes.<br />
8. Find the theme you just uploaded and click Activate.</p>
<p>The post <a href="https://themesdna.com/blog/install-wordpress-theme-using-ftp/">How to Install a WordPress Theme using FTP</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/install-wordpress-theme-using-ftp/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install a WordPress Theme using cPanel File Manager</title>
		<link>https://themesdna.com/blog/install-wordpress-theme-using-cpanel/</link>
					<comments>https://themesdna.com/blog/install-wordpress-theme-using-cpanel/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 15 Dec 2023 03:42:17 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3813</guid>

					<description><![CDATA[<p>There are some situations where you cannot install a WordPress theme using the WordPress dashboard. One situation is when your...</p>
<p>The post <a href="https://themesdna.com/blog/install-wordpress-theme-using-cpanel/">How to Install a WordPress Theme using cPanel File Manager</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>There are some situations where you cannot install a WordPress theme using the WordPress dashboard. One situation is when your theme's zip file is larger than the maximum upload size in WordPress. Then you can install a theme using cPanel's File Manager option.</p>
<p>It is easier than installing a theme using FTP. Follow the steps given below to install a theme using the file manager in cPanel.</p>
<p>1. Log in to your cPanel account. Your cPanel URL will be <strong>https://yourdomain.com/cpanel</strong> or a similar URL.</p>
<p>2. Click on the "<strong>File Manager</strong>" icon. It's usually under the "<strong>Files</strong>" section.</p>
<p><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2023/12/cPanel-File-Manager.png" alt="" width="714" height="329" class="alignnone size-full wp-image-3815" /></p>
<p>3. You are now in the "File Manager". Open the "<strong>public_html</strong>" folder, which is your website's root directory.</p>
<p>4. Locate the "<strong>wp-content</strong>" folder inside "public_html," then open the "<strong>themes</strong>" folder inside of it.</p>
<p>5. In the File Manager interface, click the "<strong>Upload</strong>" button and choose the theme's .zip file from your local drive.</p>
<p>6. After it has been uploaded, right-click the .zip file and choose "<strong>Extract</strong>" or "<strong>Unzip</strong>".</p>
<p>7. You can now delete the uploaded .zip file, but it's optional.</p>
<p>8. Log in to your WordPress dashboard through your web browser.</p>
<p>9. Go to Appearance -> Themes. Now you will see the newly extracted theme.</p>
<p>10. Make it your active theme by clicking the "Activate" button next to it.</p>
<p>The post <a href="https://themesdna.com/blog/install-wordpress-theme-using-cpanel/">How to Install a WordPress Theme using cPanel File Manager</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/install-wordpress-theme-using-cpanel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable Image Compression in WordPress</title>
		<link>https://themesdna.com/blog/disable-image-compression-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-image-compression-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Thu, 14 Dec 2023 09:30:13 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3809</guid>

					<description><![CDATA[<p>Have you noticed the blurred appearance of the images you have uploaded to your WordPress website? When you upload images...</p>
<p>The post <a href="https://themesdna.com/blog/disable-image-compression-wordpress/">How to Disable Image Compression in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Have you noticed the blurred appearance of the images you have uploaded to your WordPress website? When you upload images to the media library, WordPress automatically compresses them for better performance. If you are a webmaster who wants to display high-quality images on your website, you can disable image compression in WordPress.</p>
<p>You can disable image compression in WordPress by adding the below code to your theme's functions.php file:</p>
<pre><code class="language-php">function themesdna_disable_image_compression() {
    add_filter('jpeg_quality', function($arg){return 100;});
    add_filter('wp_editor_set_quality', function($arg){return 100;});
}
add_action('init', 'themesdna_disable_image_compression');</code></pre>
<p>The above code will turn off JPEG compression on your website. 100 indicates that there is no compression. The lower the number, the greater the compression.</p>
<p>Note: Images you have already uploaded will not be impacted by this modification.</p>
<p>The post <a href="https://themesdna.com/blog/disable-image-compression-wordpress/">How to Disable Image Compression in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-image-compression-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable Large Image Scaling in WordPress</title>
		<link>https://themesdna.com/blog/disable-large-image-scaling-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-large-image-scaling-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Mon, 11 Dec 2023 06:05:26 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3807</guid>

					<description><![CDATA[<p>WordPress 5.3 introduced image scaling for images over 2560px. Now WordPress automatically scales large images to speed up your site....</p>
<p>The post <a href="https://themesdna.com/blog/disable-large-image-scaling-wordpress/">How to Disable Large Image Scaling in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>WordPress 5.3 introduced image scaling for images over 2560px. Now WordPress automatically scales large images to speed up your site. When you upload a large image to WordPress, the file will likely end in "-scaled.jpg", "-scaled.png", etc. For example, an image uploaded at 4800px by 3600px will be scaled to 2560px by 1920px. This is great for most sites, especially for users who upload large files and may not realize their size. Since most site visitors won't need to view large image files, setting WordPress to maximum improves performance.</p>
<p>If you don't like this feature and want to disable WordPress's automatic large image scaling, add the following PHP code to your theme's functions.php file:</p>
<pre><code class="language-php">// Disable automatic image scaling feature of WordPress
add_filter( 'big_image_size_threshold', '__return_false' );</code></pre>
<p>Note: After you add the above snippet to your site, large images will no longer be scaled down. Please keep in mind that this will have no effect on previous uploads.</p>
<p>However, if you do not want to disable the large image scaling feature of WordPress but want to increase the size of the image scaling threshold, then you can use the below snippet instead of the above snippet.</p>
<pre><code class="language-php">// increase the image size threshold to 4200px
function themesdna_big_image_size_threshold( $threshold ) {
    return 4200; // new threshold
}
add_filter('big_image_size_threshold', 'themesdna_big_image_size_threshold', 999, 1);</code></pre>
<p>Note: Above code will increase the image size threshold to "4200px". You can change "4200" value to any value you like.</p>
<p>The post <a href="https://themesdna.com/blog/disable-large-image-scaling-wordpress/">How to Disable Large Image Scaling in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-large-image-scaling-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Disable Right Click and Copy Events from WordPress Frontend</title>
		<link>https://themesdna.com/blog/disable-right-click-copy-events-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-right-click-copy-events-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sat, 25 Nov 2023 16:46:48 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3804</guid>

					<description><![CDATA[<p>Do you want to prevent users from copying the content of your WordPress website? By using the PHP snippet given...</p>
<p>The post <a href="https://themesdna.com/blog/disable-right-click-copy-events-wordpress/">Disable Right Click and Copy Events from WordPress Frontend</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Do you want to prevent users from copying the content of your WordPress website? By using the PHP snippet given below, it will stop users from right-clicking on your website and copying the content of your website. Add it to your theme's functions.php file:</p>
<pre><code class="language-php">function themesdna_disable_right_click_copy_events() {
    ?&gt;
    &lt;script&gt;
    document.addEventListener(&quot;contextmenu&quot;, (evt) =&gt; {evt.preventDefault();}, false);
    document.addEventListener(&quot;copy&quot;, (evt) =&gt; {
      evt.clipboardData.setData(&quot;text/plain&quot;, &quot;You do not have permission to copy our content.&quot;);
      evt.preventDefault();
    }, false);
    &lt;/script&gt;
    &lt;?php
}
add_action('wp_head', 'themesdna_disable_right_click_copy_events');</code></pre>
<p>The post <a href="https://themesdna.com/blog/disable-right-click-copy-events-wordpress/">Disable Right Click and Copy Events from WordPress Frontend</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-right-click-copy-events-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Allow HTML Tags in Author Biographical Info in WordPress</title>
		<link>https://themesdna.com/blog/allow-html-tags-wordpress-author-biographical-info/</link>
					<comments>https://themesdna.com/blog/allow-html-tags-wordpress-author-biographical-info/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Tue, 21 Nov 2023 03:59:07 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3800</guid>

					<description><![CDATA[<p>The "Biographical Info" field for authors in WordPress does not support all HTML tags. By default, the "strong" and "a...</p>
<p>The post <a href="https://themesdna.com/blog/allow-html-tags-wordpress-author-biographical-info/">Allow HTML Tags in Author Biographical Info in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The "Biographical Info" field for authors in WordPress does not support all HTML tags. By default, the "strong" and "a href" tags are available for use. Some authors may find it helpful to break up lengthy biographies into sections using HTML's paragraph (p), line break (br) and other tags. The following code must be added to the functions.php file of your theme in order to enable this feature.</p>
<pre><code class="language-php">// Disable WordPress sanitization to allow more than just $allowedtags from /wp-includes/kses.php
remove_filter('pre_user_description', 'wp_filter_kses');

// Add sanitization for WordPress posts
add_filter( 'pre_user_description', 'wp_filter_post_kses');</code></pre>
<p><strong>Note:</strong><br />
For security reasons, WordPress sanitizes user input. If you're thinking about turning off WordPress sanitization, make sure you trust your users not to put potentially harmful content in their profile bios. This includes iframes, forms, and other elements.</p>
<p>The post <a href="https://themesdna.com/blog/allow-html-tags-wordpress-author-biographical-info/">Allow HTML Tags in Author Biographical Info in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/allow-html-tags-wordpress-author-biographical-info/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable Search Queries in WordPress</title>
		<link>https://themesdna.com/blog/disable-search-queries-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-search-queries-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 17 Nov 2023 05:33:01 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3798</guid>

					<description><![CDATA[<p>Disabling search queries in WordPress is not a common practice, as the search functionality is very useful for many websites....</p>
<p>The post <a href="https://themesdna.com/blog/disable-search-queries-wordpress/">How to Disable Search Queries in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Disabling search queries in WordPress is not a common practice, as the search functionality is very useful for many websites. However, if you need to disable search queries for a specific reason, you can do so by adding the following code to your theme's functions.php file:</p>
<pre><code class="language-php">function themesdna_disable_search_queries( $query, $error = true ) {
    if ( is_search() &amp;&amp; ! is_admin() ) {
        $query-&gt;is_search       = false;
        $query-&gt;query_vars['s'] = false;
        $query-&gt;query['s']      = false;
        if ( true === $error ) {
            $query-&gt;is_404 = true;
        }
    }
}
add_action( 'parse_query', 'themesdna_disable_search_queries', 15, 2 );</code></pre>
<p>The post <a href="https://themesdna.com/blog/disable-search-queries-wordpress/">How to Disable Search Queries in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-search-queries-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Enable WordPress Shortcodes in Text Widgets</title>
		<link>https://themesdna.com/blog/enable-wordpress-shortcodes-text-widgets/</link>
					<comments>https://themesdna.com/blog/enable-wordpress-shortcodes-text-widgets/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sat, 04 Nov 2023 03:58:03 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3781</guid>

					<description><![CDATA[<p>WordPress does not enable shortcodes in text widgets by default. But it would be fairly simple to enable them because...</p>
<p>The post <a href="https://themesdna.com/blog/enable-wordpress-shortcodes-text-widgets/">How to Enable WordPress Shortcodes in Text Widgets</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>WordPress does not enable shortcodes in text widgets by default. But it would be fairly simple to enable them because a text widget's text passes through a filter called "widget_text." To enable shortcodes inside WordPress text widgets, add this shortcode to your theme's functions.php file:</p>
<pre><code class="language-php">add_filter( 'widget_text', 'do_shortcode' );</code></pre>
<p>The post <a href="https://themesdna.com/blog/enable-wordpress-shortcodes-text-widgets/">How to Enable WordPress Shortcodes in Text Widgets</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/enable-wordpress-shortcodes-text-widgets/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable REST API Links in WordPress</title>
		<link>https://themesdna.com/blog/disable-rest-api-links-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-rest-api-links-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 13 Oct 2023 05:20:18 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3754</guid>

					<description><![CDATA[<p>You can get rid of all head links to the REST API endpoints from the page source by adding the...</p>
<p>The post <a href="https://themesdna.com/blog/disable-rest-api-links-wordpress/">How to Disable REST API Links in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>You can get rid of all head links to the REST API endpoints from the page source by adding the following code to your theme's functions.php file.</p>
<pre><code class="language-php">remove_action( 'xmlrpc_rsd_apis', 'rest_output_rsd' );
remove_action( 'wp_head', 'rest_output_link_wp_head' );
remove_action( 'template_redirect', 'rest_output_link_header', 11 );</code></pre>
<p>The post <a href="https://themesdna.com/blog/disable-rest-api-links-wordpress/">How to Disable REST API Links in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-rest-api-links-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable Lazy Load in WordPress</title>
		<link>https://themesdna.com/blog/disable-lazy-load-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-lazy-load-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Tue, 10 Oct 2023 04:08:13 +0000</pubDate>
				<category><![CDATA[WordPress Snippets]]></category>
		<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3748</guid>

					<description><![CDATA[<p>The lazy-loading images feature was introduced with WordPress 5.5. With this change, both servers and user agents will use a...</p>
<p>The post <a href="https://themesdna.com/blog/disable-lazy-load-wordpress/">How to Disable Lazy Load in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The lazy-loading images feature was introduced with WordPress 5.5. With this change, both servers and user agents will use a lot less bandwidth. Before, images further down the page would load right away, even if the user never scrolled to see them. But this might make some websites less user-friendly because images might not show up right away.</p>
<p>Do you also have issues with the lazy load feature in WordPress and need to disable it? You can insert the below code into your theme's functions.php file to prevent WordPress from adding the lazy-load attribute to all images and iframes.</p>
<pre><code class="language-php">// Disable Lazy Load Feature from WordPress
add_filter( 'wp_lazy_loading_enabled', '__return_false', 1000 );</code></pre>
<p>The post <a href="https://themesdna.com/blog/disable-lazy-load-wordpress/">How to Disable Lazy Load in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-lazy-load-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Disable WordPress Admin Email Verification Notice</title>
		<link>https://themesdna.com/blog/disable-wordpress-admin-email-verification-notice/</link>
					<comments>https://themesdna.com/blog/disable-wordpress-admin-email-verification-notice/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Tue, 10 Oct 2023 03:08:04 +0000</pubDate>
				<category><![CDATA[WordPress Snippets]]></category>
		<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3746</guid>

					<description><![CDATA[<p>WordPress 5.3 introduces the "Administration email verification" screen for checking the site administrator's email to make sure it is up-to-date...</p>
<p>The post <a href="https://themesdna.com/blog/disable-wordpress-admin-email-verification-notice/">How To Disable WordPress Admin Email Verification Notice</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>WordPress 5.3 introduces the "Administration email verification" screen for checking the site administrator's email to make sure it is up-to-date and correct. The admin email is a crucial part of any WordPress site, and you can change it by going to "WordPress Dashboard" > "Settings" > "General". If, however, you feel that this admin email verification screen is unnecessary for your site, you can disable it by inserting the following code into your "functions.php" file:</p>
<pre><code class="language-php">// Disable WordPress Administration Email verification Screen 
add_filter( 'admin_email_check_interval', '__return_false' );</code></pre>
<p>The post <a href="https://themesdna.com/blog/disable-wordpress-admin-email-verification-notice/">How To Disable WordPress Admin Email Verification Notice</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-wordpress-admin-email-verification-notice/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable RSS Feeds in WordPress</title>
		<link>https://themesdna.com/blog/disable-rss-feeds-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-rss-feeds-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Mon, 09 Oct 2023 15:24:38 +0000</pubDate>
				<category><![CDATA[WordPress Snippets]]></category>
		<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3744</guid>

					<description><![CDATA[<p>Would you like to turn off RSS feeds on your WordPress site? People can subscribe to your blog posts with...</p>
<p>The post <a href="https://themesdna.com/blog/disable-rss-feeds-wordpress/">How to Disable RSS Feeds in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Would you like to turn off RSS feeds on your WordPress site? People can subscribe to your blog posts with RSS feeds. But if you're making a small, static website, you might want to turn off the RSS feeds. WordPress doesn't have a way to get rid of RSS feeds by default.</p>
<p>By adding the below code snippet to your functions.php file, you can disable all the feed addresses and remove feed links from the header.</p>
<pre><code class="language-php">// A message to display instead of the feeds.
function themesdna_disable_feed() {
    wp_die(
        sprintf(
            // Translators: Placeholders for the homepage link.
            esc_html__( 'No feed available, please visit our %1$shomepage%2$s!' ),
            ' &lt;a href=&quot;' . esc_url( home_url( '/' ) ) . '&quot;&gt;',
            '&lt;/a&gt;'
        )
    );
}

// Replace all feeds with the message above.
add_action( 'do_feed', 'themesdna_disable_feed', 1 );
add_action( 'do_feed_rdf', 'themesdna_disable_feed', 1 );
add_action( 'do_feed_rss', 'themesdna_disable_feed', 1 );
add_action( 'do_feed_rss2', 'themesdna_disable_feed', 1 );
add_action( 'do_feed_atom', 'themesdna_disable_feed', 1 );
add_action( 'do_feed_rss2_comments', 'themesdna_disable_feed', 1 );
add_action( 'do_feed_atom_comments', 'themesdna_disable_feed', 1 );

// Remove links to feed from the header.
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'feed_links', 2 );</code></pre>
<p>The post <a href="https://themesdna.com/blog/disable-rss-feeds-wordpress/">How to Disable RSS Feeds in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-rss-feeds-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable Automatic Updates in WordPress</title>
		<link>https://themesdna.com/blog/disable-automatic-updates-wordpress/</link>
					<comments>https://themesdna.com/blog/disable-automatic-updates-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Mon, 09 Oct 2023 11:02:41 +0000</pubDate>
				<category><![CDATA[WordPress Snippets]]></category>
		<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3741</guid>

					<description><![CDATA[<p>WordPress core software is automatically updated for security purposes. It may also update plugins and themes when necessary to address...</p>
<p>The post <a href="https://themesdna.com/blog/disable-automatic-updates-wordpress/">How to Disable Automatic Updates in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>WordPress core software is automatically updated for security purposes. It may also update plugins and themes when necessary to address security issues. However, updates can occasionally cause issues with your website's functionality. It's possible that this will cause you to lose clients as a result. You can safely turn off WordPress's auto-update feature if you're comfortable handling updates manually.</p>
<p>By adding the below code snippet to your functions.php file, you can stop WordPress from automatically updating its core files, plugins, and themes.</p>
<pre><code class="language-php">// Disable core auto-updates
add_filter( 'auto_update_core', '__return_false' );

// Disable auto-updates for plugins.
add_filter( 'auto_update_plugin', '__return_false' );

// Disable auto-updates for themes.
add_filter( 'auto_update_theme', '__return_false' );</code></pre>
<p>The post <a href="https://themesdna.com/blog/disable-automatic-updates-wordpress/">How to Disable Automatic Updates in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-automatic-updates-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Order Posts by Number of Comments in WordPress</title>
		<link>https://themesdna.com/blog/order-posts-by-number-of-comments-wordpress/</link>
					<comments>https://themesdna.com/blog/order-posts-by-number-of-comments-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Mon, 14 Aug 2023 13:45:36 +0000</pubDate>
				<category><![CDATA[WordPress Snippets]]></category>
		<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3708</guid>

					<description><![CDATA[<p>The blog homepage on your WordPress website by default presents all published posts (not pages) in reverse chronological order, with...</p>
<p>The post <a href="https://themesdna.com/blog/order-posts-by-number-of-comments-wordpress/">How to Order Posts by Number of Comments in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The blog homepage on your WordPress website by default presents all published posts (not pages) in reverse chronological order, with the most recent post appearing at the top. That is for the convenience of both returning visitors who come to read your most recent posts and new visitors who are unlikely to be happy about having to go through several steps to see your most recent posts.</p>
<p>But if you don't like that above "sort posts by published date" behavior and need to "<strong>sort posts by number of comments</strong>", then select a code given below according to your need and add it into your theme's "<strong>functions.php</strong>" file.</p>
<h2>Code 1:</h2>
<p>Sort <strong>Homepage</strong> Posts by Number of Comments:</p>
<pre><code class="language-php">function themesdna_sort_homepage_posts_by_number_of_comments( $query ) {
    if( $query-&gt;is_main_query() &amp;&amp; ! is_admin() &amp;&amp; $query-&gt;is_home() ) {
        $query-&gt;set( 'orderby', 'comment_count' );
        $query-&gt;set( 'order', 'DESC' );
    }
}
add_action( 'pre_get_posts', 'themesdna_sort_homepage_posts_by_number_of_comments' );</code></pre>
<h2>Code 2:</h2>
<p>Sort <strong>Homepage</strong>, <strong>Archive Pages (Category Pages, Tag Pages,...)</strong>, <strong>Search Pages</strong> Posts by Number of Comments:</p>
<pre><code class="language-php">function themesdna_sort_posts_by_number_of_comments( $query ) {
    if( $query-&gt;is_main_query() &amp;&amp; ! is_admin() &amp;&amp; ( $query-&gt;is_home() || $query-&gt;is_search() || $query-&gt;is_archive() ) ) {
        $query-&gt;set( 'orderby', 'comment_count' );
        $query-&gt;set( 'order', 'DESC' );
    }
}
add_action( 'pre_get_posts', 'themesdna_sort_posts_by_number_of_comments' );</code></pre>
<p><strong>Note:</strong> If you don't like to edit the functions.php file of your theme, you can use a plugin like "Code Snippets" to run custom code snippets on your site.</p>
<p>The post <a href="https://themesdna.com/blog/order-posts-by-number-of-comments-wordpress/">How to Order Posts by Number of Comments in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/order-posts-by-number-of-comments-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Translate a WordPress Theme with Loco Translate Plugin</title>
		<link>https://themesdna.com/blog/translate-wordpress-theme-with-loco-translate/</link>
					<comments>https://themesdna.com/blog/translate-wordpress-theme-with-loco-translate/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Tue, 15 Nov 2022 04:40:10 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3188</guid>

					<description><![CDATA[<p>Loco Translate plugin lets you edit WordPress translation files right in your browser and connects to automatic translation services. This tutorial...</p>
<p>The post <a href="https://themesdna.com/blog/translate-wordpress-theme-with-loco-translate/">How to Translate a WordPress Theme with Loco Translate Plugin</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Loco Translate plugin lets you edit WordPress translation files right in your browser and connects to automatic translation services. This tutorial explains how to translate a theme into your language using Loco Translate.</p>
<h2>Step 1:</h2>
<p>Install and activate the "<a href="https://wordpress.org/plugins/loco-translate/" rel="nofollow noopener" target="_blank">Loco Translate</a>" plugin.</p>
<h2>Step 2:</h2>
<p>Navigate to the "<strong>Loco translate</strong>" > "<strong>Themes</strong>" section. Here we can see a list of themes that are installed on your website. Within this list, you will see the name of the theme you want to translate. Once identified, click on it to proceed to the next screen.</p>
<div class="alignwidearea"><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2022/11/loco-translate-themes-section.png" alt="Loco Translate Themes Section" width="965" height="760" class="alignnone size-full wp-image-3189" style="-webkit-box-shadow:0 0 5px #675b5b;-moz-box-shadow:0 0 5px #675b5b;box-shadow:0 0 5px #675b5b;padding:0;background:#ddd;" srcset="https://themesdna.com/wp-content/uploads/2022/11/loco-translate-themes-section.png 965w, https://themesdna.com/wp-content/uploads/2022/11/loco-translate-themes-section-768x605.png 768w" sizes="auto, (max-width: 965px) 100vw, 965px" /></div>
<h2>Step 3:</h2>
<p>There are no existing language translations in the theme. Because of this, you need to click on the "<strong>New Language</strong>" link.</p>
<div class="alignwidearea"><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2022/11/loco-translate-new-language.png" alt="Loco Translate New Language Link" width="965" height="277" class="alignnone size-full wp-image-3190" style="-webkit-box-shadow:0 0 5px #675b5b;-moz-box-shadow:0 0 5px #675b5b;box-shadow:0 0 5px #675b5b;padding:0;background:#ddd;" srcset="https://themesdna.com/wp-content/uploads/2022/11/loco-translate-new-language.png 965w, https://themesdna.com/wp-content/uploads/2022/11/loco-translate-new-language-768x220.png 768w" sizes="auto, (max-width: 965px) 100vw, 965px" /></div>
<h2>Step 4:</h2>
<p>Select a <strong>language</strong> from the drop-down list on the next screen, as well as the <strong>location</strong> to save your translations.</p>
<div class="alignwidearea"><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2022/11/loco-translate-select-language-and-location.png" alt="Loco Translate Select Language and Location" width="965" height="644" class="alignnone size-full wp-image-3191" style="-webkit-box-shadow:0 0 5px #675b5b;-moz-box-shadow:0 0 5px #675b5b;box-shadow:0 0 5px #675b5b;padding:0;background:#ddd;" srcset="https://themesdna.com/wp-content/uploads/2022/11/loco-translate-select-language-and-location.png 965w, https://themesdna.com/wp-content/uploads/2022/11/loco-translate-select-language-and-location-768x513.png 768w" sizes="auto, (max-width: 965px) 100vw, 965px" /></div>
<p>Once you are done specifying your language and file location, click on the "<strong>Start translating</strong>" button to begin translating the theme strings.</p>
<h2>Step 5:</h2>
<p>Now you will see the translating screen. There are 2 core sections on this translating screen.<br />
- The upper "<strong>source text</strong>" section containing the English strings.<br />
- The bottom "<strong>translation</strong>" section which is where you fill in your string translations.</p>
<p>Once you are done with a string Translation, ensure that you save your changes by clicking on the "<strong>Save</strong>" button.</p>
<p>The post <a href="https://themesdna.com/blog/translate-wordpress-theme-with-loco-translate/">How to Translate a WordPress Theme with Loco Translate Plugin</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/translate-wordpress-theme-with-loco-translate/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Translate a WordPress Theme with Poedit Software</title>
		<link>https://themesdna.com/blog/translate-wordpress-theme-with-poedit/</link>
					<comments>https://themesdna.com/blog/translate-wordpress-theme-with-poedit/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Tue, 15 Nov 2022 04:14:03 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=3183</guid>

					<description><![CDATA[<p>Poedit is a software (available for Windows, Mac and Linux) which you can use to translate a theme or a...</p>
<p>The post <a href="https://themesdna.com/blog/translate-wordpress-theme-with-poedit/">How to Translate a WordPress Theme with Poedit Software</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2022/11/Translate-a-WordPress-Theme-with-Poedit-Software.jpg" alt="Translate a WordPress Theme with Poedit Software" width="1480" height="846" class="alignnone size-full wp-image-3983" srcset="https://themesdna.com/wp-content/uploads/2022/11/Translate-a-WordPress-Theme-with-Poedit-Software.jpg 1480w, https://themesdna.com/wp-content/uploads/2022/11/Translate-a-WordPress-Theme-with-Poedit-Software-768x439.jpg 768w" sizes="auto, (max-width: 1480px) 100vw, 1480px" /></p>
<p>Poedit is a software (available for Windows, Mac and Linux) which you can use to translate a theme or a plugin. Translating a WordPress theme with Poedit software is a straightforward process that enhances your site's accessibility to a global audience. Poedit is a user-friendly application that allows you to edit .po and .mo files, which are essential for theme translation. By extracting strings from your theme's code, Poedit enables you to provide translations for text elements, ensuring that your content resonates with users in their native language. This guide will walk you through the steps to efficiently use Poedit to translate your WordPress theme, making your site more inclusive and widely accessible.</p>
<h2>What is the ".pot" file?</h2>
<p>A ".pot" file contains a list of all the original texts (in English) that need to be translated. The .pot file is used as a starting point for new translations. Each of our WordPress themes has a ".pot" file in the "languages" folder. So the.pot file's path is: <strong>wp-content/themes/theme-name/languages/theme-name.pot</strong></p>
<h2>Step 1:</h2>
<p>The first step is to download <a href="https://poedit.net/" rel="nofollow noopener" target="_blank">Poedit</a>, a free piece of software that is compatible with operating systems such as Windows, MacOS, and Linux. After you’ve installed the Poedit software, you can start translating.</p>
<h2>Step 2:</h2>
<p>Locate the "<strong>.pot</strong>" file in the "<strong>wp-content/themes/theme-name/languages/</strong>" folder and copy it to your hard drive for editing.</p>
<h2>Step 3:</h2>
<p>Open the Poedit software. You will see the options to either edit or create translation files.</p>
<p><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2022/11/poedit-welcome-screen.png" alt="Poedit Welcome Screen" width="858" height="668" class="size-full wp-image-3185" style="-webkit-box-shadow:0 0 5px #675b5b;-moz-box-shadow:0 0 5px #675b5b;box-shadow:0 0 5px #675b5b;padding:0;background:#ddd;" srcset="https://themesdna.com/wp-content/uploads/2022/11/poedit-welcome-screen.png 858w, https://themesdna.com/wp-content/uploads/2022/11/poedit-welcome-screen-768x598.png 768w" sizes="auto, (max-width: 858px) 100vw, 858px" /></p>
<h2>Step 4:</h2>
<p>Click on the "<strong>Create new translation</strong>" option. Locate and open the ".pot" file that you previously saved to your hard drive. Now Poedit will ask for the "<strong>Translation Language</strong>". Select the language you want to translate the theme into from the drop down list and click the "<strong>OK</strong>" button.</p>
<p>In the below example, I select "Spanish (Spain)" as the translation language.</p>
<p><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2022/11/poedit-select-translation-language.png" alt="Poedit Select Translation Language" width="855" height="767" class="alignnone size-full wp-image-3186" style="-webkit-box-shadow:0 0 5px #675b5b;-moz-box-shadow:0 0 5px #675b5b;box-shadow:0 0 5px #675b5b;padding:0;background:#ddd;" srcset="https://themesdna.com/wp-content/uploads/2022/11/poedit-select-translation-language.png 855w, https://themesdna.com/wp-content/uploads/2022/11/poedit-select-translation-language-768x689.png 768w" sizes="auto, (max-width: 855px) 100vw, 855px" /></p>
<h2>Step 5:</h2>
<p>You will now see a list of all the strings (source texts) in the.pot file.  To translate the theme, you need to click on <strong>each source text</strong>, then use the "<strong>Translation:</strong>" field at the bottom to enter your translation, or simply choose a word recommended by Poedit in the right side. Repeat this step for all the source texts you want to translate.</p>
<p><strong><u>Note:</u></strong><br />
- You have to respect all special characters from the source text when translating (look at the <a href="https://themesdna.com/wp-content/uploads/2022/11/poedit-special-characters.png" rel="noopener" target="_blank">screen capture</a>)<br />
- It is not necessary translate all source texts.</p>
<h2>Step 6:</h2>
<p>When you are done translating strings, go to "<strong>File</strong>" > "<strong>Save as...</strong>" and save your file as a "<strong>.po</strong>" translation file.</p>
<p><strong><u>Note:</u></strong><br />
When you save it as a ".po" file, you should follow the naming convention based on the "<strong>language code</strong>" and the "<strong>country code</strong>". The first lower-case letters define the "language", whereas the second upper-case letters define the "country".</p>
<p>Examples:<br />
When your language is "Spanish" and country is "Spain", .po file should be named as "<strong>es_ES.po</strong>".<br />
When your language is "Portuguese" and country is "Brazil", .po file should be named as "<strong>pt_BR.po</strong>".<br />
When your language is "German" and country is "Germany", .po file should be named as "<strong>de_DE.po</strong>".<br />
When your language is "English" and country is "United Kingdom", .po file should be named as "<strong>en_GB.po</strong>".<br />
When your language is "English" and country is "Sweden", .po file should be named as "<strong>en_SE.po</strong>".</p>
<p>You can check out here to find your language and country codes: <a href="https://www.gnu.org/software/gettext/manual/gettext.html#Language-Codes" rel="nofollow noopener" target="_blank">https://www.gnu.org/software/gettext/manual/gettext.html#Language-Codes</a></p>
<p>With Poedit software, however, we do not need to remember this naming convention. Poedit will automatically name your .po file correctly. Because I selected "<strong>Spanish (Spain)</strong>" as the translation language in step 4, my .po file name should be "<strong>es_ES.po</strong>".</p>
<h2>Step 7:</h2>
<p>When you save the .po file, the .mo file will be generated automatically as a compiled version of .po file.</p>
<p>Upload <strong>both</strong> these "<strong>.po</strong>" and "<strong>.mo</strong>" files to the "<strong>languages</strong>" folder of your theme (wp-content/themes/theme-name/languages/).</p>
<p>The post <a href="https://themesdna.com/blog/translate-wordpress-theme-with-poedit/">How to Translate a WordPress Theme with Poedit Software</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/translate-wordpress-theme-with-poedit/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Display Posts in a Random Order in WordPress</title>
		<link>https://themesdna.com/blog/display-posts-random-order-wordpress/</link>
					<comments>https://themesdna.com/blog/display-posts-random-order-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sun, 31 Jul 2022 01:01:42 +0000</pubDate>
				<category><![CDATA[WordPress Snippets]]></category>
		<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=2666</guid>

					<description><![CDATA[<p>By default, the blog homepage of your WordPress website displays all published posts (not pages) in reverse chronological order, with...</p>
<p>The post <a href="https://themesdna.com/blog/display-posts-random-order-wordpress/">How To Display Posts in a Random Order in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>By default, the blog homepage of your WordPress website displays all published posts (not pages) in reverse chronological order, with the most recently published post at the top. This is for the benefit of returning visitors who come to read your latest posts, as well as new visitors who are unlikely to be pleased with having to go through several steps to see your latest posts.</p>
<p>But if you don't like this "sort posts by published date" behavior and need to "sort posts by random order", then select a code given below according to your need and add it into your theme's "functions.php" file.</p>
<h2>Code 1:</h2>
<p>Sort <strong>Homepage</strong> Posts Randomly:</p>
<pre><code class="language-php">function themesdna_sort_homepage_posts_by_random_order( $query ) {
    if( $query-&gt;is_main_query() &amp;&amp; ! is_admin() &amp;&amp; $query-&gt;is_home() ) {
        $query-&gt;set( 'orderby', 'rand' );
        $query-&gt;set( 'order', 'DESC' );
    }
}
add_action( 'pre_get_posts', 'themesdna_sort_homepage_posts_by_random_order' );</code></pre>
<h2>Code 2:</h2>
<p>Sort <strong>Homepage</strong>, <strong>Archive Pages (Category Pages, Tag Pages,...)</strong>, <strong>Search Pages</strong> Posts Randomly:</p>
<pre><code class="language-php">function themesdna_sort_posts_by_random_order( $query ) {
    if( $query-&gt;is_main_query() &amp;&amp; ! is_admin() &amp;&amp; ( $query-&gt;is_home() || $query-&gt;is_search() || $query-&gt;is_archive() ) ) {
        $query-&gt;set( 'orderby', 'rand' );
        $query-&gt;set( 'order', 'DESC' );
    }
}
add_action( 'pre_get_posts', 'themesdna_sort_posts_by_random_order' );</code></pre>
<p><strong>Note:</strong> If you don't like to edit the functions.php file of your theme, you can use a plugin like "Code Snippets" to run custom code snippets on your site.</p>
<p>The post <a href="https://themesdna.com/blog/display-posts-random-order-wordpress/">How To Display Posts in a Random Order in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/display-posts-random-order-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Order Posts by Modified Date in WordPress</title>
		<link>https://themesdna.com/blog/order-posts-by-modified-date-wordpress/</link>
					<comments>https://themesdna.com/blog/order-posts-by-modified-date-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sun, 24 Apr 2022 14:07:59 +0000</pubDate>
				<category><![CDATA[WordPress Snippets]]></category>
		<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=2552</guid>

					<description><![CDATA[<p>By default, your WordPress website's blog homepage displays all published posts (not pages) in reverse chronological order, with the most...</p>
<p>The post <a href="https://themesdna.com/blog/order-posts-by-modified-date-wordpress/">How to Order Posts by Modified Date in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>By default, your WordPress website's blog homepage displays all published posts (not pages) in reverse chronological order, with the most recently published post at the top. That is for the convenience of returning visitors who come to read your latest posts, as well as for the convenience of new visitors who are unlikely to be pleased with having to go through several steps to see your latest posts.</p>
<p>But if you don't like that above "sort posts by published date" behavior and need to "<strong>sort posts by modified date</strong>", then select a code given below according to your need and add it into your theme's "<strong>functions.php</strong>" file.</p>
<h2>Code 1:</h2>
<p>Sort <strong>Homepage</strong> Posts by Modified Date:</p>
<pre><code class="language-php">function themesdna_sort_homepage_posts_by_modified_date( $query ) {
    if( $query-&gt;is_main_query() &amp;&amp; ! is_admin() &amp;&amp; $query-&gt;is_home() ) {
        $query-&gt;set( 'orderby', 'modified' );
        $query-&gt;set( 'order', 'DESC' );
    }
}
add_action( 'pre_get_posts', 'themesdna_sort_homepage_posts_by_modified_date' );</code></pre>
<h2>Code 2:</h2>
<p>Sort <strong>Homepage</strong>, <strong>Archive Pages (Category Pages, Tag Pages,...)</strong>, <strong>Search Pages</strong> Posts by Modified Date:</p>
<pre><code class="language-php">function themesdna_sort_posts_by_modified_date( $query ) {
    if( $query-&gt;is_main_query() &amp;&amp; ! is_admin() &amp;&amp; ( $query-&gt;is_home() || $query-&gt;is_search() || $query-&gt;is_archive() ) ) {
        $query-&gt;set( 'orderby', 'modified' );
        $query-&gt;set( 'order', 'DESC' );
    }
}
add_action( 'pre_get_posts', 'themesdna_sort_posts_by_modified_date' );</code></pre>
<p><strong>Note:</strong> If you don't like to edit the functions.php file of your theme, you can use a plugin like "Code Snippets" to run custom code snippets on your site.</p>
<p>The post <a href="https://themesdna.com/blog/order-posts-by-modified-date-wordpress/">How to Order Posts by Modified Date in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/order-posts-by-modified-date-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Change the Number of Posts Per Page in WordPress</title>
		<link>https://themesdna.com/blog/change-number-of-posts-per-page-wordpress/</link>
					<comments>https://themesdna.com/blog/change-number-of-posts-per-page-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 03 Sep 2021 06:06:44 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=2051</guid>

					<description><![CDATA[<p>Do you want to change the number of posts that are displayed on the blog page of your WordPress website?...</p>
<p>The post <a href="https://themesdna.com/blog/change-number-of-posts-per-page-wordpress/">How to Change the Number of Posts Per Page in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Do you want to change the number of posts that are displayed on the blog page of your WordPress website? By default, no matter which theme is used, all WordPress archive pages display a maximum of 10 posts per page by default. In order to show as many posts as you want, you can easily alter this value from the dashboard settings menu. Follow this tutorial to learn how to quickly and easily modify the number of posts that appear on your WordPress blog page.</p>
<p>1. First go to your "WordPress Dashboard" -> "Settings" -> "Reading".</p>
<p>2. Now change "Blog pages show at most" value to any value you like. For example, if you wish to display 20 posts per page, you would enter the number 20 as the value.</p>
<p>3. After that click on "Save Changes" button.</p>
<p><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2021/09/Change-the-Number-of-Posts-Per-Page-in-WordPress.jpg" alt="Change the Number of Posts Per Page in WordPress" width="980" height="710" class="aligncenter size-full wp-image-2053" srcset="https://themesdna.com/wp-content/uploads/2021/09/Change-the-Number-of-Posts-Per-Page-in-WordPress.jpg 980w, https://themesdna.com/wp-content/uploads/2021/09/Change-the-Number-of-Posts-Per-Page-in-WordPress-768x556.jpg 768w" sizes="auto, (max-width: 980px) 100vw, 980px" /></p>
<p>Your WordPress blog and archive pages will now display the amount of posts you have specified.</p>
<p>The post <a href="https://themesdna.com/blog/change-number-of-posts-per-page-wordpress/">How to Change the Number of Posts Per Page in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/change-number-of-posts-per-page-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Add Featured Images in WordPress</title>
		<link>https://themesdna.com/blog/featured-images-wordpress/</link>
					<comments>https://themesdna.com/blog/featured-images-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Fri, 03 Sep 2021 02:53:19 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=2042</guid>

					<description><![CDATA[<p>When it comes to WordPress themes, practically every theme makes use of a popular feature known as "Featured Image" or...</p>
<p>The post <a href="https://themesdna.com/blog/featured-images-wordpress/">How to Add Featured Images in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>When it comes to WordPress themes, practically every theme makes use of a popular feature known as "Featured Image" or "Post Thumbnails", which allows you to attach a certain image from your WordPress media library to a specific post or page. Even though some people refer to them as featured images, others refer to them as post thumbnails, all of these terms are referring to the same thing. For those of you who are new to WordPress and are experiencing difficulty getting images to display on your blog or website, follow the steps given below to properly add featured images to your posts or pages.</p>
<p><strong><u>Step 1:</u></strong><br />
To add a featured image to a post or page, click on the edit link of the post or page you want to assign an image to.</p>
<p><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2021/09/Edit-Post-WordPress.png" alt="Edit Post WordPress" width="980" height="380" class="aligncenter size-full wp-image-2047" srcset="https://themesdna.com/wp-content/uploads/2021/09/Edit-Post-WordPress.png 980w, https://themesdna.com/wp-content/uploads/2021/09/Edit-Post-WordPress-768x298.png 768w" sizes="auto, (max-width: 980px) 100vw, 980px" /></p>
<p><strong><u>Step 2:</u></strong><br />
Now on the right side of your post editor, click the "Set featured image" link. If you don't see this option, look in the top right corner of your screen for the "Screen Options" tab. If you still don't see the option, it's possible that the theme you're using doesn't support the Featured Image/Post Thumbnail feature.</p>
<p><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2021/09/Set-Featured-Image-WordPress.png" alt="Set Featured Image WordPress" width="980" height="599" class="aligncenter size-full wp-image-2050" srcset="https://themesdna.com/wp-content/uploads/2021/09/Set-Featured-Image-WordPress.png 980w, https://themesdna.com/wp-content/uploads/2021/09/Set-Featured-Image-WordPress-768x469.png 768w" sizes="auto, (max-width: 980px) 100vw, 980px" /></p>
<p><strong><u>Step 3:</u></strong><br />
A popup will show after clicking the "Set featured image" link, displaying all of the photos currently uploaded into your website via WordPress. You can either click on the image you wish to use or drag & drop any image from your computer into the window, which will then be uploaded to your site and available for selection. After you've chosen your image, simply click on the "Set featured image" button in the popup window, and it will be allocated to the post or page you're currently editing.</p>
<p><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2021/09/Select-Featured-Image-WordPress.jpg" alt="Select Featured Image WordPress" width="980" height="599" class="aligncenter size-full wp-image-2048" srcset="https://themesdna.com/wp-content/uploads/2021/09/Select-Featured-Image-WordPress.jpg 980w, https://themesdna.com/wp-content/uploads/2021/09/Select-Featured-Image-WordPress-768x469.jpg 768w" sizes="auto, (max-width: 980px) 100vw, 980px" /></p>
<p>The image that has been assigned will appear in the "Featured Image" section of your post editor.</p>
<p><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2021/09/Featured-Image-Added-WordPress.png" alt="Featured Image Added WordPress" width="980" height="574" class="aligncenter size-full wp-image-2339" srcset="https://themesdna.com/wp-content/uploads/2021/09/Featured-Image-Added-WordPress.png 980w, https://themesdna.com/wp-content/uploads/2021/09/Featured-Image-Added-WordPress-768x450.png 768w" sizes="auto, (max-width: 980px) 100vw, 980px" /></p>
<p><strong><u>Step 4:</u></strong><br />
Now in your post editor, click on the "Save Draft" or "Update" or "Publish" button to save your featured image.</p>
<p>The post <a href="https://themesdna.com/blog/featured-images-wordpress/">How to Add Featured Images in WordPress</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/featured-images-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Disable Gutenberg Widget Block Editor</title>
		<link>https://themesdna.com/blog/disable-widget-block-editor-gutenberg/</link>
					<comments>https://themesdna.com/blog/disable-widget-block-editor-gutenberg/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Wed, 10 Mar 2021 00:35:35 +0000</pubDate>
				<category><![CDATA[WordPress Snippets]]></category>
		<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=1899</guid>

					<description><![CDATA[<p>Do you want to disable the new widget block editor page of Gutenberg and brings back the old widgets page?...</p>
<p>The post <a href="https://themesdna.com/blog/disable-widget-block-editor-gutenberg/">How to Disable Gutenberg Widget Block Editor</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Do you want to disable the new widget block editor page of Gutenberg and brings back the old widgets page? Using a one of the code given below you can restore the previous widgets settings screens and disables the block editor from managing widgets. Add "Code 1" or "Code 2" into your theme's functions.php file:</p>
<p><strong>Code 1:</strong></p>
<pre><code class="language-php">// Disables the block editor from managing widgets in the Gutenberg plugin.
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false', 100 );

// Disables the block editor from managing widgets.
add_filter( 'use_widgets_block_editor', '__return_false' );</code></pre>
<p><strong>Code 2:</strong></p>
<pre><code class="language-php">if ( ! function_exists( 'themesdna_activate_classic_widgets' ) ) :
function themesdna_activate_classic_widgets() {
    remove_theme_support( 'widgets-block-editor' );
}
endif;
add_action( 'after_setup_theme', 'themesdna_activate_classic_widgets' );</code></pre>
<p>Don't forget to save the functions.php.</p>
<hr/>
<p><strong>Alternative Method:</strong><br />
If you don't need to edit the functions.php file of your theme, install and activate this plugin and the old widgets page will be back: <a href="https://wordpress.org/plugins/classic-widgets/" rel="nofollow noopener" target="_blank">https://wordpress.org/plugins/classic-widgets/</a></p>
<p>The post <a href="https://themesdna.com/blog/disable-widget-block-editor-gutenberg/">How to Disable Gutenberg Widget Block Editor</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/disable-widget-block-editor-gutenberg/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Apply a Custom Page Template</title>
		<link>https://themesdna.com/blog/apply-custom-page-template/</link>
					<comments>https://themesdna.com/blog/apply-custom-page-template/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sun, 22 Jul 2018 04:29:37 +0000</pubDate>
				<guid isPermaLink="false">https://themesdna.com/?post_type=tdblog&#038;p=764</guid>

					<description><![CDATA[<p>If your WordPress theme has custom page templates for pages or posts, you can set a custom page template to...</p>
<p>The post <a href="https://themesdna.com/blog/apply-custom-page-template/">How to Apply a Custom Page Template</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If your WordPress theme has custom page templates for pages or posts, you can set a custom page template to a page or post you like. On the editing screen of that page/post, scroll down to '<strong>Page Attributes</strong>' section, and you will find the "<strong>Template</strong>" drop down menu. Clicking on it will allow you to select a template from available template list.</p>
<p><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2018/07/Apply-Custom-Page-Template-to-a-Page.png" alt="Apply Custom Page Template to a Page" width="875" height="787" class="alignnone size-full wp-image-765" srcset="https://themesdna.com/wp-content/uploads/2018/07/Apply-Custom-Page-Template-to-a-Page.png 875w, https://themesdna.com/wp-content/uploads/2018/07/Apply-Custom-Page-Template-to-a-Page-768x691.png 768w" sizes="auto, (max-width: 875px) 100vw, 875px" /></p>
<p>Select the template you want and update your page/post.</p>
<p>The post <a href="https://themesdna.com/blog/apply-custom-page-template/">How to Apply a Custom Page Template</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/apply-custom-page-template/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Remove WordPress Version Number</title>
		<link>https://themesdna.com/blog/remove-wordpress-version-number/</link>
					<comments>https://themesdna.com/blog/remove-wordpress-version-number/#respond</comments>
		
		<dc:creator><![CDATA[ThemesDNA]]></dc:creator>
		<pubDate>Sun, 18 Dec 2016 03:11:34 +0000</pubDate>
				<category><![CDATA[WordPress Snippets]]></category>
		<guid isPermaLink="false">http://themesdna.com/?post_type=tdblog&#038;p=430</guid>

					<description><![CDATA[<p>By default WordPress shows its version number adding a generator meta tag into the head section of your webpage like...</p>
<p>The post <a href="https://themesdna.com/blog/remove-wordpress-version-number/">How to Remove WordPress Version Number</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>By default WordPress shows its version number adding a generator meta tag into the head section of your webpage like this:</p>
<pre>&lt;meta name=&quot;generator&quot; content=&quot;WordPress 4.7&quot; /&gt;</pre>
<p>Look at this example:</p>
<p><img loading="lazy" decoding="async" src="https://themesdna.com/wp-content/uploads/2016/12/WordPress-Generator-Meta-Tag.jpg" alt="WordPress Generator Meta Tag" width="700" height="291" class="alignnone size-full wp-image-431" /></p>
<p>If you do not regularly update your WordPress website, it can be considered as a security risk to make your WordPress version visible to the public. So you can remove this WP generator meta tag adding this line into your functions.php file:</p>
<pre><code class="language-php">remove_action('wp_head', 'wp_generator');</code></pre>
<p>Don't forget to save the functions.php.</p>
<p>The post <a href="https://themesdna.com/blog/remove-wordpress-version-number/">How to Remove WordPress Version Number</a> appeared first on <a href="https://themesdna.com">ThemesDNA.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themesdna.com/blog/remove-wordpress-version-number/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
