Website Tutorial Creating a Frontend Login Form in WordPress
<?php if (!(current_user_can(‘level_0’))) { ?> <form action=”<?php echo get_option(‘home’); ?>/wp-login.php” method=”post”> <input type=”text” name=”log” id=”customer_email” value=”<?php echo wp_specialchars(stripslashes($user_login), 1) ?>” placeholder=”Email or Username*” style=”width:225px;height: 30px;” /> <input type=”password” name=”pwd” id=”customer_password” placeholder=”Password*” /> <div class=”action-btn”> <p><input type=”submit” name=”submit” value=”Sign In” class=”btn top” /></p> <p><label for=”rememberme”><input name=”rememberme” id=”rememberme” type=”checkbox” checked=”checked” value=”forever” /> remember</label> <br>New User<span style=”font-family:Arial;”>?</span> Register…
Website Tutorial How to Customize WordPress Excerpts
Switch to the directory where the theme is located, open functions.php, and add the following code: function jackyexcerpt($max_char = 200, $more_text = ‘…’, $limit_type = ‘content’) { if ($limit_type == ‘title’) { $text = get_the_title(); } else { $text = get_the_content(); } $text = apply_filters(‘the_content’, $text); $text = strip_tags(str_replace(‘]]>’, ‘]]>’, $text)); $text = trim($text); if…
Website Tutorial Remove category base from WordPress URL
Remove category base from WordPress URL Add the following code in functions.php add_action( ‘load-themes.php’, ‘no_category_base_refresh_rules’); add_action(‘created_category’, ‘no_category_base_refresh_rules’); add_action(‘edited_category’, ‘no_category_base_refresh_rules’); add_action(‘delete_category’, ‘no_category_base_refresh_rules’); function no_category_base_refresh_rules() { global $wp_rewrite; $wp_rewrite -> flush_rules(); } // register_deactivation_hook(__FILE__, ‘no_category_base_deactivate’); // function no_category_base_deactivate() { // remove_filter(‘category_rewrite_rules’, ‘no_category_base_rewrite_rules’); // We don’t want to insert our custom rules again // no_category_base_refresh_rules(); // } //…
Website Tutorial How to disable automatic updates for themes and plugins in WordPress
1: Insert the following code into the functions.php file in the root directory of the current WordPress theme: add_filter(‘pre_site_transient_update_core’, create_function(‘$a’, “return null;”)); // Close core prompts add_filter(‘pre_site_transient_update_plugins’, create_function(‘$a’, “return null;”)); // Close plugin prompts add_filter(‘pre_site_transient_update_themes’, create_function(‘$a’, “return null;”)); // Close theme prompts remove_action(‘admin_init’, ‘_maybe_update_core’); // Disable WordPress from checking for updates remove_action(‘admin_init’, ‘_maybe_update_plugins’); // Disable…
Website Tutorial Disable thumbnails in wordpress
wordpress disable thumbnails Add the following code to your theme functions.php file: // Disable automatically generated image sizes function shapeSpace_disable_image_sizes($sizes) { unset($sizes[‘thumbnail’]); // disable thumbnail size unset($sizes[‘medium’]); // disable medium size unset($sizes[‘large’]); // disable large size unset($sizes[‘medium_large’]); // disable medium-large size unset($sizes[‘1536×1536’]); // disable 2x medium-large size unset($sizes[‘2048×2048’]); // disable 2x large size return $sizes;…
Website Tutorial Build Your Own Custom WordPress Theme
Building your own custom WordPress theme can be a rewarding process. It allows you to create a unique look and functionality for your website that’s tailored to your specific needs. Here’s a step-by-step guide to help you build your own WordPress theme from scratch: ### 1. **Set Up Your Development Environment** – **Local Development**: Install…
Website Tutorial How to remove wordpress icon from website
To remove the WordPress icon (often the “Powered by WordPress” text or the WordPress logo) from your website, you’ll need to address it depending on how and where it’s being displayed. Here are some common methods: 1. Remove “Powered by WordPress” Text Using a Theme Customizer: Log in to your WordPress admin dashboard. Go to…
Website Tutorial Several solutions to the problem that uploaded images in wordpress cannot be displayed
1. Insufficient permissions It may be that the operation and maintenance personnel have restricted the folder permissions for security reasons. In this case, set the permissions of the folder /wp-content/uploads to 755 or higher 2. The upload path of the database is incorrect Enter the PHPMyAdmin database and check the upload_path key value in the…
Website Tutorial WordPress sticky articles in categories but not on the homepage
The effect I want is to sticky articles in categories but not on the homepage. I found methods to pin articles in categories online, but none of them solved the problem of not sticky articles on the homepage. They all talked about changing the homepage to sticky. So I thought of a way. The first…