List of recent subpages using I18N Search

How to display (e.g. in the sidebar) a list of the last updated subpages of a certain parent.

Let's say your blog posts are subpages of a page with slug blog.

Create a component named e.g. recentpage with this content:

<a href="<?php echo $item->link; ?>"><?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?></a>

Insert this in your sidebar (or template):

PHP Code:
<?php get_i18n_search_results(array(
'max' => 7,
'showPaging' => 0,
'HEADER' => 'Recent pages:',
)); ?>

(Thanks to I18N Search custom rendering)

[ First posted here ]

[Updated 8 Feb 2015: added 'first'=>0, ]

blog comments powered by Disqus