- WordPress :5.7
- Statut : résolu
- Ce sujet contient 4 réponses, 2 participants et a été mis à jour pour la dernière fois par
BrodeCoud, le il y a 10 mois et 2 semaines.
-
AuteurMessages
-
6 juillet 2021 à 10 h 45 min #2381114
Ma configuration WP actuelle
- Version de PHP/MySQL : PHP version: 7.4.8 / je ne sais pas
- Thème utilisé : Thème enfant de Blossom Pin
- Extensions en place : Simple Lightbox, Regenerate Thumbnails, Duplicate Page and Post,
- Nom de l’hébergeur : Hébergement gratuit (byet.host)
- Adresse du site :Brode Style – Vente d’articles brodé et personnalisation (byethost18.com)
Problème(s) rencontré(s) :
Bonjour a tous et toutes, j’ai enfin trouver ou modifier les taille des images crée par le thème parent elle sont dans
wp-content/themes/blossom-pin/inc/custom-functions.php
Mais lorsque dans mon thème enfants je crée un dossier inc et je mets le fichier custom-functions.php modifier cela ne fonctionne pas j’ai du modifier le ficher d’origine du thème parent pour que cela fonctionne
es ce normal de devoir modifier le thème parents ?
Merci a ceux qui m’ont lu et merci a ceux que m’aideront bonne journée
6 juillet 2021 à 13 h 44 min #2381132la correspondance des fichiers dans le même répertoire fonctionne seulement pour les fichiers templates. là le fichier custom-functions.php ne fait pas partie de ces fichiers donc il faut faire autrement.
j’ai vu dans ce fichier qu’il contient beaucoup de fonctions entourées de « if (! function_exists … ». si la modification que vous voulez faire est dans une fonction de ce genre, vous pouvez copier la fonction dans le fichier functions.php du thème enfant et la personnaliser à cet endroit.
6 juillet 2021 à 14 h 38 min #2381136Bonjour merci beaucoup
au niveau des codes franchement je n’y connais pas grand chose.
Voici le ficher avec les ligne concerner
add_image_size( ‘blossom-pin-schema’, 600, 60 );
add_image_size( ‘blossom-pin-slider’, 375, 375, true );
add_image_size( ‘blossom-pin-archive’, 560, 560, true );
add_image_size( ‘blossom-pin-related’, 249, 249, true );que faudrait-il que je teste comme code dans le fonctions php s’il vous plais
if ( ! function_exists( 'blossom_pin_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. */ function blossom_pin_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on Blossom Pin, use a find and replace * to change 'blossom-pin' to the name of your theme in all the template files. */ load_theme_textdomain( 'blossom-pin', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded <title> tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'blossom-pin' ), 'secondary' => esc_html__( 'Secondary', 'blossom-pin' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-list', 'gallery', 'caption', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'blossom_pin_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'width' => 250, 'height' => 70, 'flex-height' => true, 'flex-width' => true, 'header-text' => array( 'site-title', 'site-description' ), ) ); /** * Add support for custom header. */ add_theme_support( 'custom-header', apply_filters( 'blossom_pin_custom_header_args', array( 'default-image' => '', 'video' => true, 'width' => 1903, 'height' => 660, 'header-text' => false ) ) ); /** * Add Custom Images sizes. */ add_image_size( 'blossom-pin-schema', 600, 60 ); add_image_size( 'blossom-pin-slider', 375, 375, true ); add_image_size( 'blossom-pin-archive', 560, 560, true ); add_image_size( 'blossom-pin-related', 249, 249, true ); // Add theme support for Responsive Videos. add_theme_support( 'jetpack-responsive-videos' ); // Add excerpt support for pages add_post_type_support( 'page', 'excerpt' ); }
custom-functions.php6 juillet 2021 à 15 h 12 min #2381140recopiez toute la fonction « blossom_pin_setup » et ensuite modifiez ce que vous voulez.
6 juillet 2021 à 16 h 00 min #2381141Merci beaucoup cela fonctionne je suis très content passer une très bonne journée
-
AuteurMessages
- Vous devez être connecté pour répondre à ce sujet.