- This topic has 1 reply, 2 voices, and was last updated 2 years, 3 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › For the Member Directory plugin, can I overwrite template-2.php?
Tagged: Member Directory Listing
I’m trying to setup a member directory for a client, but I’d really prefer if it output as a table instead of a grid of divs. I purchased your Member Directory LIsting plugin, and my first thought was to rewrite the output with javascript, but then I noticed that you have template-1.php and template-2.php. Ideally, I’d like to create a template-3.php, but that would involve changing other parts of your code which seems like a bad plan when you next update your code.
So is it safe to overwrite template-2.php, is that file very static? Or, better yet, is there any chance you could change this code in ‘swpm_mda_show_listing.php’ from:
if ( isset( $params[ ‘template’ ] ) && $params[ ‘template’ ] == ‘2’ ) {
include_once(SWPM_MDA_PATH . ‘/views/template-2.php’);
} else {
include_once(SWPM_MDA_PATH . ‘/views/template-1.php’);
}
to:
if ( isset( $params[ ‘template’ ] ) && $params[ ‘template’ ] != ‘1’ ) {
include_once(SWPM_MDA_PATH . ‘/views/template-‘.$params[ ‘template’ ].’.php’);
} else {
include_once(SWPM_MDA_PATH . ‘/views/template-1.php’);
}
Or do you have another suggestion? I worry using Javascript would still not be very future proof.
The Member Directory Listing Addon is eligible for Premium Addon Support. Please create a Premium Addon Support ticket and a developer will contact you:
https://simple-membership-plugin.com/premium-addon-support/