Comaris GbR
Forum Replies Created
-
Forum: Plugins
In reply to: [Personio Integration Light] Changing Meta Title and Description of job pagesHi, thanks for your quick response, this answers the question!
Excellent, thank you!
Hi again,
thank you for helping out. We are using the pro version on a customer site, but configuring the URL structure does not ignore the individual structure. In our case:
WP individual URL structure: https://domain.tld/blog/%postname%/
Personio URL slug: career/jobs
Result: https://domain.tld/blog/career/jobs/
Goal: https://domain.tld/career/jobs/For the moment I wrote this script to manually set the “with_front” argument of the “personiopositions” cpt to “false”:
// Sets with_front argument for CPT "personioposition" to "false"
add_action('init', function() {
if (post_type_exists('personioposition')) {
$args = get_post_type_object('personioposition');
if ($args) {
$args->rewrite['with_front'] = false;
register_post_type('personioposition', (array) $args);
// ONLY ONCE: Flush rewrite rules to apply changes
// flush_rewrite_rules(false);
}
}
}, 20);This does work for the moment, although I don’t know if this can cause other internal problems and how reliable this is in terms of plugin updates. Is there a better solution for this?
Excellent, thank you very much!
I removed the two validation functions and added my own one with custom conditions for certain field names. Works like a charm!
For anyone interested, find the code for the functions.php below:
// Removing the default validation rules for text fields and textareas in Contact Form 7 remove_action('wpcf7_swv_create_schema', 'wpcf7_swv_add_text_rules', 10); remove_action('wpcf7_swv_create_schema', 'wpcf7_swv_add_textarea_rules', 10); // Adding the customized validation rules for text fields and textareas in Contact Form 7 add_action( 'wpcf7_swv_create_schema', function ( $schema, $contact_form ) { // Transfer of the existing fields in the form $tags = $contact_form->scan_form_tags(); foreach ( $tags as $tag ) { // Initialize the standard error message $error_message = wpcf7_get_message( 'invalid_required' ); // Customize the error messages for certain fields if ( $tag->is_required() ) { if ($tag->name == 'your-name') { $error_message = 'Please enter your name.'; } elseif ($tag->name == 'your-email') { $error_message = 'Please enter your e-mail address.'; } elseif ($tag->name == 'your-message' && $tag->basetype == 'textarea') { $error_message = 'Please let us know how we can help you.'; } // Adding the rule $schema->add_rule( wpcf7_swv_create_rule( 'required', array( 'field' => $tag->name, 'error' => $error_message, ) ) ); } // Continue to use the original validation rules for e-mail, URL, telephone, min/max length if ( 'email' === $tag->basetype && $tag->is_required() ) { $schema->add_rule( wpcf7_swv_create_rule( 'email', array( 'field' => $tag->name, 'error' => wpcf7_get_message( 'invalid_email' ), ) ) ); } if ( 'url' === $tag->basetype && $tag->is_required() ) { $schema->add_rule( wpcf7_swv_create_rule( 'url', array( 'field' => $tag->name, 'error' => wpcf7_get_message( 'invalid_url' ), ) ) ); } if ( 'tel' === $tag->basetype && $tag->is_required() ) { $schema->add_rule( wpcf7_swv_create_rule( 'tel', array( 'field' => $tag->name, 'error' => wpcf7_get_message( 'invalid_tel' ), ) ) ); } if ($minlength = $tag->get_minlength_option()) { $schema->add_rule( wpcf7_swv_create_rule( 'minlength', array( 'field' => $tag->name, 'threshold' => absint($minlength), 'error' => wpcf7_get_message('invalid_too_short'), ) ) ); } if ($maxlength = $tag->get_maxlength_option()) { $schema->add_rule( wpcf7_swv_create_rule( 'maxlength', array( 'field' => $tag->name, 'threshold' => absint($maxlength), 'error' => wpcf7_get_message('invalid_too_long'), ) ) ); } } }, 10, 2 );Hi again @shresthauzwal,
nevermind, the workaround is almost perfect. I didnt notice that link and token are seperate shortcodes. I just replaced the {{ur_login}} with with the desired link and everything works as it should.
Thanks for your help!
Best regards, Felix
Hi @shresthauzwal ,
unfortunately, this workaround doesn’t work. Setting the page private removes the banner but when using “auto approval after email confirmation”, a newly registered user will land on a 404 page after clicking on the email confirmation link.
This is because the link of the {{ur_login}} shortcode contains the selected page, which, in this case, is private.
We are using Tutor LMS and selected the “Tutor LMS Dashboard Page” as “My Account Page” which works perfectly fine.
Currently we either leave it as is and ignore the message or we use your workaround and change the link in the {{ur_login}} shortcode. I don’t think either solution is ideal.
Best regards, Felix
I think you might have misunderstood my issue, here a quick summary of the current situation:
We use your plugin only for user registration purposes. We do not need the “My Account Page” so we don’t use the shortcode. Now we get the notification saying we forgot to set the “My Account Page” which is absolutely correct because we do not need it. My goal is to disable the notification. Is there a way to do that?10/10 perfect, thank you
Hi @shresthauzwal,
we use the user registrationg plugin only for registration purposes, without the default “My Account” Page. We selected the Dashboard of another plugin in the general settings. Works perfect, but now we get the same message mentioned at the top, because on the selected page is no [user_registration_my_account] shortcode? Is there a way to filter the message?
Best regards, Felix
For us it seems to be fixed as well, big props @simplyscheduleappointments !
Thanks for the help.
Disabling the plugin fixes the jumping.
To add to the post of @nicmuc1, we also use an advanced shortcode but only using [ssa_booking] doesn’t fix the problem. Our shotcode is: [ssa_booking type=terminwunsch ssa_locale=”de_DE_formal”]
We also tried embedding the form as a Divi-Builder widget, with same results. We use the shortcode instead of the widget since there’s no way to select the language pack in the widget.
As requested we will reach out to the support directly.