✏️ 正在编辑: functions.php
路径:
/home/qyel0117/public_html/wp-content/themes/marie-guerin/functions.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php /** * Child theme functions * * When using a child theme (see http://codex.wordpress.org/Theme_Development * and http://codex.wordpress.org/Child_Themes), you can override certain * functions (those wrapped in a function_exists() call) by defining them first * in your child theme's functions.php file. The child theme's functions.php * file is included before the parent theme's file, so the child theme * functions would be used. * * Text Domain: oceanwp * @link http://codex.wordpress.org/Plugin_API * */ /** * Load the parent style.css file * * @link http://codex.wordpress.org/Child_Themes */ function oceanwp_child_enqueue_parent_style() { // Dynamically get version number of the parent stylesheet (lets browsers re-cache your stylesheet when you update your theme) $theme = wp_get_theme( 'OceanWP' ); $version = $theme->get( 'Version' ); // Load the stylesheet wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'oceanwp-style' ), $version ); } add_action( 'wp_enqueue_scripts', 'oceanwp_child_enqueue_parent_style' ); add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'animate-css-style', get_stylesheet_directory_uri() . '/css/animate.css' ); wp_enqueue_style( 'simplebar', get_stylesheet_directory_uri() . '/css/simplebar.css' ); wp_enqueue_script( 'simplebar', $src = 'https://unpkg.com/simplebar@latest/dist/simplebar.js', array() ); wp_enqueue_script( 'vivus', get_bloginfo( 'stylesheet_directory' ) . '/js/vivus.js', array() ); } function wpm_exclude_cat($query) { //On verifie qu'on se trouve bien sur la page blog if ( $query->is_home ) { // On retire les catégories 7.. en mettant un '-' devant $query->set('cat', '-7'); } return $query; } add_filter('pre_get_posts', 'wpm_exclude_cat');
💾 保存文件
← 返回文件管理器