So I have signed up with Constant Contact mail & newsletter and I am trying to add the universal code to activate the popup signup form I made and they normally require you to put their code in the footer.php, but on the Pro I want to add it to the functions.php file of my child theme correct?
I tried this:
[code]<?php
// Exit if accessed directly
if ( !defined( ‘ABSPATH’ ) ) exit;
// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED - Do not modify or remove comment markers above or below:
if ( !function_exists( ‘child_theme_configurator_css’ ) ):
function child_theme_configurator_css() {
wp_enqueue_style( ‘chld_thm_cfg_child’, trailingslashit( get_stylesheet_directory_uri() ) . ‘style.css’, array( ‘x-stack’,‘x-cranium-migration’,‘x-woocommerce’ ) );
}
endif;
add_action( ‘wp_enqueue_scripts’, ‘child_theme_configurator_css’ );
// Add Social Sharing after the single post content // =============================================================================
function x_add_social_sharing ( $content ) {
if ( is_single() ) {
echo do_shortcode(’[x_share title=“Share this Post” facebook=“true” twitter=“true” google_plus=“true” linkedin=“true” pinterest=“true” reddit=“true” email=“true”]’);
}
}
add_action(‘x_before_the_content_end’, ‘x_add_social_sharing’);
// END ENQUEUE PARENT ACTION
//
//
And also this:
[code]<?php
// Exit if accessed directly
if ( !defined( ‘ABSPATH’ ) ) exit;
// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED - Do not modify or remove comment markers above or below:
if ( !function_exists( ‘child_theme_configurator_css’ ) ):
function child_theme_configurator_css() {
wp_enqueue_style( ‘chld_thm_cfg_child’, trailingslashit( get_stylesheet_directory_uri() ) . ‘style.css’, array( ‘x-stack’,‘x-cranium-migration’,‘x-woocommerce’ ) );
}
endif;
add_action( ‘wp_enqueue_scripts’, ‘child_theme_configurator_css’ );
// Add Social Sharing after the single post content // =============================================================================
function x_add_social_sharing ( $content ) {
if ( is_single() ) {
echo do_shortcode(’[x_share title=“Share this Post” facebook=“true” twitter=“true” google_plus=“true” linkedin=“true” pinterest=“true” reddit=“true” email=“true”]’);
}
}
add_action(‘x_before_the_content_end’, ‘x_add_social_sharing’);
// END ENQUEUE PARENT ACTION[/code]
And both ways gave me the following error:
Your PHP code changes were rolled back due to an error on line 22 of file wp-content/themes/pro-child/functions.php. Please fix and try saving again.
syntax error, unexpected ‘<’, expecting end of file
So what am I doing wrong?
Thanks.