Memberium offers many different shortcodes and chances are at some point you might have thought about customizing/changing the look of the shortcodes. While we do have many parameters to change labels and functionality, you might be looking to customize the layout and format of shortcodes that render forms and content on the front end of your site.
Most visual customizations can be done with CSS, but there are times where you need to modify the underlying HTML that’s being outputted by a Memberium shortcode.
In this article, let’s take a look at how to make advanced customizations to Memberium shortcodes that persist after Memberium updates. The advantage of using this method is that your customizations won’t be lost when Memberium is updated.
Before we go further, you’d need an FTP client like FileZilla to download and edit the file or you can directly edit the file using File Manager from cPanel (or web host control panel).
1. Create a “memberium/shortcodes” directory inside your theme directory.
2. Go to “memberium2/templates/shortcodes” directory and COPY the shortcode file that you want to edit into the new folder that you created in the theme directory. For example, let’s say you want to edit the login form. In this case, you’d copy the “memb_loginform” file to the theme directory.
We suggest not to copy all the shortcode template files and just copy the ones that you need to modify.
3. Now you can go ahead and make changes to the file that you’ve just copied in your theme directory. You can change the HTML (within reason), add CSS, add styles, etc. as long as you keep the hidden and present form fields fundamentally intact and valid. We can provide minimal support for custom templates.
We suggest NOT to modify the original file in “memberium2/templates/shortcodes”, as that will be overwritten with each Memberium update.
Please note that you cannot modify the actual functionality of the shortcode, but this will enable you to modify just the appearance of the form.
Once you’ve made the above changes, Memberium will check the template first in the theme directory, and prefer that copy over the template file in the plugin directory.
We at Memberium recommend creating and using a child theme so that theme updates don’t overwrite your newly customized shortcode template. The advantage of using a child theme is that the parent theme can be updated safely and the changes won’t be lost.
Hope this article will help you in customizing the appearance of Memberium shortcodes.
If you have any questions or face any problems, then you can always contact our support team by opening a support ticket.