• In my blog,i have to add a code to the page.php (a must for me)

    I added the code and works fine in a specific page which i created but the problem is that,when i added the code all the other pages like contact,privacy policy shows it.I just want to show it in that specific page i created

    An example:I created a page let’s say X.I added this code.<?php if(is_page(‘5989’)){
    echo fvCommunityNewsGetSubmissions(30);
    } ?>

    All the pages(contact,privacy policy) effected from this code.I don’t want this code to be shown in those pages but only X page

    Is there a way to exclude that code from other pages not to show it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter cinim

    (@cinim)

    sorry the code is

    <?php if (function_exists(‘fvCommunityNewsForm’))

    fvCommunityNewsForm(); ?>

    Thread Starter cinim

    (@cinim)

    Ok got the solution

    <?php
    if(get_the_ID()==2){
    if (function_exists(‘fvCommunityNewsForm’))
    fvCommunityNewsForm();
    }
    ?>

    2 is the ID of the page

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to exclude an added(to page.php) code from pages?’ is closed to new replies.