Remove entry-content from infinite scroll homepage

Community Forums Forums General Discussion Remove entry-content from infinite scroll homepage

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  Tom 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #96985

    nkeat
    Participant
    Post count: 2

    Hello,

    I was wondering what the best practice in genesis to hide the excerpt from posts on the homepage (infinite scroll).. Right now i’m using CSS as a temp fix, see screenshot.

    “#infinite-view-4 .entry-content, #infinite-view-5 .entry-content, #infinite-view-6 .entry-content, #infinite-view-7 .entry-content, #infinite-view-8 .entry-content {
    display: none;
    }”

    Thanks!

    #97514

    Tom
    Participant
    Post count: 892

    Screenshot ?

    Also: Link? Theme?


    Choose your next site design from over 350 Genesis themes.
    Updates via GenesisThemes.ca | Twitter | Google+ | Tumblr

    #102978

    nkeat
    Participant
    Post count: 2

    Ya here is the screenshot without the “display:none” (see inspector)

    http://imgur.com/sIVPr7y

    And here is how it is supposed to look with display none enabled (see inspector).

    http://imgur.com/2ST3CGb

    The issue is that obviously the pages created by infinite scroll increase every 10 articles. Hence the need to create css markup seen in my originial question.

    I’m wondering the what the proper function is so I can achieve this (remove entry content from homepage index) without using css.

    Thanks!

    #102980

    nkeat
    Participant
    Post count: 2

    **To clarify, the following function works for the first page, before the infinite scroll kicks in (ie I dont have to hide via css for the first page).

    How can I adapt this function to include pages that are loaded by infinite scroll?

    add_action(‘genesis_before’,’remove_some_actitons’);

    function remove_some_actitons() {

    if ( is_home() ) {

    remove_action( ‘genesis_entry_content’, ‘genesis_do_post_content’ );
    }

    }

    #103023

    Tom
    Participant
    Post count: 892

    So it seems you’ve got a working custom function, and a work-around for the conflict with infinite scroll.

    Without knowing the code that’s delivering the infinite scroll it makes it kinda tough to know how to work around it – how to control its effect on the loop output.

    You could follow-up with your dev/plugin guys, maybe check-in at Appfinite, too.


    Choose your next site design from over 350 Genesis themes.
    Updates via GenesisThemes.ca | Twitter | Google+ | Tumblr

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.