Create Custom Boxes
-
I tried to create a custom grid box. I used the instructions from the german tutorial page. I created a folder in the plugin directory named grid-boxen in this folder i have two files: grid_boxes.php and grid_meine_box_box.inc
I removed the dots (“…”) and also the empty arrays in grid_boxes.php.
I changed the variable1 to text like the description.When I activate the plugin there is an fatal error:
Fatal error: Class ‘grid_static_base_box’ not found inI also had a look into the git repo. There is written in usage:
Whatever you want to do, require grid.php and instantiate a new grid_library object.
The grid_library object will provide you with everything you need to.So i added in the plugin these lines:
require_once plugin_dir_path(__FILE__).'../grid/lib/grid.php'; global $grid_lib; $grid_lib = new grid_library();
No there is a new fatal error:
Fatal error: Cannot redeclare class grid_library inWhat should I do that it works?
By the way, in the german documentation is an writing error:
__contruct()
Im Konstruktor muss…it should be:
__construct()
Im Konstruktor muss…
- The topic ‘Create Custom Boxes’ is closed to new replies.