A WordPress child theme to make modifications to the Sempress WordPress theme of our homepage and blog.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

65 lines
2.3 KiB

<?php
function my_theme_enqueue_styles() {
$parent_style = 'sempress-style'; // This is 'sempress-style' for the Sempress theme.
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/css/translateScience.css',
array( $parent_style ),
wp_get_theme()->get('Version'),
'all'
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>
<?php
// Clean up the admin dashboard
function translate_remove_dashboard_widgets() {
remove_meta_box('dashboard_primary', 'dashboard', 'core'); // Remove WordPress Events and News
remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); // Remove Quick Draft
}
add_action('admin_menu', 'translate_remove_dashboard_widgets');
?>
<?php
/**
* Setup My Child Theme's textdomain.
*
* Declare textdomain for this child theme.
* Translations can be filed in the /languages/ directory.
*/
function my_child_theme_setup() {
load_child_theme_textdomain( 'sempresschild', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'my_child_theme_setup' );
/* For more information: https://codex.wordpress.org/I18n_for_WordPress_Developers
Example how to use this:
<?php
esc_html_e( 'Code is Poetry', 'my-child-theme' );
?>
*/
?>
<?php
/* A child theme can replace a PHP function of the parent by simply declaring it beforehand.
if ( ! function_exists( 'theme_special_nav' ) ) {
function theme_special_nav() {
// Do something.
}
}
*/
/*
When you need to include files that reside within your child theme's directory structure, you will use get_stylesheet_directory(). Because the parent template's style.css is replaced by your child theme's style.css, and your style.css resides in the root of your child theme's subdirectory, get_stylesheet_directory() points to your child theme's directory (not the parent theme's directory).
Here's an example, using require_once, that shows how you can use get_stylesheet_directory when referencing a file stored within your child theme's directory structure.
require_once( get_stylesheet_directory() . '/my_included_file.php' );
*/
?>