301 Redirect Old URL to New WordPress Page

I just migrated one of my old websites to wordpress but running into issues with the 301’s of the old url’s old url /11/companyname new url /office/companyname/ This is the code i came up with RewriteEngine On RewriteRule ^([a-zA-Z-]+)/(.*)?$ /office/$2/ [R=301,L] It redirects fine when i add the trailing slash i.e. /11/companyname/ but not without. Source: https://wordpress.stackexchange.com/feeds

How to remove Customizer’s Section and move Control straight to Panel using Child Theme

I’m looking for a way to remove the Section font_selection and move the Control body_font_family straight to the Panel font_panel using Child Theme functions.php. Below is the sample CODE from parent theme’s customizer.php: //PANEL $wp_customize->add_panel( ‘font_panel’, array( ‘priority’ => 17, ‘capability’ => ‘edit_theme_options’, ‘theme_supports’ =>  », ‘title’ => __(‘Fonts’, ‘theme’), ) ); //SECTION $wp_customize->add_section( ‘font_selection’, array( ‘title’ => __(‘Font selection’, ‘theme’), ‘priority’ => 10, ‘panel’ => ‘font_panel’, ) ) ); //SETTING $wp_customize->add_setting( ‘body_font_family’, array( ‘sanitize_callback’ => ‘theme_sanitize_text’, ‘default’ => $defaults[‘body_font_family’], ) ); //CONTROL $wp_customize->add_control( ‘body_font_family’, array( ‘label’ => __( ‘Body…

Where are Additional CSS files stored

This image shows the Additional CSS feature in WordPress. I’m trying to find the file that stores the additional CSS, but can’t seem to find it anywhere – I’ve searched almost every folder in wp-content! Does anyone know how Additional CSS for the theme is stored and, if it is in a file, where this file is located! Source: https://wordpress.stackexchange.com/feeds

Using WP Color Picker in Repeatable Fields

I wrote a repeater script that clones the last field group before it. My issue is that cloned WP Color Picker fields don’t open the new color spectrum when clicked on but instead opens the color picker in the group it was cloned from. Of course, it works fine once you save the field and reload the page, but not on the fly as you clone the prior group. Here’s the field HTML: <div class= »md-repeat »> <a href= »# » class= »md-repeat-add »>Add Another Color Picker</a> <div class= »md-repeat-field »> <label for= »my_field »>My Color Picker Field</label> <input name= »my_field »…

Files being generated in multiple directories supposedly by WordPress (advanced_settings.php and common_config.php)

I have a few sites in a cPanel. A couple of them are WordPress. I changed to a new hosting provider and since then two files started being generated in multiple directories, even ones not from WordPress. The files are advanced_settings.php and common_config.php. The system reports these files as malware, however, I opened them and they were empty. The hosting provider says this is the fault of WordPress, most likely due to some outdated plugin. None of this ever happened in the hosts I used before for these sites. Actually,…

Web Design Weekly #269

Headlines Base64 Encoding & Performance In this article Harry Roberts shares some insights into why you should’t use base64 in CSS and why base64 and gzip don’t work well together. (csswizardry.com) Tools for Radicals (medium.com) Sponsor Web Design Weekly and reach over 23,430 passionate designers and developers Articles Do we need a new heading element? There’s a proposal to add a new ‘h’ element to the HTML spec and Jake Archibald in this post helps us understand the finer details. (jakearchibald.com) Do responsive sites have to be so tall on…

Redirect too many times htacces switching to https

When I change the redirect https in my .htaccess the site returns the message « Too many redirects » loop. This is the modified .htaccess RewriteCond %{HTTPS} off RewriteRule (.*)$ https://www.mywebsite.it/$1 [L,R=301] # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress I also added in the wp-config.php: define(‘FORCE_SSL_ADMIN’, true); define(‘FORCE_SSL_LOGIN’, true); Source: https://wordpress.stackexchange.com/feeds

Should a WordPress plugin polyfill the global JS environment?

I’m building a JS-heavy WordPress plugin with babel/WebPack to transpile ES6 -> ES5 code. I’m also relying on some of the new features, like Promise and Object.assign, and I’m wondering a few things: Does WordPress ship any polyfills of its own for the global environment? What are best practices around handling/shipping polyfills in WordPress plugins? Source: https://wordpress.stackexchange.com/feeds

Jump links to another page and return back to the first page anchors successfully

I have made a one page website with their jump links using id attribute (#). These jump links are provided in the navigation bar (header navigation menu). Now, we want to add another page, but the problem is that when we are on this new page, the anchors (jump links) of the first page don’t work. The only solution is to click the home URL to return to the first page of the website.Is there any other solution? Source: https://wordpress.stackexchange.com/feeds