Month: February 2022

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

Reset Mautic admin password via SSH

If you have ssh access to your mautic server you can do the following:

  1. Type this command: sudo mysql -u root
    This will log you into mysql,
  2. then type: show databases;
    This will show you your databases, usually Mautic default install uses DB name mautic,
  3. Type: use mautic; (you can replace the name of the database if you have a different name)
  4. Type: select id, username from users;
    This will give you a list of users
  5. Type: UPDATE users SET password = “a5b253d8484925a3b4fba260768416dfdcbeaed639bb3435c566cbf54721f846903725c7283cf9ab1f090f179d015f46a50b5e798695547eda6e2342db8918a2” where id = 1; make sure you are using the id of the user you want to update.

Now you should be able to login with password 12345678.

Hope that works