Search found 3 matches

by GracefulForm
Tue Feb 06, 2024 1:05 am
Forum: General
Topic: Parent submenu (list children on child page)
Replies: 4
Views: 5700

Re: Parent submenu (list children on child page)

Thanks to the help of the previous messages, here is a complete snippet that will show a menu of child pages, whether you are viewing the parent page or one of the child pages. If you are on a page that has no child pages, there is a link back to the blog. This will be helpful to those who are makin...
by GracefulForm
Sun Jan 14, 2024 2:17 am
Forum: General
Topic: Print tag or category name
Replies: 7
Views: 70048

Re: Print tag or category name

I came across this and it was very helpful, thank you. To fill the space when a category or tag is not being shown, I added the option to use the word "Recent." <?php // Check if the user is browsing a category if ($WHERE_AM_I=='category') { // Get the category key from the URL $categoryKe...
by GracefulForm
Tue Aug 15, 2023 12:49 am
Forum: General
Topic: Add "default image" instead of empty image
Replies: 3
Views: 3252

Re: Add "default image" instead of empty image

Using the above messages, here is a complete code, assuming your image is called 'default_img.jpg' and it is stored in your theme's 'img' folder: <?php if ($page->coverImage()) { ?> <a href="<?php echo $page->permalink(); ?>"> <img src="<?php echo $page->coverImage(); ?>"> </a> <...