darnoldy
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Trying to hook into comment_post—fail!Okay… it working now! Thank you for your help and your patience!
–don
Forum: Developing with WordPress
In reply to: Trying to hook into comment_post—fail!Yeh, It is Business Directory plugin, and I had thought that I’d get more of a resonse that a copy paste from their “We don’t support” page.
On the other hand, based on learning about variable dumps from threadi, I did some bear-poking. I managed to use “get_post_meta()” to see all of the meta tags foe the post. I found:
["_wpbdp[fields][7]"]=> array(1) { [0]=> string(21) "[email protected]" }
Which seems to be what I am looking for—I think I’m close, However, when I use:
$meta_value = get_post_meta($post_id,'_wpbdp[fields][7]'.true);
it returns “array(0) { }” instead of the string. Is there an “asString” command I should use?
Forum: Developing with WordPress
In reply to: Trying to hook into comment_post—fail!It seems to me that this should be easier than it is turning out to be!
I contacted Business Directory support (who has always been pretty helpful) and they replied that they don’t give coding help, and provided a list of a few developers that I could hire to do it for me.
I also looked through their docs, and found an api call, wpbdp_get_form_field(ID) that looked promising. So I tried:
$meta_value = wpbdp_get_form_field( 7 );
// Get the post details
var_dump($meta_value);
exit;and got:
object(WPBDP_Form_Field)#2521 (14) { ["id":"WPBDP_Form_Field":private]=> int(7) ["type":"WPBDP_Form_Field":private]=> object(WPBDP_FieldTypes_TextField)#1286 (1) { ["name":"WPBDP_Form_Field_Type":private]=> string(9) "Textfield" } ["association":"WPBDP_Form_Field":private]=> string(4) "meta" ["shortname":"WPBDP_Form_Field":private]=> string(13) "contact_email" ["label":"WPBDP_Form_Field":private]=> string(13) "contact_email" ["description":"WPBDP_Form_Field":private]=> string(0) "" ["tag":"WPBDP_Form_Field":private]=> string(5) "email" ["weight":"WPBDP_Form_Field":private]=> int(31) ["validators":"WPBDP_Form_Field":private]=> array(1) { [0]=> string(5) "email" } ["display_flags":"WPBDP_Form_Field":private]=> array(1) { [0]=> string(10) "fieldlabel" } ["field_data":"WPBDP_Form_Field":private]=> array(3) { ["icon"]=> string(37) "dashicons|dashicons dashicons-archive" ["word_count"]=> int(0) ["supported_categories"]=> string(3) "all" } ["css_classes"]=> array(0) { } ["html_attributes"]=> array(0) { } ["validation_errors":"WPBDP_Form_Field":private]=> array(0) { } }
Which I sorta think I understand…but it occurs to me that this function doesn’t specify which post to get the info from—is that because its designed to be used within a loop?
I also tried:
$meta_value = $post->wpbdp_get_form_field( 7 );
That just gave a fatal error!
Any advice would be very welcome!!
Forum: Developing with WordPress
In reply to: Trying to hook into comment_post—fail!@threadi —well…. that was instructive! It seems that ‘contact_email’ is not a meta field (nor are any of the other custom fields in the post)!
After some research, I tried:
$meta_value = get_post_custom_values('contact_email', $post_id);
which returned NULL. I guess I need to go have a conversation with the support folks at the plugin I’m using to create the posts!
Thanks for your help–I’ll report back when I get this solved.
–don
Forum: Developing with WordPress
In reply to: Trying to hook into comment_post—fail!@threadi —Thanks for that! I should have caught those myself (Guess my eyes are getting old).
The script can now be activated, and it sends mail. —That’s the good news.
However, it always sends the mail to the admin email address. Either I’m getting the meta value incorrectly, or there’s an error in the if statement! I’ll have to work on that.
@bcworkz — Thanks for that! while I’m testing, I am sending the mail to an address with spam filtering turned off.
Forum: Plugins
In reply to: [The Events Calendar] Trying to modify Event List Widget DisplayGeorge-
Thanks for the reply.
Knowing that what I want to do is possible does help; as does the themers’ guide link.I have found the proper template to modify. Part of the issue is that I was looking for variables
$theTitle
while you seem to use functionsthe_title()
What would really be helpful is a list of the functions and what they return—maybe that’s already in your knowledgebase and I have missed it. As an example,
tribe_get_start_date()
returns not only the start date, but also the start time.Thanks again for your help!
Forum: Themes and Templates
In reply to: Show/hide element scripting problemSuch a silly mistake!
Thank you for your help… the script now works as expected.
Forum: Themes and Templates
In reply to: Show/hide element scripting problemSure…
You can look at this page:
https://arnoldy.us/SWWA/events/
You will need to reduce the width of the viewport to small tablet or wide phone width to see it the collapse.Thank you for your help.
–don