• Resolved syncbox

    (@syncbox)


    I’m trying to use the c2c get_custom() plugin to add keyword and description meta day on a per page basis to a site.

    I’m using this code:

    <meta name="description" content="<?php echo c2c_get_custom('mdesc'); ?>" />
    
    <meta name="keywords" content="<?php echo c2c_get_custom('mkey'); ?>" />

    and I’ve tried putting the html construct into the params, like:

    <?php echo c2c_get_custom('mdesc', '<meta name="description" content="', '" />', '', ''); ?>
    <?php echo c2c_get_custom('mkey', '<meta name="keywords" content="', '" />', '', ''); ?>

    but neither work. All I get is the meta tag, attribute and =”” /> so empty content. I did enter some test data on a page where I am testing, so the data actually exists.

    Any ideas, anyone? I posted this on the plugin author’s page, but have not heard anything yet… I need to get this working, so any input is greatly appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter syncbox

    (@syncbox)

    just a follow-up as I have resolved this on my own…

    the c2c function has to be AFTER the wp_head() function call in the header.php file for it to work.

    I didn’t find that documented anywhere but stumbled onto it in desperate attempts to get this to work! ??

    Thanks for sharing. Kept me from trial and error… ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘c2c_get_custom plugin meta fields question in head’ is closed to new replies.