Digital experiences for all disciplines
Forum Replies Created
-
-
March 27, 2015 at 10:37 am in reply to: Blog Carousel Problem on mobile after neighborhood update v2 #161349This reply has been marked as private.March 26, 2015 at 10:56 am in reply to: Blog Carousel Problem on mobile after neighborhood update v2 #161010This reply has been marked as private.March 26, 2015 at 10:55 am in reply to: Blog Carousel Problem on mobile after neighborhood update v2 #161007
here’s the example.
Attachments:
You must be logged in to view attached files.March 26, 2015 at 10:51 am in reply to: Blog Carousel Problem on mobile after neighborhood update v2 #161004This reply has been marked as private.March 26, 2015 at 9:23 am in reply to: Blog Carousel Problem on mobile after neighborhood update v2 #160953October 1, 2014 at 9:01 am in reply to: Contact form 7 – not receiving messages (DMARC Policies) Gmail & Yahoo #116235October 1, 2014 at 9:01 am in reply to: Contact form 7 – not receiving messages (DMARC Policies) Gmail & Yahoo #116233would this be the right approach? I know making a plugin would take so much if i want it robust, but this is very specific and selective.
Thank, you so. I already went and did the following.
here’s the code
<?php // Opening PHP tag – nothing should be before this, not even whitespace
/*
Plugin Name: mymail-contact
Plugin URI: crestviewphotography.com
Description: Mymail
Author: Jasper
Author URI: http://net.tutsplus.com
Version: 1.0
/*
/*
* requires a checkbox with the the name “newsletter” in your CF7
*/
function wpcf7_my_validate( $result, $tag ) {
$type = $tag[‘type’];
$name = $tag[‘name’];if ( ‘newsletter’ == $name ) {
$subscribe = isset($_POST[$name]);
if(function_exists(‘mymail’) && $subscribe){
$userdata = array(
’email’ => $_POST[’email’],
‘firstname’ => $_POST[‘firstname’],
‘lastname’ => $_POST[‘lastname’],
);
$list_ids = array(123, 456); // your list ids
$overwrite = true;
$subscriber_id = mymail(‘subscribers’)->add($userdata, $overwrite);
if(!is_wp_error($subscriber_id)){
mymail(‘subscribers’)->assign_lists($subscriber_id, $list_ids);
}
}
}return $result;
}
add_filter( ‘wpcf7_validate_checkbox’, ‘wpcf7_my_validate’, 10, 2 );function getRefererPage( $form_tag )
{
if ( $form_tag[‘name’] == ‘referer-page’ ) {
$form_tag[‘values’][] = $_SERVER[‘HTTP_REFERER’];
}
return $form_tag;
}
if ( !is_admin() ) {
add_filter( ‘wpcf7_form_tag’, ‘getRefererPage’ );
}the problem i have is identifying what are the elements into the code. for example, what are those values the codes i bold. I’ve attach the codes i have. I need a little direction here.
Attachments:
You must be logged in to view attached files.BTW, can the Mymail snippet can be converted as a plugin? instead of making the child theme? my theme breaks when i activate the child theme.
My child theme is not functioning right….
http://s28.postimg.org/79n5et6x9/child_theme_is_not_functioning_right.pngCSS STYLE FILE I PUT
/* LICENSE & DETAILS
==================================================
Theme Name: Neighborhood
Theme URI: http://neighborhood.swiftideas.net
Description: A Retina Responsive Multi-Purpose WordPress Theme – Designed & Developed by Swift Ideas ( http://www.swiftideas.net )
License: GNU General Public License version 3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Version: 1.93
Author: Swift Ideas
Author URI: http://www.swiftideas.net
Template: neighborhood
All files, unless otherwise stated, are released under the GNU General Public License
version 3.0 (http://www.gnu.org/licenses/gpl-3.0.html)
==================================================
*/
@import url(“../neignborhood/style.css”);
SCRATCH EVERYTHING! I finally know how to make a child theme. I am now procedding to “Please insert this code at functions.php of child theme” What should the functions.php hold?
This is what i input
<?php // Opening PHP tag – nothing should be before this, not even whitespace
/*
* requires a checkbox with the the name “newsletter” in your CF7
*/
function wpcf7_my_validate( $result, $tag ) {
$type = $tag[‘type’];
$name = $tag[‘name’];if ( ‘newsletter’ == $name ) {
$subscribe = isset($_POST[$name]);
if(function_exists(‘mymail’) && $subscribe){
$userdata = array(
’email’ => $_POST[’email’],
‘firstname’ => $_POST[‘firstname’],
‘lastname’ => $_POST[‘lastname’],
);
$list_ids = array(123, 456); // your list ids
$overwrite = true;
$subscriber_id = mymail(‘subscribers’)->add($userdata, $overwrite);
if(!is_wp_error($subscriber_id)){
mymail(‘subscribers’)->assign_lists($subscriber_id, $list_ids);
}
}
}return $result;
}
add_filter( ‘wpcf7_validate_checkbox’, ‘wpcf7_my_validate’, 10, 2 );function getRefererPage( $form_tag )
{
if ( $form_tag[‘name’] == ‘referer-page’ ) {
$form_tag[‘values’][] = $_SERVER[‘HTTP_REFERER’];
}
return $form_tag;
}
if ( !is_admin() ) {
add_filter( ‘wpcf7_form_tag’, ‘getRefererPage’ );
}Im slowly progressing. Thanks. i just need to figure this code out.
would this be the right approach.http://www.youtube.com/watch?v=Za5YAUMqWvo or here the direction i followed http://www.gregreindel.com/wordpress-custom-functions-file/
this is the procedure i done.
1. Create a folder within your child theme named “lib”
2. Within the new “lib” folder, create a file named “my_functions.php”<?php
/**
* My Custom Functions
*/Save.
3. Paste this code in your themes current functions.php file
// Add My Custom Functions File
include_once( get_stylesheet_directory() . ‘/lib/my_functions.php’ );Save.
4. I added the this int my_functions.php* requires a checkbox with the the name “newsletter” in your CF7
*/
function wpcf7_my_validate( $result, $tag ) {
$type = $tag[‘type’];
$name = $tag[‘name’];if ( ‘newsletter’ == $name ) {
$subscribe = isset($_POST[$name]);if(function_exists(‘mymail’) && $subscribe){
$userdata = array(
‘email’ => $_POST[’email’],
‘firstname’ => $_POST[‘firstname’],
‘lastname’ => $_POST[‘lastname’],
);
$list_ids = array(123, 456); // your list ids
$overwrite = true;
$subscriber_id = mymail(‘subscribers’)->add($userdata, $overwrite);
if(!is_wp_error($subscriber_id)){
mymail(‘subscribers’)->assign_lists($subscriber_id, $list_ids);
}
}
}return $result;
}
add_filter( ‘wpcf7_validate_checkbox’, ‘wpcf7_my_validate’, 10, 2 );would this be correct? i put this under neighborhood. i don’t know whats a child theme.
This reply has been marked as private.September 26, 2014 at 10:56 am in reply to: Blog Gallery – masonry support, request feature. #114842That method would take hours. I have photos inserted into the blog. Would it support the feature. Here’s an example.
-