Remove RSS From News Article

I am not using RSS and would like to remove the relevant code from news.php to prevent the RSS icon and link from appearing. I am new to PHP and unsure what to remove without breaking the page.

`



<?php<br />
// single news article

if(is_NewsArticle() AND !checkforPassword()) { ?>

<?php if(getPrevNewsURL()) { ?>

<?php printPrevNewsLink(); ?>



<?php } ?>

<?php if(getNextNewsURL()) { ?>

<?php printNextNewsLink(); ?>



<?php } ?>

<?php if(getPrevNewsURL() OR getNextNewsURL()) { ?>




<?php } ?>

<?php printNewsTitle(); ?>

<?php printNewsDate();?>



<?php printNewsContent(); ?>

<?php<br />
// COMMENTS TEST

if (function_exists('printCommentForm')) { ?>

<?php printZenpageRSSLink("Comments-news","","",gettext("Subscribe to comments")); } // comments allowed - end<br />
} else {

echo "
";

// news article loop

while (next_news()): ;?>

<?php printNewsTitleLink(); ?>

<?php printNewsDate();?>



<?php printNewsContent(); ?>

<?php printCodeblock(1); ?>



<?php<br />
endwhile;

printNewsPageListWithNav(gettext('next »'), gettext('« prev'),true,pagelist);

} ?>



`

Comments

  • Might help if you told us which theme you are running. Anyway, if you search your theme files for the string `RSSLink` you will find all the places that the link is printed. You need to remove those function calls.
  • I'm using a modified ZenPage theme. I can identify the RSSLink string but when I remove all or part of this chunk
    `

    <?php<br />
    // COMMENTS TEST

    if (function_exists('printCommentForm')) { ?>

    <?php printZenpageRSSLink("Comments-news","","",gettext("Subscribe to comments")); } // comments allowed - end<br />
    } else {

    echo "
    ";

    // news article loop

    while (next_news()): ;?>

    `
    the page breaks. I guess I'm just not sure what part exactly to delete.
  • Delete just the function call-nothing else.
  • acrylian Administrator, Developer
    The printZenpageRSSLink() call you posted is just one of three RSS calls in the zenpage default theme. There is one in the header (to show the icon next to the brower's address bar) and also another one on the sidebar.php page you might want to remove also.
Sign In or Register to comment.