Forum

Thread tagged as: Problem, Addons, Discussion

Custom post in list problem

Hi all,

I have installed the blog app but can't get Perch to see a custom blog template. I read an existing article below:

https://support.grabaperch.com/index.php?pg=forums.posts&id=6285&pc=5

and noticed in my Perch install, the custom templates are located at perch/addons/perch_blog/templates/blog but the article had it located in perch/templates/blog/

My code is:

<?php

          $opts = array(
            'count'=>2,
            'template'=>'blog/post_in_list_home.html',
            'category'=>array('news'),
            'sort'=>'postDateTime',
            'sort-order'=>'DESC'
            );

          perch_blog_custom($opts);  ?>

What should the correct location be?

Brett Norman

Brett Norman 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

The link you have referred to is Perch 1 documentation. Are you running Perch 1 or Perch 2?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

If Perch 2 then template docs are here: https://docs.grabaperch.com/docs/blog/template-tags/

Check out the bit at the top that says:

To modify templates copy the templates from /perch/addons/apps/perch_blog/templates/blog to /perch/templates/blog and then make your changes. If a template has the same name in this folder as the template in the perch_blog folder it will be used rather than the default. You can also create your own templates with any name you like and pass in the name of the template when using perch_blog_custom.

We also have videos that demonstrate this: