Seems you've done everything correctly, but just in case here's what worked for me in a couple of steps
- opened database.js
- added a testBlock in the blocks section (pasting the whole blocks section below)
Code: Select all
"blocks": {
"footer": {
"content": "©2017 Your website"
},
"subside": {
"content": "<h3>About your website<\/h3> <p>Your photo, website description, contact information, mini map or anything else.<\/p> <p>This content is static and visible on all pages.<\/p>"
},
"testBlock": {
"content": "<h3>About your website<\/h3> <p>Your photo, website description, contact information, mini map or anything else.<\/p> <p>This content is static and visible on all pages.<\/p>"
}
}
- opened theme.php and added <?=wCMS::block('testBlock')?>
- it worked (even after editing and being logged out)
If you've done everything as described above, and I think you have, you may be experiencing this because your <?=wCMS::block('newbox')?> isn't wrapped in a <div> in your theme.php. If your block is wrapped in a <p> or a <span> in your theme PHP then this is the problem. Somebody reported something similar a couple of days ago
on GitHub. If this isn't the issue, please paste your databse.js (only the blocks section) so we can see if anything is wrong.
Report back how your block is wrapped in your theme and we can work from there.