Disable preview of a blog post?

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
Docthib
Posts: 4
Joined: Fri May 08, 2026 1:37 pm

Disable preview of a blog post?

Post by Docthib » Fri May 15, 2026 4:11 pm

Hello all,
I am in my first weeks with Flatpress, and delighted! (though confused sometimes, while digging through .css or .php files while not knowing what I am doing ;) ).
I have a simple question: can we turn off the preview/display of a blog post in the writing page?
What am I talking about: when I write a new blog post, in the window I am writing in, there is a Preview of the post above. This is cool and nice, but since I tend to write loooong blog posts and edit them, each time I come back to edit the post, I need to scroll down past the whole Preview to access the beginning of the Writing window. Could I just suppress the preview? And how?
I tried to see wether there was a "preview" section in admin.tpl or preview.tpl or default.tpl, but I am probably looking at the wrong files.
I am running FP 1.5.1 (self-hosted) with the leggero-v2 theme that I have (slightly) tweaked.
Any help or directions appreciated!
Sincerely,
Docthib

User avatar
RainerBielefeld
Posts: 57
Joined: Fri Jul 18, 2025 7:15 pm
Location: Braunschweig, Germany
Contact:

Re: Disable preview of a blog post?

Post by RainerBielefeld » Fri May 15, 2026 9:06 pm

Docthib wrote: Fri May 15, 2026 4:11 pm can we turn off the preview/display of a blog post in the writing page?
Hi,

this might be a workaround until you will have got a better solution!
If you tye a dot or something similar behind a Heading, all following contents behind the heading will vanish from preview and final view. But remains for editing, also after having published the BlogPost (in Draft Mode).


Example you see here!

For dropping the preview you type a dot behind the

Code: Select all

[h2]fatal heading[/h2]
so that it becomes

Code: Select all

[h2]fatal heading[/h2].

» All contents after that heading will be suppressed.

When you have finished work and want to publish (and may be have a preview): Simply delete the dot behind "fatal heading"

CU

Rainer
New here. I was planning to switch from Wordpress to FlatPress. But it seems to be too hard ...

Docthib
Posts: 4
Joined: Fri May 08, 2026 1:37 pm

Re: Disable preview of a blog post?

Post by Docthib » Sun May 17, 2026 5:47 am

Hi Rainer,
thank you very much, I will try that... as soon as I know which file I have to modify the fatal heading of :)
Would you know by chance which is the file that "generates" the page to edit a blog post?
In this file (that I don't identify for now), I would expect a section with the preview (this is where I would put the "." or ":" ), and a section below which is actually the window to edit the post.

In the Leggero Admin menu, it is in
General →Post← StaticPages Upload etc.
And in Post, it is
ManagePosts → WriteAPost← ManageCategories
So I am looking for this php / tpl / css page to modify it with your solution.
Sincerely,
Docthib

User avatar
RainerBielefeld
Posts: 57
Joined: Fri Jul 18, 2025 7:15 pm
Location: Braunschweig, Germany
Contact:

Re: Disable preview of a blog post?

Post by RainerBielefeld » Sun May 17, 2026 5:04 pm

Docthib wrote: Sun May 17, 2026 5:47 am as soon as I know which file I have to modify the fatal heading of
Wrong approach! As you see in my linked Example (you see here): Simply add a Heading with the wrong syntax at the top of your posting!

In my Example after Start text "This is some text":

The heading

Code: Select all

[h2]fatal heading[/h2].
has a dot behind the

Code: Select all

[/h2]
, which breaks the posting view and posting preview.

CU

Rainer
New here. I was planning to switch from Wordpress to FlatPress. But it seems to be too hard ...

User avatar
RainerBielefeld
Posts: 57
Joined: Fri Jul 18, 2025 7:15 pm
Location: Braunschweig, Germany
Contact:

Re: Disable preview of a blog post?

Post by RainerBielefeld » Sun May 17, 2026 6:54 pm

Or even more Simple:
  1. Start a new Blogpost
  2. Give it a Heading "Test for Workaround"
  3. Copy / Paste Code from below to Psting text body
  4. Do Preview
Nothing except Heading "fatal heading" will be in Preview.


Code:

Code: Select all

[h2]fatal heading[/h2].

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
[h3]anotherheading[/h3]
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
New here. I was planning to switch from Wordpress to FlatPress. But it seems to be too hard ...

Docthib
Posts: 4
Joined: Fri May 08, 2026 1:37 pm

Re: Disable preview of a blog post?

Post by Docthib » Tue May 19, 2026 8:03 am

Hi,
thanks for the followup!
I tried it, and it did not work: the preview shows your whole message. I also tried with a colon ":"" instead of the dot ".", and also by changing the lines – nothing works.

So I came back to my initial question, and solved the problem.


Here is the process, for future generations :)
  • using Filezilla, download the whole flatpress folder on your local drive
  • use a grep command ; I use the GrepWin program on Windows
  • search for the text "preview" in all the files. Out of all the flatpress files, I then identify that it is the admin.entry.write.tpl file in the following path: \admin\panels\entry\admin.entry.write.tpl
  • opening this file with a text editor, I went for the first block i.e.

    Code: Select all

    {entry_block}
    	<div id="admin-post-preview">
    	{if isset($preview)}
    		<fieldset id="post-preview"><legend>{$panelstrings.preview}</legend>
    		{include file="preview.tpl"}
    		</fieldset>
    	{/if}
    	</div>
    
  • And I "commented" the lines in the <div> block, so that they do not get executed, as follows:

    Code: Select all

    <div id="admin-post-preview">
    				{* 	{if isset($preview)}		 *}
    				{* 		<fieldset id="post-preview"><legend>{$panelstrings.preview}</legend> *}
    				{* 		{include file="preview.tpl"} *}
    				{* 		</fieldset> *}
    				{* 	{/if} *}
    	</div>
    
  • Now I connected with Filezilla, went to the same folder i.e. \admin\panels\entry\ where I renamed the (original) admin.entry.write.tpl file into admin.entry.write-bak.tpl
  • and then I uploaded my new admin.entry.write.tpl (modified) file
Test on my blog:
- writing a blog post and asking for a preview: it does not show the preview, only the writing block (which is what I wanted)
- publishing a blog post, and then editing it: same, no preview on top, the editing begins directly with the writing window.

Hope this helps others!

Note: with the grep, I first searched for the word "aperçu" ("preview" in French), since this is the word that appears in my Flatpress admin. But to no avail: this preview function is not embedded in the localized files in /interface/themes/lang/, so you have to know the english word you are looking for ;)

User avatar
RainerBielefeld
Posts: 57
Joined: Fri Jul 18, 2025 7:15 pm
Location: Braunschweig, Germany
Contact:

Re: Disable preview of a blog post?

Post by RainerBielefeld » Tue May 19, 2026 7:45 pm

Thx!

A last hint concerning my workaround:
Works fine also in 2 other Blogs, but fails in my "naked" installation – simply basic Blog, no additional Plugins! See here!

CU

Rainer
New here. I was planning to switch from Wordpress to FlatPress. But it seems to be too hard ...

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 0 guests