juanshaf
Forum Replies Created
-
Thanks for the reply 🙂
What I’m wanting to do is make some curl requests to 3rd party API at runtime to collect the location and detect language from the submitted contact request body, and perform some other tasks when the user submits the form.
Is it possible to use WordPress add_action or add_filter function to hook when the contact form is submitted?
Something like: https://developer.wordpress.org/plugins/hooks/custom-hooks/
Would be awesome.
Thanks,
John.
Forum: Themes and Templates
In reply to: [Neve] Mobile submenu not showing when tapping down arrowSure, it’s https://agencyleeds.com/
Forum: Plugins
In reply to: [Polylang] Unable to modify linked category parentThanks for the reply, I’m using the latest version (2.5)
I am already using echo aol_features() and echo aol_form() in my single-aol_ad.php, that’s not the problem. I already read the documentation 🙂
The code I posted previously is an issue with the if statement in your plugin code, not my single-aol_ad.php.
If you inspect the code at line 287 in apply-online/public/class-applyonline-public.php you’ll see the if statement above this line is where $new_content is defined, only if the template is not single-aol_ad.php.
Then the apply_filter call outside the if enclosure is attempting to use the variable while the conditions were not met, therefore it is undefined when a single-aol_ad.php template is used.
All you need to do is replace the code at the bottom of apply-online/public/class-applyonline-public.php with the fix I provided above. If you look at line 287 and the if statement above the line, you’ll see what I mean.
Thanks.
I tried your suggestion and deactivated and deleted the plugin. I reinstalled the plugin via the Plugins->Add New, and the problem continues to exist.
I should point out that I’m using custom single-aol_ad.php and archive-aol_ad.php templates.
Changing this:
//Show this content if you are viewing aol_ad post type using single.php (not with single-aold_ad.php) if(is_singular() and 'single-aol_ad.php' != wp_basename($template)): $new_content = '<div class="aol-single-ad">'.$content.$title_features.$features.$title_form.$form.'</div>'; endif; return apply_filters( 'aol_content', $content, $features, $form );To This:
//Show this content if you are viewing aol_ad post type using single.php (not with single-aold_ad.php) if(is_singular() and 'single-aol_ad.php' != wp_basename($template)): $new_content = '<div class="aol-single-ad">'.$content.$title_features.$features.$title_form.$form.'</div>'; return apply_filters( 'aol_content', $new_content, $content, $features, $form ); endif; return apply_filters( 'aol_content', $content, $features, $form );At the bottom of class-applyonline-public.php fixed my issue as
$new_contentis undefined for me due to thewp_basename($template)condition.Yes the development version is working great with no errors, thanks for the speedy fix.
On a side note, would it be possible for you to add an aol class name to the shortcode elements?
Eg.
<div class="panel panel-default">could maybe do with
aol-paneladding in there too as it’s not as generic as just panel and can be used to identify the plugin components specifically while customizing styles.I have 15-20 custom fields,
I go to CRM->New Person,
I complete all relevant fields,
I go to CRM->All People,
I click on the person I just added (to edit the person)
No fields are visible including Display Name and Email Address.I’m not sure when/why this started happening but I don’t think I’ve done anything to provoke it.
Chrome shows no errors in console, all I get is the errors from WordPress debug.log in the post above.