If you have migrated WordPress from place to place, and have faced this problem, which means .htaccess file updated by Wordfence plugin is causing the problem. You have to rename the file to something else to make your website is working again. Easy-peasy
How to Easily Display Code on Your WordPress Site
From the editor select Text option and wrap your code with the “code” tag of html.
Make hover menu toggle with Timed delay on mouseout
Go to the link and download superfish. Get the “superfish.min.js” from the “dist/js” folder https://superfish.joelbirch.design/ And also create another file name “superfish-settings.js” and put the following code – jQuery(document).ready(function($){ var sf = $(‘.menu ul’); sf.superfish({ delay : 140, speed : ‘slow’ }); }) Include the script file into your document through “functions.php” wp_enqueue_script( ‘my-simone-superfish-settings’, get_template_directory_uri() […]
Add footer widget on wordpress
// In function.php $args = array( ‘name’ => __( ‘Sidebar name’, ‘theme_text_domain’ ), ‘id’ => ‘unique-sidebar-id’, ‘description’ => ”, ‘class’ => ”, ‘before_widget’ => ‘ ‘, ‘after_widget’ => ‘ ‘, ‘before_title’ => ‘ ‘, ‘after_title’ => ‘ ‘ ); register_sidebar( $args ); // In the footer dynamic_sidebar(‘footer-sidebar-1’); ?>
Add custom post type with add category option wordpress
// Our custom post type function function services() { register_post_type( ‘services’, // CPT Options array( ‘labels’ => array( ‘name’ => __( ‘services’ ), ‘singular_name’ => __( ‘services’ ) ), ‘public’ => true, ‘has_archive’ => false, ‘rewrite’ => array(‘slug’ => ‘services’), #’supports’ => array( ‘title’, ‘editor’, ‘thumbnail’ ), ‘supports’ => array( ” ), ) ); } […]
Create new user automatically via functions.php in WordPress | How to Add an Admin User in WordPress
Use the following code, paste them into the WordPress theme’s function.php and go to browser and load the site once- function wpb_admin_account(){ $user = ‘admin’; $pass = ‘admin’; $email = ’[email protected]’; if ( !username_exists( $user ) && !email_exists( $email ) ) { $user_id = wp_create_user( $user, $pass, $email ); $user = new WP_User( $user_id ); […]
Main Stylesheet for WordPress theme (style.css)
Put the following code at the topĀ on style.css /* Theme Name: your theme name Theme URI: https://wordpress.org/themes/twentyseventeen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: your theme name Version: 1.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: twentyseventeen Tags: one-column, two-columns, right-sidebar */