November 2018: Registration is broken at the moment - we are working on it. Sorry for the inconvenience!
Check the blog for the latest news about the ongoing FlatPress revival!
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..........

    and
    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 *}
            <h4>{$subject}</h4>
            <div class="box">
                {$content}
            </div>
        {/widgets}
    {/if}

    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