Hello guys,
I was wondering how I can have a block of code display for each post that is in a certain category?
<?php if ( in_category( _x('cat-name', 'cat-name category slug', 'ifcj') ) ) { ?>
<div id="audio-player"></div>
<script type="text/javascript">
jwplayer("audio-player").setup({
flashplayer: "https://www.mySite.org/jwplayer/player.swf",
width: 440,
height: 23,
file: "<?php $key="Israel In The News Audio File Location"; echo get_post_meta($post->ID, $key, true); ?>",
controlbar: "bottom",
abouttext: "My Org",
aboutlink: "http://www.mySite.org",
allowscriptaccess: "always"
});
</script>
<?php } ?>
Currently this is only displaying for the first post in the loop with this category. I would like for it to display for each post with the category assigned to it.
Any help would do