meta data for this page
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
how_to_show_the_latest_posts [2022/12/10 15:34] – created sgraf | how_to_show_the_latest_posts [2022/12/10 16:06] (current) – sgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | < | + | ====== How to show the latest posts? ====== |
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | So you would like to add your latest blog posts to your website, this is very easy however you will need to customise this to match your theme. | ||
+ | |||
+ | Simply add the following line to your integration: | ||
+ | `$latest_posts = $this-> | ||
+ | |||
+ | So the integration should look like this: | ||
+ | |||
+ | <?php | ||
+ | Loader:: | ||
+ | // Menu items | ||
+ | if ($this-> | ||
+ | | ||
+ | | ||
+ | }else{ | ||
+ | | ||
+ | } | ||
+ | // Footer Links | ||
+ | $footer_links = $this-> | ||
+ | $footer_categories = $this-> | ||
+ | // Multi-languages | ||
+ | $lang = $this-> | ||
+ | $default_lang = $this-> | ||
+ | |||
+ | // Latest blog posts | ||
+ | $latest_posts = $this-> | ||
+ | ?> | ||
+ | |||
+ | Then you need to use the following: | ||
+ | |||
+ | < | ||
+ | <?php | ||
+ | if (!empty($latest_posts)) { | ||
+ | foreach($latest_posts as $key => $post ){ | ||
+ | ?> | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <a class=" | ||
+ | <?php echo $this-> | ||
+ | </ | ||
+ | <?php | ||
+ | } | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | </ |