Page Layout

Update version in progress: the bugfix coming soon!

53 thoughts on “Page Layout

    • Seems to be a bug when using the plugin (0.3) with WP 3.1 – Editing a Page with Page Layout enabled: when clicking the down arrow (widget-title-action) for an in place widget the box opens but then immediately closes, preventing the user from editing it.

      I disabled all other plugins, so think it’s the version of WordPress – it was working before I upgraded on WP3.0.

      Anyone else have this problem?

      Regards, Adam.

    • Thankyou very much!!!
      The plugin work fine with the QueryPost Widget.
      If you want to have the same functionality on post you can hack the add_meta_box function on #273 line of the plugin:

      if ( 'page' === $page ){

      in

      if ( ( 'page' === $page ) || ( 'post' === $page ) ) {

    • You can define new layout via the function register_layout() in the function.php file of your theme. The plugin define two sample defaults layouts that you can see in Screenshots section.

      e.g.

      < ?php
      // /function.php
      if ( function_exists('register_layout') ){
      register_layout(array(
      'name' => 'Name of Layout',
      'zones' => array( 'name of zone one', 'name of zone two', 'name of zone three' [, ...] ),
      'thumbnail' => 'thumbnail-of-layout.jpg', // with extension (jpg/gif/png)
      'template' => 'name-of-php-template-file' // without extension
      ));
      }
      ?>

      The code of the new template plans to use a new property of the global object $post: $post-> layout

      e.g.

      < ?php
      $zones = $post->layout['zones'];
      foreach ($zones as $zone){
      dynamic_sidebar($zone)
      }
      ?>

      The php template file should be placed in the folder layouts of your theme folder (/wp-content/themes/your_theme/layouts/.php) or in the plugin folder (/wp-content/plugins/page-layout/layouts/name-of-php-template-file.php) if you want the layout to be independent from the theme.

      The thumbnail should be placed in the child folder of layouts: layouts/thumb/thumbnail-of-layout.ext

      If you want to include also a related css file separate from the theme installed you can create it in /wp-content/plugins/page-layout/css/page-layout-general.css or for each php template /wp-content/plugins/page-layout/css/page-layout-name-of-php-template-file.css.
      The plugin include a simple widget to display the content of current page

    • Look at the very bottom of the edit page. The options should be there. At least, it works for me, using also WP 3.0

  1. Hello,
    I hope you can help me. Your plugin is great, is just what I needed to design and impressive landing page for my site. But I’m having problems trying to change the design of it. I have very very basic CSS and HTML knowledge. I managed to change some things as padding, but now I would like to give the same look as the normal post to the post in the layout page. I’m designing the template of my site using Artisteer, and I don’t know how exactly to “link” each other, to make the layout done with your plugin to search at my theme CSS files to use the “art-post” class only in some of the zones (I’m using the 4 zones template).

    Sorry if it’s difficult to understand. It’s difficult for me to explain it (I’m Spanish). Thank you

      • Sorry for annoying you, but, could you be more precise? In 4zones.php file? In page-layout.php? I don’t know exactly where to add it :( .

        • No problem!
          You can copy the ‘layouts’ folder in your theme folder and modify the 4zones.php as you want.
          The template file work with the dynamic_sidebar() function like a normal wordpress sidebar.
          You can create a new zone template if you need (and register a new layout)

          (The plugin check if the xxx.php file exsist in the theme folder, if not it search in the plugin folder. It’s a rudimental fallback system… I know: need to make it better!!)

          • Too difficult for me, sorry. I don’t understand enough PHP and CSS code in this moment, and thus make this plugin unusable for me :( . So sad, because I love the way you add it and drag and drop items to them. Maybe for people like me, would be really useful a setup page in WP admin page to customize the layout design, using a “blank page”, “main content”, “sidebar” or so in a drop down menu for each zone. I think this would make this plugin almost perfect to create amazing front pages. But for now, I cannot figure how to stylize the design of the zones :(

  2. Ciao Luca,

    complimenti per la plugin..purtroppo sta dando anche a me qualche problema su WP 3.0. La cosa strana è che ha funzionato inizialmente, ovvero al primo tentativo, poi alla successiva modifica ha iniziato ha scombinare il layout del mio tema. In effetti ho una dozzina di plugin attive anche se ho idea che la cosa dipenda forse da come è programmato il tema.

    Ti sei fatto una qualche idea a riguardo, se c’è qualcosa in particolare che potrei verificare? leggo sopra che a inizio luglio già qualcuno ti aveva sottoposto il problema.

    Grazie!

  3. Hello Luca!

    A installed your plugin (WP 3 hugarian edition). I haven’t any meta box in add/edit page.
    I tried these:
    - set the theme to default -> same problem
    - disable all extra plugin -> same problem

    Have you got any idea?

  4. hay do you know of a plugin that will let me have a text box inside of my pages cotent what I mean is I used to have a ning social networking site which was free but I lost it and could not access it so I can put what was on it to my official website I have now I want to add text boces for like different parts of my pages.

  5. This is a very nice plugin, but i’ve found that it uses a huge amount of resources in the admin area when running a foreach statement which is located on line 392 of the page-layout.php file. I have a 90 page site and each page uses this page layout plugin, which has five different page formats. Each page has up to 10 widgets in 3 different positions.

    When the page loads is in edit mode, the code i referenced in page-layout.php takes up to 5 minutes to load. Then when you make the update and save your changes it takes another 5 minutes. I found that by commenting out the code on line 392, the page loads quickly, but I can’t tell if this code is needed, because it loads in a hidden div tag.

    I’ve sent two emails to the Luca (the author) but have not had a response. I’d like to find out if this code is needed, or if there is a work around for the long load time.

    • Yes I know unfortunately…
      The system to update the zones of page layout follows the update widget area of widget page in backend (in detail: the callback code of admin-ajax save-widget and widgets-order)
      By removing that code you risks that are removed the pagelayout settings of other page or the widget setting of your sidebars

  6. in english:
    the plugin is correctly installed, but after activation in the panel of a page we can not configured the devises because the opening area is too fast and closes before we can enter any data
    can you explain me or update the currect version to a 3.1 wordpress.

    in French: le plugin est correctement installé mais après activation dans la page le volet d’ouverture pour configurer est trop rapide et se ferme avant que l’on ne puisse saisir aucune donnée. Pourriez vous m’aider ou mettre à jour cette version pour la version 3.1 de wordpress

    • I am having the same problem as Poolinvest. Every time I try to open a widget in the Page Layout panel in WordPress 3.1, the widget closes right away. I think it’s a Javascript issue of some sort, but I’m not sure how to debug it.

  7. Poolinvest, I figured out a way to fix this issue. In the widgets.js file, change line 30 from this:

    $(‘a.widget-action’).live(‘click’, function(){

    to this:

    $(‘a.widget-action’).click(function() {

    … there are other lines using the same “live” function for the click event, but I’m not sure they need to change, as they’re not toggle switches.

    • This doesn’t work as a fix… Yes, you can normally drag a widget. This new code stops the drag and drop, and prevents the down arrow working at all.

  8. I am working on a WordPress site that has this plugin installed. I just created a new page and made some changes in the Page Layout settings on that page. When I did that, and saved the changes, the content on ALL other pages disappeared! What could possibly have caused this? I thought I was only making changes to the one page.

    • Hi Tim,

      This is Darren. It seems that you are working on a website that I also worked on because I recognize your name in emails. The same issue happened to me on this site. See my comments above for “Darren Peterson”. I had uncommented the code I mentioned in my post, but Luca says that this will cause the Page Layout for all other pages to be removed. So I have added the code back in and this should fix the issue you are having on that site.

      • Hey Darren,

        Haha…wow, it’s a small world! Yes, that’s me. Funny, I guess I didn’t read your comment above carefully enough, and didn’t recognize your name. Anyway, thanks very much for your help– glad this is sorted out.

  9. Luca,
    First, great plugin, still trying to figure out how to fully utilize it for a site I am working on.

    But to my question, the designer has some specific layouts and we don’t want the user to be able to add the page content to where ever they want, so, how can I remove the “Page Content” widget? I’ve tried unregistering it via unregister_sidebar_widget( ‘page_content’ ); but WP simple increments that to page_content-2.

    Any thoughts?

    Thanks.

  10. the plugin is correctly installed, but after activation in the panel of a page we can not configured the devises because the opening area is too fast and closes before we can enter any data
    ***********
    to respond to Shaun Winters :
    March 8, 2011 at 2:11 pm
    Can you select a zone and drag a widget in the page if you don’t use my fix? :p
    Yes I can do it but your fix give me a black page and I my problem is not solved
    ******
    Is here any one to help me to solve an to fix this issue
    When I try to open a the Page Layout panel in an article in WordPress 3.1 or in 3.2, the widget closes right away.

  11. Ciao Luca,
    il plugin che hai sviluppato è molto interessante. Ci sarebbe molto utile per la realizzazione di un sito sperimentale su cui stiamo lavorando.
    Solo che abbiamo il soltito problema che era già stato segnalato a marzo del 2010
    “Seems to be a bug when using the plugin (0.3) with WP 3.1 – Editing a Page with Page Layout enabled: when clicking the down arrow (widget-title-action) for an in place widget the box opens but then immediately closes, preventing the user from editing it.”
    In pratica, ci sembra che effettua widget-action hide-if-no-js


    Da cosa dipende? Stiamo usando una versione non compatibile del browser? abbiamo usato firefox 7.1 e firefox 5. Abbiamo avuto lo stessa problema su entrambi.
    Pensi di poterci aiutare?

    Paolo

  12. I installed the Page Layout Widget and I too am having the problem that after you drag and drop an item into any section of either of the 2 layouts, the widget opens and closes so fast there’s no way to put anything into it.

    I don’t understand why this is happening or if there’s some conflict causing this, but more importantly, I see many other comments from people before mine saying they’re having the exact same issue however, the last comment before me was in May of 2011, and I see no resolution.

    Has anyone come up with any unlisted update or fix for this? Otherwise this seemingly wonderful plug-in has rendered itself completely useless.
    PLEASE ADVISE!

  13. Hello Luca,

    I am also having the same problem as a few other people above, that after I drag and drop an item into any section of either of the 2 layouts, the widget opens and closes so fast there’s no way to put anything into it.

    I know many people have already mentioned this but there doesn’t seem to be any resolve as yet. Do you have any suggestions for fixes?

    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>