cbush57
Forum Replies Created
-
I see the code to override the lead_source, but how do you apply the filter to override a custom field? We have a custom field called Details. How can I use filters to target that field? From the docs I only see:
// Alter Lead Source add_filter( 'salesforce_w2l_lead_source', 'salesforce_w2l_lead_source_example', 10, 2 ); function salesforce_w2l_lead_source_example( $lead_source, $form_id ){ if( $form_id == 1 ) return 'Example Lead Source for Form #1 on page id #'.get_the_id(); return $lead_source; }
Forum: Themes and Templates
In reply to: [Yoko] Remove entry details in search resultsThanks worthingtech!! This is exactly what I was looking for too.
Forum: Plugins
In reply to: [Widget Logic] Upgrade Error: in_array() expects parameter 2 to be arrayThis really helped me today too! Just all of a sudden one of my client’s sites broke with this error. I just had to check for the array first:
$whichPage = get_field(‘which_page?’);
if( ($whichPage) && in_array(….Thanks everyone!!
Forum: Fixing WordPress
In reply to: Custom MySQL and Related Tables QuestionSure thing.
Basically we have a product shelf that members can add stuff to. When a product is added to a member’s shelf, it shows on their personal shelf, but also on the public community shelf.
The issue is that when a member adds a product, it is stamped with a publish date and shows appropriately on their shelf according to the order they added it. However if a second member adds that same product, then the publish date gets renewed and it changes the order of the first members shelf.
What we want to do, is basically have an additional field attached to a product that is a member specific sequence number. The problem is that right now, since the shelf shares the same data as the community shelf, every member’s sequence code gets added as a value under the “Sequence” field. For example, a “Book 1” can have a member sequence value of “123_01, 143_14, 154_02, etc” where the first part of that number is the member id “123_” and the second part is the sequence to appear on their personal shelves. We can use PHP to separate out the values, then populate all the data back into an array, sort, then return it in a new order, but that seems likes a work around and not a long term solution. Ideally we want to create another simple table that would store and relate the sequence information. We done that on other databases we’ve built from scratch, but not with WordPress. I hope that helps.
Thanks.