Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi KK,

I'm hoping you can help with this.

Currently I have my site set up to pull the 3 latest blog entries and display them in the footer, so they show up on every page my website for easy access. This works really well, except when I get to the pagination part of the blog itself. On each paginated page, it shows the 3 entries in the footer from that page - view links below to see what I mean:

https://webinkedesign.com/crumbs/
https://webinkedesign.com/crumbs/?pg=2

What I would like is for the footer to always display the latest 3, if possible. Any idea how to get around this issue?

I'm using the code below in my footer:

<cms:pages masterpage='crumbs.php'
folder=k_folder_name
start_on=k_archive_date
stop_before=k_next_archive_date
paginate='1'
limit='3' >
<div class="post col-4">
<!-- Post Title -->
<cms:excerptHTML count='5'><h5 class="blog-title"><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h5></cms:excerptHTML>
<!-- Post Data -->
<cms:if k_page_foldertitle >
<cms:set my_category=k_page_foldertitle />
<cms:else />
<cms:set my_category='Uncategorized' />
</cms:if>
<p class="sub"><cms:show my_category /> &bull; <cms:date k_page_date format='M jS, Y'/></p>

<cms:if "<cms:not_empty blog_image />" >
<!-- Post Image -->
<a href="<cms:show k_page_link />" ><img class="thumb blog-banner" src="<cms:show blog_image />" alt="Blog Preview" /></a>
</cms:if>
<!-- Post Content -->
<cms:excerptHTML count='25' ignore='img'><cms:show blog_content /></cms:excerptHTML><a href="<cms:show k_page_link />" >[Read more]</a>
<!-- Read More Button -->

</div>



</cms:pages>


Thanks!
Hi,

The cms:pages opening tag in the footer can be simplified to the following -
Code: Select all
<cms:pages masterpage='crumbs.php' limit='3' >

Now that you are not instructing it to 'paginate' (as in the existing code), it should always show the latest 3 posts.

Hope it helps.
Brilliant...

It worked perfectly. Sometimes simpler is definitely better.

Thanks again!
You are welcome :)
4 posts Page 1 of 1
cron