Redirecting Old Website to New Website using .htaccess

September 15, 2018|

When you migrate your website from old domain to new one, you want to preserve the link traffic to new web address. In Apache web server we use Apache Rewrite Rules to add the redirection features. The file with this type of rules added into file name .htaccess The apache codes to add this features are as follows: RewriteEngine On RewriteCond %{HTTP_HOST} ^odlwebsite.com$ [OR] RewriteCond %{HTTP_HOST} ^www.newwebsite.com$ RewriteRule (.*)$ http://www.newwebsite.com/$1 [R=301,L] If you just want to redirect the single page address, the code will be as follows: Redirect 301 /old-post-page.html http://www.newwebsite.com/new-page.html

Easily Add styles to Gutenberg Block Editor !!!

September 4, 2018|

A WordPress theme can add stylesheet to change the Gutenberg editor’s appearance. Generally changes done in the visual aspects of the editor like colors, font family and background etc. So that it will look exactly similar to the front of the website. Firstly you need to create a new stylesheet file in your current WordPress theme location. Let us consider the filename to be style-editor.css. Next, load your newly created Gutenberg editor sytlesheet in your WordPress theme by adding following three lines of code.   /** * Enqueue Gutenberg block editor style */ function lightpress_gutenberg_editor_styles() { wp_enqueue_style( ‘lightpress-block-editor-styles’, get_theme_file_uri( ‘/style-editor.css’ ), false, ‘1.0’, ‘all’ ); } add_action( ‘enqueue_block_editor_assets’, ‘lightpress_gutenberg_editor_styles’ ); Lastly change “lightpress” namespace with your own theme name. Thanks