Quantcast
Channel: Zenphoto forum
Viewing all articles
Browse latest Browse all 445

PHP code to identify album and image pages

$
0
0

I'm working with seroxatmad's Facebook Like plugin. I had to edit to remove some white space that was causing "Cannot modify header information - headers already sent" errors. I then used it to create a FB comments plugin. I am showing the like button in the header and the comment block in the footer. But I only want them to appear on album and image pages, and not on things like the contact form. I constructed a code snippet based on other pages, and inserted it into inc_footer.php and inc_header.php:

<?php if (function_exists('printFBComments')) { ?>
<?php if (isAlbumPage() or isImagePage) { ?>

<?php printFBComments(); ?>

<?php } ?>
<?php } ?>

but despite this, I get the comments block on all pages. I take I'm doing something wrong.


Viewing all articles
Browse latest Browse all 445

Trending Articles