0

I am fairly new to WordPress Theming and you don't need to provide me a complete answer for this, but rather a nudge into the right direction, as I'm still trying to understand the basic concepts of this area.

Basically, I have a plugin Events Manager. And parts of this plugin, the list of upcoming events, I want to show on the Index of my custom Theme.

So far, I've been kind of following this documentation page, so I've taken the events-list.php file from the template folder of the plugin and put it in my custom theme folder ( /plugins/events-manager/templates/templates, as described on the above linked page) and tried to fetch it with get_template_part(), to no success.

Again, maybe (probably) I'm just not fully understanding a basic theming concept here, so just an advice on where I need to go looking for should probably suffice.

| improve this question | | | | |
  • Hi patrick. Would you mind describing your issue? "Not working" is not really a question, you should describe what is happening, including errors, PHP logs, etc. – Jack Johansson Aug 26 '17 at 0:41
  • @JackJohansson, thanks for cleaning up the post and for your comment. With "trying to fetch it with get_template_part(), to no success" I actually meant, that nothing is happening, really. The part on the page, where I expect the events-list to appear, stays empty. There are no errors thrown. – Patrick Manser Aug 27 '17 at 18:09
  • you can't use get_template this way buildwpyourself.com/get-template-part, instead you might want to use a shortcode in your template. the plugin documentation might tell you how to call a shortcode function directly, which is more efficient than using something like echo do_shortcode('[some-short-code-and-params]');. – inarilo Aug 30 '17 at 8:46
  • @inarilo thanks for the suggestion, will look into it! – Patrick Manser Aug 30 '17 at 13:28
0

The answer is in your documentation link under Common Mistakes:

Wrong folder path – Files within the templates folder are not put within wp-content/themes/twentyten/plugins/events-manager/templates/templates/, note the extra templates folder in this path compared to the previous one.

Use /plugins/events-manager/templates/ instead. I.e. you need to copy files inside the plugin's templates folder to your theme, not that first templates folder.

The plugin should then fetch these files automatically.

| improve this answer | | | | |
  • Thanks for your answer. I should've mentioned, that I actually tried this first, before moving them to templates/templates, it doesn't change anything, though – Patrick Manser Aug 27 '17 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.