Website Tutorial WordPress completely disables the RSS function
WordPress completely disables the RSS function If you think RSS is useless, you can also disable it directly by adding the following code to the theme functions.php function: function itsme_disable_feed() { wp_die( __( ‘No feed available, please visit the <a href=”‘.%20esc_url(%20home_url(%20’/’%20)%20)%20.’”>homepage</a>!’ ) ); } add_action(‘do_feed’, ‘itsme_disable_feed’, 1); add_action(‘do_feed_rdf’, ‘itsme_disable_feed’, 1); add_action(‘do_feed_rss’, ‘itsme_disable_feed’, 1); add_action(‘do_feed_rss2’, ‘itsme_disable_feed’,…
Website Tutorial WordPress-loading scripts and styles
If you only import style.css, I can put this on the top of the head <link rel=”stylesheet” href=”<?php%20echo%20get_stylesheet_uri();%20?>” type=”text/css” media=”screen” /> If you add other styles, then add another one on the top of the head <link rel=”stylesheet” href=”<?php%20echo%20get_template_directory_uri();?>/bootstrap.min.css”> Another recommended method: Add the following method to functions.php Copy code /** * Load front-end scripts…
Website Tutorial WordPress display related articles
WordPress display related articles <?php $tags = wp_get_post_tags($post->ID); if ($tags) { $first_tag = $tags[0]->term_id; $args=array( ‘tag__in’ => array($first_tag), ‘post__not_in’ => array($post->ID), ‘showposts’=>10, ‘caller_get_posts’=>1 ); $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <li><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”<?php the_title_attribute(); ?>”><?php the_title();?> <?php comments_number(‘ ‘,’(1)’,’(%)’); ?></a></li> <?php endwhile; } } wp_reset_query();…
Website Tutorial How to Create & Customize a Child Theme on WordPress
Creating and customizing a child theme in WordPress is a good practice to ensure that your customizations are preserved when the parent theme receives updates. Here’s a step-by-step guide to create and customize a child theme: Step 1: Create a Child Theme Directory Create a new directory: Navigate to your WordPress installation’s wp-content/themes/ directory via…
Website Tutorial WordPress-Create functions.php Add a Navigation Menu
Functions.php is not strictly a required file, but it provides so many benefits that 99.99% of themes have it. In functions.php, you can take advantage of WordPress’ built-in theme functionality and also add your own custom PHP code. Now create a functions.php in your theme folder, as we will be adding code to it in…
Website Tutorial WordPress-Why You Should Stop Using “Uncategorized”
The two biggest reasons you should avoid using “Uncategorized” are fairly straightforward: It makes you seem careless, resulting in your blog appearing unprofessional It doesn’t help your readers find the content they’re looking for When you have blog posts listed as “Uncategorized,” it simply looks like you forgot to classify the post. Realistically, that’s the…
Website Tutorial What is WordPress Memory Exhausted Error?
WordPress is written in PHP, a server-side programming language. Web servers are just like any other computer. They need memory to efficiently run multiple applications at the same time. Server administrators allocate specific memory sizes to different applications, including PHP. When the allowed memory size of an allocated amount of bytes is exhausted it means…
Website Tutorial When and Why Do You Need to Copy a Website?
You’ll need to copy a website in different situations to ensure any changes are made and tested on the staging environment before they are pushed live. This is particularly helpful for web agencies that run several websites across multiple WordPress hosting providers. Whenever an issue arises, they can create a copy of the client’s website,…