2013-12-06, 19:40:30
(2013-12-06, 19:37:40)geotravel Wrote: Hi,
I have question how to put list of latest news in my main index page instead sidebar. I have index page with general information about site and one image and I would like put blow this follow content:
Latest news:
* Title first news
* title next news
....
During edit index page I can switch to HTML mode editor and put
<?php nm_list_recent(); ?>
but after wirte i have
<!---?php nm_list_recent(); ?---!>
and don't display list of title news
You cannot insert PHP code in a page's content (you can use the DynPages plugin to get them from components using shortcodes)
To do what you need, you can edit your template, find the <?php get_page_content(); ?> tag, and below that, insert:
Code:
<?php if (return_page_slug()=='index') nm_list_recent(); ?>