This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Case: related news | |
* | |
* At first query for posts of same category, then, if it doesn't find enough posts, query for other posts and merge the 2 results. | |
* | |
* Put the following code inside a single template. | |
* | |
* @link Inspired by http://wordpress.stackexchange.com/questions/71576/combining-queries-with-different-arguments-per-post-type#answer-71582 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_easymail_add_subscriber ( $cf7 ) { | |
$submission = WPCF7_Submission::get_instance(); | |
$data = $submission->get_posted_data(); | |
$fields['email'] = $data["your-email"]; | |
$fields['name'] = $data["your-name"]; | |
if ( function_exists ('alo_em_add_subscriber') && is_email( $fields['email'] ) ) | |
{ | |
alo_em_add_subscriber( $fields, 1, alo_em_get_language(true) ); |
OlderNewer