Unable to load template for custom post type in Alyeska child theme
-
Topic
-
Hi,
I am having trouble loading a template file from my child theme. I’ve found some instructions, but it’s not working.
The template file is located in the child theme root, called ‘content-anmeldelse.php’
Here is my functions.php code:
// Add theme support for all post formats
add_theme_support( 'post-formats', array( 'anmeldelse' ) );// Use content-{post_format}.php for listing posts
function ocb_template_parts( $parts ) {// Determine post format where relevant
$post_format = '';
if( ! is_404() && ! is_search() )
$post_format = get_post_format();// Adjust template parts
$parts['index'] = $post_format;
$parts['list'] = $post_format;
$parts['list_paginated'] = $post_format;
$parts['list_slider'] = $post_format;
$parts['single'] = $post_format;
$parts['archive'] = $post_format;
$parts['anmeldelse'] = 'anmeldelse';return $parts;
}
add_filter( 'themeblvd_template_parts', 'ocb_template_parts' );I have no idea why it’s not loading. I tested
$parts['anmeldelse'] = $post_format;
as well, but no result.Please help.
- The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.