Categories
WordPress

Debian WordPress Permalink

404 Not found Error fix

Add the below code in /etc/apache2/apache2.conf

<Directory /var/www/html/>
AllowOverride All
</Directory>
sudo a2enmod rewrite
sudo systemctl restart apache2
Categories
Coding WordPress

Change Category Header to Fullwidth Twentyninteen Theme

Categories
Uncategorized WordPress WordPress Development

is_front_page() && is_home() WordPress Default, Static and Blog Page

if ( is_front_page() && is_home() ) {
 // Default homepage

} elseif ( is_front_page()){
 //Static homepage

} elseif ( is_home()){

//Blog page

} else {

//everything else

}

Categories
WordPress WordPress Development

gulpfile.js Example SASS CSS

Example of gulpfile.js compiling SASS to CSS

Categories
WordPress WordPress Development

Add Bootstrap to WordPress admin sub-menu page

Add Bootstrap to a plugin page

// custom css and js
 add_action('admin_enqueue_scripts', 'cstm_css_and_js');

function cstm_css_and_js($hook) {
     // your-slug => The slug name to refer to this menu used in "add_submenu_page"
     // tools_page => refers to Tools top menu, so it's a Tools' sub-menu page
     if ( 'tools_page_your-slug' != $hook ) {
         return;
     }

    wp_enqueue_style('boot_css', plugins_url('inc/bootstrap.css',__FILE__ ));
     wp_enqueue_script('boot_js', plugins_url('inc/bootstrap.js',__FILE__ ));
 }