Site logo

Archived topic

Child-Theme not working

4 replies · Started by Julia on October 10, 2018

Viewing posts 1–5 of 5

Hi

I wanted to create my own template in child-theme. But when I add a page-custom.php at my generatepress-child folder, it doesn't work. Only when I add the file to the generatepress folder.
The same problem I have with custom post types. When I add them to functions.php in generatepress folder, it works. In child not.
As I don't see the printscreen either, I think there is a linking problem somewhere. Surprisingly the CSS works.

Can you help me please?

Thanks in advance

Julia

The content of functions.php is:

<?php

function child_theme_styles() {
  wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
  wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/css/style.css' , array('parent-style'));

}
add_action( 'wp_enqueue_scripts', 'child_theme_styles' );

The template name is referenced as follows:

/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * Template name: Kooperationen
 *
 * @package GeneratePress
 */

solved, don't ask me, what the problem was ;) I replaced my child theme with your empty child theme and now it works...
thanks

Awesome :)

This archived topic is closed to new replies.