Functions.php

<?php
/**
 * NAMEOFYOURTHEME functions and definitions.
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package WordPress
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}

/**
 * Remove patterns that ship with WordPress Core
 */
function noyp_remove_core_block_patterns() {
    remove_theme_support( 'core-block-patterns' );
}
add_action( 'after_setup_theme', 'noyp_remove_core_block_patterns' );

// Enqueues editor-style.css in the editors.
if ( ! function_exists( 'noyp_editor_style' ) ) :
	/**
	 * Enqueues editor-style.css in the editors.
	 *
	 * @return void
	 */
	function noyp_editor_style() {
		add_editor_style( get_parent_theme_file_uri( 'assets/css/editor-style.css' ) );
	}
endif;
add_action( 'after_setup_theme', 'noyp_editor_style' );

// Enqueues style.css on the front.
if ( ! function_exists( 'noyp_enqueue_styles' ) ) :
	/**
	 * Enqueues style.css on the front.
	 *
	 *
	 * @return void
	 */
	function noyp_enqueue_styles() {
		wp_enqueue_style(
			'noyp-style',
			get_parent_theme_file_uri( 'style.css' ),
			array(),
			wp_get_theme()->get( 'Version' )
		);
	}
endif;
add_action( 'wp_enqueue_scripts', 'noyp_enqueue_styles' );

¿Te ha gustado?

Suscríbete a mi newsletter para avisarte cuando suba más charlas y contenido que te pueda interesar sobre cultura.

Formulario de suscripción

Te enviaré contenido que de verdad crea que es interesante, me comprometo a no enviarte solo spam, sino algo con lo que merezca la pena detenerse y leer.

Estos datos los gestiono yo misma, Flavia Bernárdez Rodríguez y están alojados en el servidor de Nicalia (una empresa de hosting sostenible buenísima cuyo datacenter está en España). Usaré los datos para enviarte emails sobre las cosas que hago, organizo o pienso. Te podrás dar de baja cuando quieras, bien cuando te envíe un mail, o bien diciéndomelo por cualquier método de contacto.

Thank you for subscribing!

An error occurred. Please try again.