07/15/2016 at 10:08 am
#382930
Keymaster
@ Robert
re: If we can put a “Contact Us” link on the listing, that would be great.
Install the Code Snippets plugin.
Add a new snippet with the following code:
add_filter( 'cn_output_email_addresses', 'cn_contact_email_contact_link', 11, 4 );
function cn_contact_email_contact_link( $block, $addresses, $entry, $atts ) {
if ( $addresses ) {
if ( ! cnQuery::getVar( 'cn-entry-slug' ) ) {
$name = $entry->getName( array( 'format' => '%first%' ) );
$permalink = $entry->getPermalink() . '#cnct-email-' . $entry->getSlug();
$row = '<span class="email-address"><a class="value" title="Email ' . $name . '" href="' . $permalink . '">Contact Us</a></span>';
$block = '<span class="email-address-block">' . PHP_EOL . $row . PHP_EOL . '</span>';
}
}
return $block;
}
Save and Activate the snippet choosing the “Only run on site front-end” option.
This will add a “Contact Us” link on the results list page.
re: can I change the header from “Email entry” to “Request Free Information”?
Yes this can be done. Install the Say What plugin.
Add a new text change using the following settings:
Original string: Email Entry
Text domain: connections_contact
New string: Request Free Information
Capitalization matters, so make sure to use the exact strings. That should do it.
Hope that helps!
