Display Custom Post template name in wordpress -


i need display custom post template name. want load different css each custom post template. need custom post template name cant find anyhow. here structure of directory.

index.php single.php header.php footer.php fullpage-post.php // custom template two-column-right-menu-post.php two-column-left-menu-post.php  

now in header want link this

if($custom_template->name == 'two-column-right-menu-post'){ ?> <link href = 'style.php'> <?php }else{ ?> <link href = 'style1.php'> <?php } 

how can achieve this. googled around , not find solution.

you should take @ get_page_template.

a side not including css wrong. should not use <link> include styles should use wp_enqueue_style, allows stuff caching , minify.
same goes javascript has wp_enqueue_script

a tutorial it: http://halfelf.org/2012/jquery-why-u-no-enqueued/


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

c++ - End of file on pipe magic during open -