How to show code only for records?

- the function is only suitable for the home.
How to limit the display of code just for the records?
July 12th 19 at 16:34
2 answers
July 12th 19 at 16:36
for which records ?
for all posts - if('post-type == 'post")
for pages if('post-type == 'page")
for the current page current_page

read the codex - it's all there
July 12th 19 at 16:38
For posts. Something that does not work
<?php if (!is_front_page() ) { ?><script type="text/javascript"></script> 
<?php } ?>

Inside should run the script only in posts.

Find more questions by tags WordPress