Welcome to the archive of the old FlatPress support forum. Browse more than a decade of FlatPress wisdom! Login is disabled.

The current FlatPress support forum is available here: forum.flatpress.org
How To hide data from main page
  • i want to show widget in a static and entry page but unable to do that
    any one provide a code to hide data from main page..........

    its possibe to get url like a
    someweb.com/yy/mm/dd/mypost  to someweb.com/mypost
  • Hi, you have to create a widgetset called for example static_widgets or entry_widgets where there are other widgets in your template.
    To show or hide just use an if, so the code should like be this:

    {if !empty($flatpress.params.entry) || !empty($flatpress.params.page)}
        {widgets pos=static}
        {* Customize your HTML here *}
            <div class="box">

    It will work also with categories if you modify the if.

    For the second point:
    Both PrettyURLs and RewriteURLs can't handle somehost.tld/mypost because of a cache problem.
    At the moment the cache is split for every month.
    So if you have a lot of entries the cache will occupy a lot of memory.

    There are two methods to avoid this problem:
    If you know PHP you can edit the plugin.
    Otherwise, for few entires you can use the Redirect Plugin with the page mode enabled to get some entries with a URL like the one of static pages.

    @NoWhereMan: you should stick this discussion because there are two of the questions that are always asked.
  • the discussion has been stickified
  • This doesn't work for me. How do you put the code to be executed, on my page it just shows it as it is.
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion