WordPress.org

Forums

disable excerpt only for same posts (5 posts)

  1. osinsh
    Member
    Posted 4 years ago #

    I want to disable excerpt function only for same of posts. I guess that this function is set like default for my wp theme Antisnews 1.9 by antisocialmediallc.com. Please help to solve this problem!

  2. alchymyth
    Forum Moderator
    Posted 4 years ago #

    'disable excerpt function' = 'show full post' ?

    you need to find the template file that displays the posts (probably index.php - but you haven't given much info); and then find the line with the_excerpt()

    assume the line looks simply like:

    <?php the_excerpt(); ?>

    then you could change this to the following with the array containing the post IDs where you want to disable the excerpt function:

    <?php if( in_array( $post->ID, array( 12, 33, 67, 325 ) ) ) {
    the_content();
    } else {
    the_excerpt();
    }
    ?>

    untested

  3. osinsh
    Member
    Posted 4 years ago #

    what kind of info do you need?

  4. osinsh
    Member
    Posted 4 years ago #

    <?php global $themeoptionsprefix;?>
    <?php $AntisnewsOptions=get_antisnewsoptions();?>
    <?php $operationmode=$AntisnewsOptions[$themeoptionsprefix.'_operationmode'];?>
    <?php if(!isset($operationmode) || empty($operationmode)){$operationmode="Magazine Off";}?>
    <?php if($operationmode == "Tutorial"){ include (TEMPLATEPATH . '/tutorial-mode.php');}elseif($operationmode == "Magazine Off"){include (TEMPLATEPATH . '/index-nonmag.php');}elseif($operationmode == "Live"){include (TEMPLATEPATH . '/index-live.php');}else{include (TEMPLATEPATH . '/tutorial-mode.php');}?>

    thats what i have in index.php

  5. alchymyth
    Forum Moderator
    Posted 4 years ago #

    sorry, that theme has too many option for me to find the space where you could psssibly change something -

    hopfully someone with an in-depth knowledge of antisnews can help you.

Topic Closed

This topic has been closed to new replies.

About this Topic