Custom template for new topic

Author
Topic
#2770

Dear Developer,

Thank you for the plugin.

We have a separate page with a custom template for adding a new topic where we call
bbp_get_template_part( ‘form’, ‘topic’ ); , is there any conditional tag we can add to protect this form?

Thank You

Viewing 5 replies - 1 through 5 (of 5 total)
Author
Replies
  • #2771

    Plugin hooks into bbPress templates loading (the function you also call) and it checks the access according to the settings. If you set your plugin settings to protect topic form, it should be replaced by the plugin. But, if you have some other overrides too, that might not work. I can’t guarantee that plugin will work with customized loading that is not directly tied into bbPress.

    New function is added to plugin 3.1 version (soon to be released) to check access to any forum.

    Milan

  • #2772

    Hi Milan,

    Thank you for your reply.

    There is a default template in bbpress – page-create-topic.php , If this template is default why it doesn’t hook? we want to protect this form, maybe you can create a conditional tag that we can hide different parts of the forum.

    Thank you

  • #2774

    Plugin hooks in the template parts loading, page-create-topic.php is not template part it is full template that loads ‘form-topic.php’ template, and my plugin hooks to that template part if you enable that in plugin settings from the Verification tab.

  • #2775

    Hi Milan,

    We have created a new static page with the page-create-topic.php template which loads the form-topic.php, though the “New Topic Form” option under the Verification tab is enabled the form on the front-end is still visible.

  • #2776

    There are two New Topic Form options, and the other one is for the topic form used outside of the forum (this topic form has forum selection field). If this is not the case, then the problem is with the templates you are using. If the templates loading is done outside of bbPress and some default and required filters and actions are missing, than my plugin will not work. My plugin depends on the exact structure and bbPress loading to work, if you have removed some elements from templates, I can’t help you. Best way to confirm, is to switch to TwentyFifteen or some other default WordPress themes and try it then. This will confirm that problem is with your theme.

    Milan

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom template for new topic’ is closed to new replies.