NeilMonteiro
Forum Replies Created
-
Forum: Plugins
In reply to: [Multiple content blocks] MCB not updating in editor – cache issue?Thanks Harold, I really should have read the codex page on the Loop at some point (http://codex.ww.wp.xz.cn/The_Loop) where this is mentioned!
Thanks for the fantastic plugin – it provides essential functionality for me!
Forum: Plugins
In reply to: [Multiple content blocks] MCB not updating in editor – cache issue?For anybody else with the same problem, I seem to have solved this myself:
The problem seemed to be that I was using get_posts() in my template so the global $post variable was set to something other than the page I was working in. I assume that the_block() uses $post to attach each block to the correct page.
To solve this, I called the wordpress function wp_reset_postdata(); after I was done with the get_posts() loop – i.e. before I next called the_block().
Hope this helps someone!
Forum: Plugins
In reply to: [Multiple content blocks] MCB not updating in editor – cache issue?I think I’m narrowing this down. New blocks added to the beginning of the template page show up fine in the editor. Blocks added towards the end don’t turn up at all.
Clearly there’s something wrong going on in the middle of the page… Does it matter that I’m using get_posts() in the middle of the page?
For reference, template is here:
Calls to “TestBlock” and “TestBlock3” in lines 17 and 18 work fine, “TestBlock2” at line 170 doesn’t.
Forum: Plugins
In reply to: [Multiple content blocks] MCB not updating in editor – cache issue?I should mention too that I’ve tried switching off HTTP requests and it hasn’t helped…