Forum

Thread tagged as: Question

Perch blog question

I have a question regarding the Perch Blog app.

I have installed the app and I used the code in a .php page:

<?php perch_blog_recent_posts(10); ?>

to obtain at least 1 post, however while it shows in the page, only the title is presented, i.e. no "body" text, with Comments at 0 and when I click on the link, it has a 404 File not Found error, e.g.

/blog/post.php?s=2015-05-26-kjh

Am I meant to create a folder for blogs or an index.html file since there was no place to put a link to traverse to a particular file in the web hosting.

Thanks

Garth Holmes

Garth Holmes 1 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

I would suggest starting with the example files in the download. Once you have those working you can update them with your own design.

Hi Garth

There's a folder called blog in the perch_blog app folder. This contains some example files Perch have created to get you going. Put folder that at the root of your site and you can then work out which templates you need to use from there. I see these as the "front end" files. You don't have to use these example files but they will get you up and running.

You might also choose to copy the perch_blog/templates/blog folder into your perch/templates/ folder. This will allow you to customise the way that data from the blog app is delivered to your "front end" files. Or you can just leave them where they are as they work out of the box for most cases.

https://docs.grabaperch.com/addons/blog/installation/

Hope this helps,

Kind regards

Jon

Hi Johnathon,

I will do that regarding templates, however I read some of the notes in the installation section, and I edited the .htaccess file as follows:

ErrorDocument 404 /404/index.php

<IfModule mod_rewrite.c>  
    RewriteEngine on  
    RewriteRule ^blog/([a-zA-Z0-9-/]+)$ /blog/post.php?s=$1 [L]
</IfModule>

but it doesn't seem to do anything but I do acknowledge that the link for whatever reason linked nowhere from the page where the original blog instruction was kept.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Have you updated your blog post path under Settings in Perch?

Hi Rachel,

Works beautifully.

Thanks to yourself and Johnathon.