crazypatx
Forum Replies Created
-
I do have another question which is kind of linked to the same topic of shortcodes.
Calling [pmpro_login] works well to log in, also the redirect after logging in works well. But if a user is logged in and calls the /login/ URL manually, it is opening the [pmpro_login] site again.
Once done, the shortcode shows this weird Welcome page which shows the menu as a text tree.I want to change this logic, which somehow seems to be embedded within the shortcode. Is this where I need to use action hooks?
pmpro_logged_in_welcome_before_menu sounds like I could use this action hook and redirect the user manually back to another page when it is already logged in.
But that sounds a bit complicated for such a use-case. Am I on the wrong track?Thanks @gripgrip – this works!
I somehow thought that setting the snippet to “site wide footer” is replacing the “add_action” statement and automatically calling all the included functions.
but now adding the explicit function call everything works.Hi @gripgrip – thanks for your help!
I am not sure if I fully get your question.
Checking the index files source code, the JS is properly included (embedded in script /script section).I do not have any consent plugins and I also tried to delay the execution of the script within the JS function itself – this did not work either.
Thanks @kimwhite – this helps!
Another quick question: I thought that PMPro fully works with Elementor, but the PMPro blocks are not shown in the Elementor Editor. The only way to use PMPro is to embed the shortcodes.
Shortcodes are pretty tough to format and the pages do not look super appealing. What is your recommendation on how to tackle that with Elementor?
Forum: Fixing WordPress
In reply to: Subscribers logged out when switching pagesThank you! I just realized another pattern.
– all standard WP pages work well (like a blank home page etc)
– all pages with a block from PMpro work well
– all Elementor pages have problems.
Sometimes, doing a hard refresh in the browser (ctrl+F5) solves the issue and the logged in user is recognized. When changing to another page, sometimes it is again lost, sometimes it works.
It is super weird, because ultimately it works at some point in time on all pages, it is just super inconsistent and requires const Ctrl+F5 refreshes and changing pages dozens of times.
any other idea?Forum: Fixing WordPress
In reply to: Subscribers logged out when switching pagesBut isn’t the WP Toolbar part of WP core as well as user and role management?
if a user logs in via /wp-admin or /wp-login this is still standard, why is the login not effective on my plain home page?Forum: Plugins
In reply to: [Code Snippets] PHP snippet not recognized by ThemeI trimmed t down to this code, just to test if calling the function work (but it does not)
function mycustomphpfunction( $record, $handler ) {
$form_id = $record->get_form_settings( ‘form_id’ );
if ( $form_id !== ‘myformid’) {
return;
}
echo “<script> console.log(‘Custom PHP function was executed!’); </script>”;
}
add_action( ‘elementor_pro/forms/new_record’, ‘mycustomphpfunction’, 10, 2 );
- This reply was modified 1 year, 8 months ago by crazypatx.
Forum: Developing with WordPress
In reply to: Form with customized submit buttonThanks @threadi !
can you give me some further advice on what you mean by “via hook”?
I tried using WPforms and a form block from Astra. Both force entering an email to receive responses and I did not see a functionality to change the submit button logic.