Creating a custom module
-
Hi
I am struggling to create a custom module “photo details” as a child of post.1. I cloned post_most_popular.php in /src/modules and changed:
class BWP_GXS_MODULE_POST_PHOTO_DETAILS extends BWP_GXS_MODULE
Called this post_photo_details.php and also saved in /src/modules2. In my theme’s functions.php added:
add_action('bwp_gxs_modules_built', 'bwp_gxs_add_modules'); function bwp_gxs_add_modules() { global $bwp_gxs; $bwp_gxs->add_module('post', 'photo_details'); }That’s it. I then expected a new line “photo Details” to appear in the config? Or even a new XML sitemap.
I also tried to move the post_photo_details.php into a custom directory and define that directory in the Advanced Options. But still no success: I see nothing in the config.
What am I doing wrong?
The topic ‘Creating a custom module’ is closed to new replies.