I’m still a noob with php but I’m trying to display a different layout for my WordPress webpage for a single post id.
I thought it would have been simple but I’ve tried a quiet few variations of the code below. Including is_singular
and without the $post
etc. and I’ve ran out of inspiration. What can I do? What do I need to look for? Can anyone help me out?
<?php
if (is_single ($post="2578")) {
get_template_part('partials/content', 'challenge');
}
elseif (is_single ($post="")) {
get_template_part('partials/challenge/content', 'challenge-2');
get_template_part('partials/challenge/content', 'categories');
get_template_part('partials/challenge/content', 'snake-checklist');
get_template_part('partials/challenge/content', 'timeline');
}?>