Set individual blog posts on or off

Hello,
as there is no obvious function to enable or disable a blog post, some kind of on/off or show/hide button, how could I temporarily hide a blog post I could need later again?
Thanks, Igor

Great point. We’re looking at draft/publish for a future update.

In the meantime there’s no easy way, unless @everyone else has an idea?!

Hey Igor,
you could mark the posts you want to hide.

Open /inc/tags/blog.php
Find this on lines 12-14:

foreach ($all_blog_files_folder as $files) {	
	$resortfiles[] = $files;
}

replace with:

foreach ($all_blog_files_folder as $files) {
    if (!(strpos($files, '-h-'))) {	
	    $resortfiles[] = $files;
    }
}

Now you can rename blogposts using “-h-” to hide them. E.g. rename “1.txt” to “-h-1.txt”.

2 Likes

Cool, this is a nice way, Dirk. Thanks a lot.
Kind regards, Igor

Hi Dirk,
I just tried this online, but it does not work …
But I get the idea, will try to dive in …
Thanks, Igor

Strange. I tested on Pulse 4.5.2 and it worked.
What is the response? An error message? Or a blank page? Or is it just ignored?
Could you post a link?

Hi Dirk,
I should have added in the original question, that I use pulse with Rapidweaver - and here the modification does not work, looks like it is ignored.
I have setup a pure PulseCMS and it works perfectly.
Now I will try to find out how to set this up for RW …
Thanks, Dirk.
Cheers, Igor

Yes, the code is in the RW stack elements … found it.
Well, at least I know why or how now …
Thanks, Dirk.

Cheers, Igor

1 Like

Beautiful @dirk - this is coming soon in a surprise update in a few days!

2 Likes

I love surprise updates … Yeah!
But will it be updated in the Instack stacks, also?
Thanks, Michael.

1 Like

Why not? :wink: …

1 Like

It’s here @panmeri!

1 Like