Blog Questions from a newbie

  • I have a couple of questions hopefully someone might set me in the right direction. This is my first time using this system and i'm totally new to Php have some general knowledge of html and css but not much. Sorry if this seems like an easy question.


    Q1

    i have added .htcaccess to clean up my blog posts but its still showing as..

    /blog/2019-10-15-test-1

    is there a way to get rid of the date element in there. this is the rule i have used.

    RewriteRule ^blog/([a-zA-Z0-9-/]+)$ /blog/post.php?s=$1 [L]


    Q2

    is there a easy way to order the posts in the blog i am going to have to copy and paste current copy in so they will all post at the same time. is there an add on number system i can use.


    Any help with these questions would be gratefully appreciated.

    thanks

    Ian :/

  • icaie

    Changed the title of the thread from “Blog Questions form a newbie” to “Blog Questions from a newbie”.
  • drewm

    Approved the thread.
  • Answer to Q2:


    In the documentation you can find a way to sort blog posts by a field, and choose Descending (DESC), Ascending (ASC) or Random (RAND) sorting:

    https://docs.grabaperch.com/fu…/perch-blog-recent-posts/


    If you would like to alphabetically sort your blog posts by title, for example, you could use:


    PHP
    1. <?php
    2. perch_blog_custom(array(
    3. 'count' => 10,
    4. 'template' => 'post_in_list.html',
    5. 'sort' => 'postTitle',
    6. 'sort-order' => 'DESC',
    7. ));
    8. ?>
  • If you manually visit the URL without the date now, does it work?


    /blog/test-1

    Hi, sorry no it loads the page without the content. not sure if this helps but this is where i have been trying to make it work. mycmstestpage.co.uk/blog/


    Sorry update this works now with new posts and if i re save old posts its resolves it. thanks so much greatly appreciated