I created a custom registration page and login page using WPforms. I am trying to figure out how to use it though. I have embed it and I can see it in my pages. Where can I find the default login and register pages so I can replace them?
It’s possible, but this would require code customizations, because login/registration form are also embedded into the modal windows on every page. Let me know if you’re familiar with WordPress code customizations and I’ll post some guidance, hope this helps.
I am. That would be very helpful
It’s possible if you add code snippets for the hivepress/v1/templates/site_footer
filter hook. Please try to var_dump
the argument the callback function accepts, it’s an array of blocks and 2 of these blocks are login and registration forms, you can override them by the block names (sample snippets Search · user:hivepress hivepress/v1/templates · GitHub) with blocks of content
type and content
parameter that accepts HTML code. This way you can replace default forms.
Also, the login form appears on a page (e.g. if someone clicks Add Listing without being logged in), you can override this page without code snippets in HivePress/Templates section.
i partially understand, i have this so far but i am lost on how to have the current registration point to the new wpform one we have.
<?php
add_filter(
'hivepress/v1/templates/site_footer',
function( $template ) {
return hivepress()->helper->merge_trees(
$template,
[
'blocks' => [
'user_register_modal' => [
'blocks' => [
'new_registration_form' => [
'type' => 'content',
'content' => 'how do i point to the form?'
],
],
],
],
]
);
}
);
If this snippet already works and adds the “how do i point to the form?” text to the modal, please use this “content” parameter for rendering the form, e.g. if this form has a shortcode you can try this:
<?php
add_filter(
'hivepress/v1/templates/site_footer',
function( $template ) {
return hivepress()->helper->merge_trees(
$template,
[
'blocks' => [
'user_register_modal' => [
'blocks' => [
'new_registration_form' => [
'type' => 'content',
'content' => do_shortcode('[form_shortcode_here]'),
],
],
],
],
]
);
}
);
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.