Forum

Thread tagged as: Question, Configuration, Addons

Perch_Blog - post.php displaying more than one post

I have installed Perch_Blog onto a site I am currently working on and got the main section of the blog working fine. I can see my recent posts but when I click onto one, I am getting both recent posts that I have submitted with the full details of both posts. How do I get this to display only the post I have clicked on?

I am using the following code within my post.php...

<div class="wrapper cols2-nav-right">

        <div class="primary-content">
                    <div class="post">
                <?php perch_blog_post(perch_get('s')); ?>

                <?php perch_blog_author_for_post(perch_get('s')); ?>

                <div class="meta">
                    <div class="cats">
                        <?php perch_blog_post_categories(perch_get('s')); ?>
                    </div>
                    <div class="tags">
                        <?php perch_blog_post_tags(perch_get('s')); ?>
                    </div>
                </div>          
                <?php perch_blog_post_comments(perch_get('s')); ?>      
                <?php perch_blog_post_comment_form(perch_get('s')); ?> 
            </div>
        </div>
    </div>

All of the master pages are unchanged from the original files

Curtiss Greveson

Curtiss Greveson 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What does the URL look like for a sample post page?

Hi Drew,

It looks like the following... /blog/post.php?s=2014-07-29-test-blog

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. Nothing in that snippet you posted should produce a post listing. Is that all that's in your page?

This is all the code I am using which involves the blog...

<div class="rightcolumn">
            <!-- The following functions are different ways to display archives. You can use any or all of these. 

            All of these functions can take a parameter of a template to overwrite the default template, for example:

            perch_blog_categories('my_template.html');

            --> 
            <!--  By category listing -->
            <?php perch_blog_categories(); ?>
            <!--  By tag -->
            <?php perch_blog_tags(); ?>
            <!--  By year -->
            <?php perch_blog_date_archive_years(); ?>
            <!--  By year and then month - can take parameters for two templates. The first displays the years and the second the months see the default templates for examples -->
            <?php perch_blog_date_archive_months(); ?>
</div>

    <div class="wrapper cols2-nav-right">

        <div class="primary-content">
                    <div class="post">
                <?php perch_blog_post(perch_get('s')); ?>

                <?php perch_blog_author_for_post(perch_get('s')); ?>

                <div class="meta">
                    <div class="cats">
                        <?php perch_blog_post_categories(perch_get('s')); ?>
                    </div>
                    <div class="tags">
                        <?php perch_blog_post_tags(perch_get('s')); ?>
                    </div>
                </div>

                <?php perch_blog_post_comments(perch_get('s')); ?>

                <?php perch_blog_post_comment_form(perch_get('s')); ?>

            </div>
        </div>


    </div>

I managed to solve this problem by un-installing the Perch_Blogs app and re-installing it.