Child Themes of Non-WordPress Sanctioned Templates

Use get_stylesheet_directory_uri() and get_stylesheet_directory() for Child Themes Use get_template_directory_uri() and get_template_directory() for Parent Themes Thus making your function: <?php if ($gridly_color_scheme == ‘dark’) { ?> <link rel=”stylesheet” href=”https://wordpress.stackexchange.com/questions/107986/<?php echo get_template_directory_uri(); ? >/css/dark.css” /> <?php } elseif ($gridly_color_scheme == ‘custom’) { ?> <link rel=”stylesheet” href=”<?php echo get_stylesheet_directory_uri(); ?>/css/custom.css”/> <?php } else {?> <link rel=”stylesheet” href=”<?php echo … Read more

Add custom function to a theme with child theme’s functions.php

I think the problem is with your choice of hook and conditional statement. Try init and remove the !. function themeblvd_disable_admin_bar() { if( current_user_can(‘edit_posts’) ) add_filter(‘show_admin_bar’, ‘__return_false’); } add_action( ‘init’, ‘themeblvd_disable_admin_bar’ ); Looks like your conditional is also wrong for the redirect function themeblvd_redirect_admin(){ if ( current_user_can( ‘edit_posts’ ) ){ wp_redirect( site_url() ); exit; } … Read more