Forum

Thread tagged as: Question

Content Custom 'Start'

I'm using the List and Detail method for a news page.

On the article pages I'm filtering by Slug so that the listing doesn't show the active article.

The issue I have is that the news home page shows the latest article, and because it's not using a slug, the latest article is also showing in the list below.

I thought I could use 'Start' and set it to '2', but it doesn't work.

Any suggestions would be really helpful.

Thanks.

<?php
                if ( perch_get( 's' ) ) {
                    perch_content_custom( 'News', array(
                        'template' => 'news_listing.html',
                        'filter'=>'slug',
                        'match'=>'neq',
                        'value'=>$_GET['s'],
                        'count' => 4,
                    ) );

                    // Detail mode

                } else {
                    perch_content_custom( 'News', array(
                        'template' => 'news_listing.html',
                    ) );

                    // List mode

                }

                ?>
Tim Rex

Tim Rex 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you setting both start and count ?

Tim Rex

Tim Rex 0 points

Just start as I want it to show all posts. Do I need to set both?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You do, yes.

Tim Rex

Tim Rex 0 points

Ok, great. Thanks so much for the quick reply.