Build a custom portal.... template

Hello,

I am trying to copy this video. When getting to duplicating templates into child child it’s not working i.e. not changing to full width. Also, you could have provided the code in the description so we didn’t have to type it out, just a thought.

This is what I have

add_filter( 'template_include' , function( $template) {
   if ( is_singular( 'portal' ) ) {
     $template = locate_template( 'portal-template.php');
   }
  return $template;
});

Hello Daniel,

Thanks for writing in!

You have followed all the steps from the video correctly. The problem is that you forgot to activate the Child theme.

What ever changes you have made and added in the Child theme will only take effect when the child theme is activated.

Best Regards.

Oh my! I can’t believe I overlooked that. Thanks Ruenel!

You are most welcome, Daniel.