if ( ! defined( 'ABSPATH' ) ) { exit; }
function em_setup_theme(){
add_theme_support('title-tag');
add_theme_support('post-thumbnails');
register_nav_menus(array('primary' => __('Primary Menu','ericmartel')));
}
add_action('after_setup_theme', 'em_setup_theme');
function em_enqueue_assets(){
wp_enqueue_style('ericmartel-fonts', 'https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap', array(), null);
wp_enqueue_script('tailwind-cdn', 'https://cdn.tailwindcss.com', array(), null, false);
$config = "tailwind.config = { theme: { extend: { fontFamily: { sans: ['Inter','ui-sans-serif','system-ui'] }, colors: { brand: '#AF0608' } } } }";
wp_add_inline_script('tailwind-cdn', $config);
wp_enqueue_style('ericmartel-style', get_stylesheet_uri(), array(), wp_get_theme()->get('Version'));
}
add_action('wp_enqueue_scripts', 'em_enqueue_assets');
function em_year(){ return date('Y'); }
function em_beehiiv_embed_shortcode($atts){
$atts = shortcode_atts(array(
'src' => 'https://embeds.beehiiv.com/bb9a86bb-0ee0-441e-9845-76e8caa8127b',
'height' => '320'
), $atts, 'beehiiv_embed');
$src = esc_url($atts['src']);
$height = intval($atts['height']);
return '';
}
add_shortcode('beehiiv_embed', 'em_beehiiv_embed_shortcode');
function em_register_patterns(){
if ( ! function_exists('register_block_pattern') ) return;
if ( function_exists('register_block_pattern_category') ) {
register_block_pattern_category('ericmartel', array('label' => __('Eric Martel', 'ericmartel')));
}
register_block_pattern('ericmartel/hero', array(
'title' => __('Hero — Headline & CTAs', 'ericmartel'),
'categories' => array('ericmartel'),
'content' => '
Breaking Finance • Real Estate • Crypto
I break down policy, markets, and real estate so Gen X pros can protect cash flow and grow net worth—without the fluff.
As seen on: YouTube @ericmartelofficial • Break Away from the Rat Race
"Eric turns chaos into a plan of action."
— Subscriber
'
));
register_block_pattern('ericmartel/proofbar', array(
'title' => __('Proof Bar — Metrics', 'ericmartel'),
'categories' => array('ericmartel'),
'content' => '
Best‑Selling Book & Podcast
'
));
register_block_pattern('ericmartel/videos', array(
'title' => __('Latest Videos — 3 Cards', 'ericmartel'),
'categories' => array('ericmartel'),
'content' => '
'
));
register_block_pattern('ericmartel/companies', array(
'title' => __('Companies — 3 Tiles', 'ericmartel'),
'categories' => array('ericmartel'),
'content' => '
'
));
register_block_pattern('ericmartel/book', array(
'title' => __('Book CTA — Two Columns', 'ericmartel'),
'categories' => array('ericmartel'),
'content' => '
Stop Trading Your Time for Money
A practical playbook for the middle class to exit the rat race with reliable cash‑flowing assets. Updated with today’s realities.
'
));
register_block_pattern('ericmartel/speaking', array(
'title' => __('Speaking & Workshops', 'ericmartel'),
'categories' => array('ericmartel'),
'content' => '
Speaking & Workshops
Book Eric for keynotes and private workshops on passive income, market mechanics, and investor psychology. No rah‑rah, just data and action.
- • Breaking News Briefing for Exec Teams
- • Passive Multifamily 101 (for CPA firms & RIAs)
- • Start‑to‑Deal: Launch your RE business
Request Availability
Media Kit
Bio, headshots, logos, brand colors, and intro script.
Download →
'
));
register_block_pattern('ericmartel/subscribe', array(
'title' => __('Subscribe — Beehiiv Embed', 'ericmartel'),
'categories' => array('ericmartel'),
'content' => '
Get the 3‑Minute Market Brief
No spam. Just signals that matter for your portfolio and real estate moves.
[beehiiv_embed]
'
));
}
add_action('init', 'em_register_patterns');
Book Giveaway
[vc_row full_width=”stretch_row_content_no_spaces” css=”.vc_custom_1612897135013{background-color: #ffffff !important;}”][vc_column width=”1/6″][/vc_column][vc_column width=”1/6″][vc_single_image image=”411″ img_size=”full” alignment=”right”][/vc_column][vc_column width=”2/3″][vc_column_text][vc_raw_html]JTVCcmFmZmxlcHJlc3MlMjBpZCUzRCUyMjElMjIlNUQ=[/vc_raw_html][/vc_column_text][/vc_column][/vc_row]