• Buca

    (@sharfeddin)


    I’m trying to modify a ThemeTrust theme, and I understand that this snippet utilizes a metabox framework of some sort, but for anyone who actually understands php I was wondering if there and obvious reason why my Project Header Image isn’t rendering on the front end?

    functions.php

    $config = array(
        'id' => 'project_options',
        'title' => 'Project Options',
        'prefix' => $prefix."project_",
        'postType' => array('project'),
        'context' => 'side',
        'priority' => 'default',
        'usage' => 'theme',
        'showInColumns' => false
    );
    
    $project_header_meta_box = new mrMetaBox($config);
    
    $project_header_meta_box->addField(array(
    	'type' => 'Image',
    	'id' => '_header',
    	'label' => __('Project Header: ','themetrust'),
    	'attachToPost' => true 
    
    ));

    Project-single.php

    <?php  $project_header = wp_get_attachment_image_src(get_post_meta($post->ID, "_ttrust_project_header", true), 'full'); ?>
    
            <img align="center" src="<?php  $project_header ?>" height="auto"  alt=""/>

    Thanks for your time.

  • The topic ‘Custome Metabox Issue’ is closed to new replies.