How can I insert zone ids into a custom theme?

I would like to use zone ids to change the text my heros using Marketo Real Time Personalization. the "Recognition is Personal" would have 1 ID, and "Create memorable experiences that inspire people to do great things" would have a separate Zone ID (they are different fields in the widget).

The homepage is

Ideally, I would like to be able to do this on all of the text on the other pages as well.

  • Patrick
    • Support Monkey

    Hi there @Cord

    Welcome to WPMU DEV, glad to have you aboard!

    According to the Marketo docs, you use the element IDs as the Zone IDs they need for the product to function.

    They have a nice doc available to help you find those element IDs:

    I just checked on your site and see that the elements you want to make dynamic with that plugin do not have any IDs assigned to them. So you would need to add a custom ID to each element yourself in your theme.

    The elements in question are the h1 and the p tags inside the homehero div container. That is likely coded in your theme's header.php file. Simply open that file in a text editor like Notepad++ and look for the homehero div element. Then give the h1 element an ID like so:
    <h1 id="whatever-you-like-here">
    ...and give the p element beneath it an ID also, like so:
    <p id ="something-else-unique-here">

    Then, according to their instructions, add those same IDs to the appropriate fields in their interface to identify the Zone IDs they require.

    I hope this helps! And thanks for being a member :slight_smile:

  • Cord
    • Design Lord, Child of Thor

    Hi Patrick,

    I am a beginner in wordpress so please be gentle! lol

    Attached is the file I think you are referring to, but I am not sure and wanted to confirm. If this is the correct file, please feel free to insert the Zone IDs!

    Let me know

  • Sajid
    • DEV MAN’s Sidekick

    Hi @Cord

    Hope you are doing good today :slight_smile:

    It looks like your file did not come through. You can't attach PHP files, however you can compress in .zip format and attached it here.

    Or you can also open up the file and copy its content here.

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Cord
    • Design Lord, Child of Thor

    * The header for our theme.
    * Displays all of the <head> section and everything up till <div id="content">
    * @package MCF
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <?php global $is_IE; if ( $is_IE ) : ?>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <?php endif; ?>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="profile" target="_blank" href="">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <link rel="icon" href="<?php bloginfo('stylesheet_directory'); ?>/images/favicon.ico" />

    <?php wp_head(); ?>

    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    <?php _e( 'Skip to content', 'mcf' ); ?>

    <header id="masthead" class="site-header" role="banner">

    <div class="wrap">

    <h1 class="site-title">" rel="home"><?php bloginfo( 'name' ); ?></h1>
    <nav id="site-navigation" class="main-navigation" role="navigation">
    <button class="js-menu-trigger sliding-panel-button" aria-controls="primary-menu" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Menu', 'mcf' ); ?></span></button>
    // Primary navigation
    wp_nav_menu( array(
    'theme_location' => 'primary',
    'menu_class' => 'menu nav-menu js-menu sliding-panel-content',
    'container' => false,
    'menu_id' => 'primary-menu',
    </nav><!-- #site-navigation -->

    <div class="js-menu-screen sliding-panel-fade-screen"></div>

    </div><!-- .wrap -->

    </header><!-- #masthead -->

    <div id="content" class="site-content">

  • Sajid
    • DEV MAN’s Sidekick

    Hi @Cord

    Hope you are doing good today :slight_smile:

    I am sorry but this is not the file from where that hero section is coming from. I need search and fix it on your website.

    Please send in FTP and WordPress admin login details, in following format. I will find and add zone id's for you.

    Subject: "Attn: Sajid Javed"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me :slight_smile:

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.