Home / WordPress

WordPress

How to fix the WordFence wordfence-waf.php problem

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 Hits: 149

Read More »

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 …

Read More »

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'); ?> Hits: 96

Read More »

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( …

Read More »

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@domain.com’; if ( !username_exists( $user ) && !email_exists( $email ) ) { $user_id = wp_create_user( $user, $pass, $email ); $user …

Read More »

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 */ …

Read More »