Category: Wordpress

What we want to do if WordPress website is hacked?

Below are the basic steps that can be taken when your WordPress website is hacked

  • Install security plugins like WP security
  • Re-install the latest version of WordPress
  • Change password and user-ids for all your users
  • Check if all your themes and plug-ins are up-to-date
  • Uninstall all plugins that are downloaded from untrusted places

What are the rules to be followed while developing the WordPress Plugin?

While developing a WordPress Plugin, the following rules should be followed step by step:

  • Create a unique name.
  • Create the folder of Plugin.
  • Create a sub-folder for PHP files, translations, and assets.
  • Create the main plug-in file and fill up the header information.
  • Create activation and de-activation functions.
  • Create an uninstall script.
  • Create a readme.txt file.
  • In case of detecting the paths to plug-in file, use proper functions and constants.

What are the Positive aspects of WordPress?

Following are the Positive aspects of WordPress:

  • In-built SEO system
  • Flexibility
  • Community
  • Easy theme system
  • Easy installation and upgrade
  • Easy and flexible publishing option
  • Multilingual is available in about more than 70 languages
  • Own data full control and no unwanted advert on your personal or commercial website.

What are the template tags in WordPress?

In WordPress template tags are PHP functions that are used to display information dynamically or customize blog template.Below are the list of some generally used template tags in WordPress

  • get_header()
  • wp_register()
  • get_sidebar()
  • wp_title()
  • wp_enqueue_script()
  • get_the_author()
  • wp_list_authors()
  • category_description()
  • get_bookmarks()

Read More about WordPress template tags from https://codex.wordpress.org/Template_Tags

How to disable the comments in WordPress?

To disable comments in WordPress, Please follow below steps

  • Step 1: Login to your WordPress admin panel.
  • Step 2: Go to the Settings menu.
  • Step 3: Under Settings menu click on Discussion.
  • Step 4: Uncheck Allow people to post comments on new articles. checkbox
  • Step 5: Click on save changes button, you done

How to disable password reset in WordPress?

There are a few ways you can do it that are more user-friendly than allowing the user to think they have requested a password reset. WordPress has a filter allow_password_reset see documentation

Simply add the following to your theme functions.php file

function wp_disable_password_reset() { return false; }
add_filter ( 'allow_password_reset', 'wp_disable_password_reset' );

If a user attempts to reset their password they will receive the error message

Password reset is not allowed for this user

How to install downloaded WordPress theme in XAMPP?

To install a theme manually via XAMPP do the following:

Step 1: Locate XAMPP’s htdocs folder. This is normally Applications>>XAMPP>>HTDOCs on Mac or My Computer>>C:>>XAMPP>>HTDOCs on Windows (I think – someone might need to correct me on that).

Step 2: If your site is installed in a sup-directory in htdocs, go there. If not skip to next step.

Step 3: Open the wp-content folder

Step 4: Open the themes folder

Step 5: Copy in your downloaded theme and extract it there (if its zipped)

Step 6: Go to your WordPress Dashboard and go to the Appearance button on the left and click Themes from the drop down. Find your newly installed theme and hit Activate.

How to Install XAMPP and WordPress Locally on Windows PC

Step 1: Download and install XAMPP on your computer
Step 2: Start Apache and MySQL modules and test your server
Step 3: Create new project folder in C:\xampp\htdocs
Step 4: Download WordPress from WordPress.org website and extract the zip file.
step 5: Upload the files in new project folder.
step 6: Create a database for WordPress.
step 7: Install WordPress locally via the on-screen installer(http://localhost/newprojectfolder).

How to Change “Return to Shop” Button text in WooCommerce

In this article, I will show you How to Change “Return to Shop” Button text in WooCommerce.

Copy below code and paste into theme function.php file.

add_filter( 'gettext', 'change_woocommerce_return_to_shop_text', 20, 3 );
function change_woocommerce_return_to_shop_text( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
        case 'Return to shop' :
        $translated_text = __( 'Return to Store', 'woocommerce' );
        break;
    }
    return $translated_text;
}

Have any doubt, then comment here!

How to disable comments in WordPress?

To disable comments in WordPress, Please follow below steps

Step 1: Login to your WordPress admin panel.
Step 2: Go to the Settings menu.
Step 3: Under Settings menu click on Discussion.
Step 4: Uncheck Allow people to post comments on new articles. checkbox
Step 5: Click on save changes button, you done