php - Wordpress Get Template part -
going trough wordpress template found template
<?php if ( is_home() ) { get_template_part('home', 'featured'); get_template_part('home', 'recent'); } ?>
which calls template parts when home page displayed.
is there way use same function pages? example domain-name.com/contact
?
thanks
you can use is_page
determine page. example:
if ( is_page('contact') ) { get_template_part('home', 'featured'); get_template_part('home', 'recent'); }
the parameter function can page id, page title or page slug.
Comments
Post a Comment