Skip to main content
1 of 2

Get_template_part seems to be ignoring my template

I'm starting to reach my wit's end regarding a problem I'm having with get_template_part. I am developing a website that requires specific pages to have certain elements change color in addition to a full-width calendar page. I figured that using page templates and changing what get_template_part looks for would be the simplest approach, but I've run into unexpected trouble. The page template loads fine, but the specific content template appears to get ignored, with Wordpress instead loading the general template. I'm using a child theme derived from TwentyFifteen, but this shouldn't be a problem, since the customized content template loads just fine.

get_template_part( 'content', 'page', 'kahvilaravintola' );

This is the get_template_part itself. It should be loading content-page-kahvilaravintola.php, located right in the child theme's folder, but instead loads content-page.php, located in the same folder. I've tried to solve this for a while but I can't seem to figure out what is wrong.