I am building a local website on Wordpress using the Divogue theme. I added several pages of content to the website, some of which I used the Elementor plugin to design. The website was functioning properly and my pages were being displayed as expected.
I decided to add a child theme for the flexibilty. After creating the new directory folder,"divogue-child," I then created the style.css
and functions.php
files as per the instructions provided by Wordpress. I activated the child theme in Wordpress and viewed the site from the customizer, but it was displaying the plain parent theme without any of the pages I added. Strangely, the navigation menu items remained intact and linked to the appropriate page, but all the pages of content I created were not found and they were all blank pages.
I'm not sure if this is because I've used Elementor to create the pages and the child theme can't find them, or if it's because of an error in the child theme's functions.php
file.
<?php
function my_theme_enqueue_styles() {
$parent_style = 'divogue-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>