Example #1
0
 /**
  * Output for Shortcode
  *
  * @since 1.1.9
  *
  * @param $atts
  *
  * @return mixed|null
  */
 function shortcode_output($atts)
 {
     $default_atts = array('key' => '', 'field' => '', 'job_id' => get_the_ID());
     $merged_atts = array_merge($default_atts, $atts);
     try {
         // Attributes
         $args = shortcode_atts($merged_atts, $atts, 'jmfe');
         if (empty($args['key']) && empty($args['field'])) {
             throw new Exception(__('Meta Key was not specified!', 'wp-job-manager-field-editor'));
         }
         if (empty($args['job_id'])) {
             throw new Exception(__('Unable to determine correct job/resume/post ID!', 'wp-job-manager-field-editor'));
         }
         if ($args['key']) {
             $meta_key = $args['key'];
         }
         if ($args['field']) {
             $meta_key = $args['field'];
         }
         $post_meta = get_custom_field($meta_key, $args['job_id'], $args);
         if (is_array($post_meta)) {
             $post_meta = implode(', ', $post_meta);
         }
         return $post_meta;
     } catch (Exception $error) {
         error_log('Shortcode output error: ' . $error->getMessage());
     }
 }
    function widget($args, $instance)
    {
        extract($args);
        echo $before_widget;
        echo $before_title . 'Active Projects' . $after_title;
        $order = array('Dev', 'Maintenance', 'Edit', 'Design', 'Dev Complete', 'Project Complete');
        echo '<ol>';
        foreach ($order as $order_item) {
            global $prefix;
            $args = array('category_name' => 'active-project', 'posts_per_page' => '-1', 'meta_query' => array(array('key' => $prefix . 'project_status', 'value' => $order_item)));
            $active = new WP_Query($args);
            global $prefix;
            $prefix = '_crm_';
            while ($active->have_posts()) {
                $active->the_post();
                global $post;
                $project_name = get_custom_field($prefix . 'project_name');
                if (!empty($project_name)) {
                    $name = $project_name . ' (' . get_the_title() . ')';
                } else {
                    $name = get_the_title();
                }
                ?>
				<li><a href="<?php 
                the_permalink();
                ?>
"><?php 
                echo $name;
                ?>
</a> <?php 
                edit_post_link('Edit', '(', ')');
                ?>
<br /> 
				<?php 
                $status_summary = get_custom_field($prefix . 'status_summary');
                $status = get_custom_field($prefix . 'project_status');
                if (!empty($status)) {
                    echo '<strong>Status:</strong> ' . $status;
                }
                if (!empty($status_summary)) {
                    echo ' | ' . $status_summary;
                }
                if (!empty($status) || !empty($status_summary)) {
                    echo '<br />';
                }
                $started = get_custom_field($prefix . 'start_date');
                if ($started) {
                    echo '<strong>Started:</strong> ' . date('F j, Y', strtotime($started)) . ',';
                }
                $revenue = get_custom_field($prefix . 'revenue');
                $expense = get_custom_field($prefix . 'expense');
                if ($revenue) {
                    echo 'Budget: $' . number_format($revenue - $expense) . '</li>';
                }
            }
        }
        echo '</ol>';
        wp_reset_query();
        echo $after_widget;
    }
function be_complete_loop()
{
    do_action('genesis_before_post_title');
    do_action('genesis_post_title');
    do_action('genesis_after_post_title');
    global $prefix;
    $args = array('category_name' => 'complete', 'posts_per_page' => '20', 'meta_query' => array(array('key' => $prefix . 'include_complete')));
    $complete = new WP_Query($args);
    setlocale(LC_MONETARY, 'en_US');
    $loop_counter = 0;
    while ($complete->have_posts()) {
        $complete->the_post();
        $revenue = get_custom_field($prefix . 'revenue');
        $expense = get_custom_field($prefix . 'expense');
        $profit = $revenue - $expense;
        $time = get_custom_field($prefix . 'time_setup') + get_custom_field($prefix . 'time_development') + get_custom_field($prefix . 'time_phone') + get_custom_field($prefix . 'time_hourly') + get_custom_field($prefix . 'time_other');
        if ($time) {
            $rate = money_format('%(#10n', $profit / $time);
        }
        if (!empty($revenue)) {
            $revenue = money_format('%(#10n', $revenue);
        }
        if (!empty($expense)) {
            $expense = money_format('%(#10n', $expense);
        }
        if (!empty($profit)) {
            $profit = money_format('%(#10n', $profit);
        }
        if ($loop_counter % 3 == 0) {
            echo '<div class="first project">';
        } else {
            echo '<div class="project">';
        }
        echo '<h3><a href="' . get_edit_post_link() . '">' . be_get_project_name() . '</a></h3>';
        echo '<p>';
        if ($revenue) {
            echo '<strong>Budget</strong>: ' . $revenue;
            if ($expense) {
                echo ' - ' . $expense . ' = ' . $profit;
            }
            echo '<br />';
        }
        if ($time) {
            echo '<strong>Time Spent:</strong> ' . $time . ' hrs <br /><strong>Effective rate:</strong> ' . $rate . ' /hr<br />';
        }
        echo '</p>';
        echo '</div>';
        $loop_counter++;
    }
}
    function widget($args, $instance)
    {
        extract($args);
        echo $before_widget;
        echo $before_title . 'Active Projects' . $after_title;
        $active = new WP_Query('category_name=active-project&posts_per_page=-1&showposts=-1');
        $count = 0;
        global $prefix;
        if ($active->have_posts()) {
            echo '<ol>';
            while ($active->have_posts()) {
                $active->the_post();
                global $post;
                $count++;
                ?>
				<li><a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a> <?php 
                edit_post_link('Edit', '(', ')');
                ?>
<br /> 
				<?php 
                $status = get_custom_field($prefix . 'status_summary');
                if ($status) {
                    echo '<strong>Status:</strong> ' . $status . '<br />';
                }
                $started = get_custom_field($prefix . 'start_date');
                if ($started) {
                    echo '<strong>Started:</strong> ' . date('F j, Y', strtotime($started)) . '<br />';
                }
                $revenue = get_custom_field($prefix . 'revenue');
                $expense = get_custom_field($prefix . 'expense');
                if ($revenue) {
                    echo '<strong>Budget:</strong> $' . number_format($revenue - $expense) . '</li>';
                }
            }
            if ($count < 1) {
                echo "<p>Don't worry. I'm sure a few of those prospects listed in the left column will make the jump over here soon.</p><p>Or, maybe you haven't set up your categories yet. This area shows posts in the Active Projects category, so create a category with a slug 'active-project'.</p>";
            }
            echo '</ol>';
        } else {
            echo "<p>Don't worry. I'm sure a few of those prospects listed in the left column will make the jump over here soon.</p><p>Or, maybe you haven't set up your categories yet. This area shows posts in the Active Projects category, so create a category with a slug 'active-project'.</p>";
        }
        wp_reset_query();
        echo $after_widget;
    }
function display_build_profiles()
{
    query_posts(array('posts_per_page' => -1, 'offset' => 0, 'orderby' => 'date', 'order' => 'DESC', 'post_type' => 'profile', 'post_status' => 'publish', 'suppress_filters' => true));
    if (have_posts()) {
        $return_string .= '<div id="profiles">';
        while (have_posts()) {
            the_post();
            if (has_post_thumbnail($post->ID)) {
                $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail');
            }
            $post = get_custom_field('graduated_from:get_post');
            $program_color = $post['program_color'];
            list($r, $g, $b) = sscanf($program_color, "%02x%02x%02x");
            $return_string .= '<div class="profiles-single"><a href="' . get_permalink() . '"><div class="profiles-thumb" style="background-image: url(' . $image[0] . ')"></div><div class="profiles-title" style="background: rgba(' . $r . ', ' . $g . ', ' . $b . ', .7);"><h2>' . get_the_title() . '</h2><h3>' . get_custom_field('associated_company') . '</h3></div></a></div>';
        }
        $return_string .= '</div>';
    }
    wp_reset_query();
    return $return_string;
}
Example #6
0
 /**
  * Front-end display of widget (Widget Output)
  *
  * @see WP_Widget::widget()
  *
  * @param array $args     Widget arguments.
  * @param array $config   Saved values from database.
  */
 public function widget($args, $config)
 {
     if (!function_exists('the_custom_field') || !function_exists('get_custom_field')) {
         return;
     }
     if (empty($config['meta_key'])) {
         return;
     }
     $meta_key = $config['meta_key'];
     // Set output_classes key to extra_classes value to be compatible with function
     $config['output_classes'] = $config['extra_classes'];
     // Set output_caption = caption to be compatible with function
     $config['output_caption'] = $config['caption'];
     $custom_fields = $this->jmfe()->get_custom_fields(TRUE);
     foreach ($custom_fields as $group => $fields) {
         if (array_key_exists($meta_key, $fields)) {
             $config = array_merge($custom_fields[$group][$meta_key], $config);
             break;
         }
     }
     // Exit if there is no value for field (to prevent widget output)
     $field_value = get_custom_field($config['meta_key'], get_the_id(), $config);
     if (empty($field_value)) {
         return;
     }
     $widget_styles = isset($config['widget_styles']) && !empty($config['widget_styles']) ? true : false;
     if ($widget_styles) {
         echo $args['before_widget'];
         if (!empty($config['title'])) {
             echo $args['before_title'] . apply_filters('widget_title', $config['title']) . $args['after_title'];
         }
     }
     the_custom_field($config['meta_key'], NULL, $config);
     if ($widget_styles) {
         echo $args['after_widget'];
     }
 }
<!-- Blurb Generator -->
<?php 
$blurbs = get_custom_field('page_blurbs');
$blurb_columns = get_custom_field('blurb_columns');
echo '<div class="container" ><div class="blurb-maker" column-rel="' . $blurb_columns . '">';
foreach ($blurbs as $blurb) {
    if ($blurb['link']) {
        $blurblink = '<a title="' . $blurb['title'] . '" target="_' . $blurb['target'] . '" href="' . $blurb['link'] . '" >';
        $blurbspotlink = '<a class="zoom-image-wrapper" title="' . $blurb['title'] . '" target="_' . $blurb['target'] . '" href="' . $blurb['link'] . '" >';
        $blurbendlink = '</a>';
    } else {
        $blurblink = '';
        $blurbspotlink = '';
        $blurbendlink = '';
    }
    echo ' 
    <div class="' . $blurb_columns . ' column columns">
	    <div class="module-container blurb">
	    	<div class="module">
	    		' . $blurbspotlink . '
			   		<img class="blurb-image zoom-image" src="' . $blurb['image'] . '" alt="' . $blurb['title'] . '" />
			   		<div class="zoom-overlay"><div></div></div>
			    ' . $blurbendlink . '
			</div>
			<div class="module-meta">
			    <h3 class="module-headline">' . $blurblink . '' . $blurb['title'] . '' . $blurbendlink . '</h3>
			    <p>' . $blurb['description'] . '</p>
			</div>	
		</div>
		
		
Example #8
0
function aboutUs()
{
    get_custom_field('wpcf-about-us-home', TRUE);
}
function be_active_loop()
{
    echo '<div class="two-thirds first">';
    $order = array('dev', 'maintenance', 'edit', 'dev-complete', 'project-complete');
    setlocale(LC_MONETARY, 'en_US');
    foreach ($order as $order_item) {
        $loop_counter = 1;
        global $prefix;
        $args = array('category_name' => 'active-project', 'posts_per_page' => '-1', 'meta_query' => array(array('key' => $prefix . 'project_status', 'value' => $order_item)));
        $active = new WP_Query($args);
        if ($active->have_posts()) {
            echo '<h2 class="first">' . ucwords($order_item) . '</h2>';
        }
        while ($active->have_posts()) {
            $active->the_post();
            $status = get_custom_field($prefix . 'project_status');
            $type = get_custom_field($prefix . 'project_type');
            $status_summary = get_custom_field($prefix . 'status_summary');
            $revenue = get_custom_field($prefix . 'revenue');
            $expense = get_custom_field($prefix . 'expense');
            $profit = $revenue - $expense;
            if (!empty($revenue)) {
                $revenue = money_format('%(#10n', $revenue);
            }
            if (!empty($expense)) {
                $expense = money_format('%(#10n', $expense);
            }
            if (!empty($profit)) {
                $profit = money_format('%(#10n', $profit);
            }
            $work = get_custom_field($prefix . 'needs_work');
            if (empty($work)) {
                $work = 'yes';
            }
            $classes = array('project', strtolower($order_item), $work);
            if ($loop_counter % 2 == 1 && $loop_counter !== '1') {
                $classes[] = 'first';
            }
            echo '<div class=" ' . implode(' ', $classes) . '">';
            echo '<h4><a href="' . get_edit_post_link() . '">' . be_get_project_name() . '</a></h4>';
            echo '<p>';
            echo '<strong>' . ucwords($status) . '</strong>: ' . $status_summary . '<br />';
            if ($type) {
                echo '<strong>Type</strong>: ' . $type . '<br />';
            }
            if ($revenue) {
                echo '<strong>Budget</strong>: ' . $revenue;
            }
            if ($expense) {
                echo ' - ' . $expense . ' = ' . $profit . '<br />';
            }
            echo '</p>';
            echo '</div>';
            $loop_counter++;
        }
    }
    echo '</div><div class="one-third grey">';
    echo '<h1>Scheduled Projects</h1>';
    global $prefix;
    $args = array('category_name' => 'scheduled-project', 'posts_per_page' => '-1', 'orderby' => 'meta_value_num', 'order' => 'ASC', 'meta_key' => $prefix . 'date_dev_start');
    $scheduled = new WP_Query($args);
    global $be_output_end;
    $be_output_end = '';
    while ($scheduled->have_posts()) {
        $scheduled->the_post();
        $output = '';
        global $be_output_end;
        $start = get_custom_field($prefix . 'date_dev_start');
        $type = get_custom_field($prefix . 'project_type');
        $status_summary = get_custom_field($prefix . 'status_summary');
        $revenue = get_custom_field($prefix . 'revenue');
        $expense = get_custom_field($prefix . 'expense');
        $profit = $revenue - $expense;
        if (!empty($revenue)) {
            $revenue = money_format('%(#10n', $revenue);
        }
        if (!empty($expense)) {
            $expense = money_format('%(#10n', $expense);
        }
        if (!empty($profit)) {
            $profit = money_format('%(#10n', $profit);
        }
        $classes = array('project');
        $work = get_custom_field($prefix . 'needs_work');
        $classes[] = $work;
        $output .= '<div class="' . implode(' ', $classes) . '">';
        $output .= '<p><a href="' . get_edit_post_link() . '">' . be_get_project_name() . '</a><br />';
        $output .= '<strong>Scheduled for: </strong>' . date('F j, Y', $start) . '<br />';
        if ($status_summary) {
            $output .= '<strong>Status:</strong> ' . $status_summary . '<br />';
        }
        if ($type) {
            $output .= '<strong>Type:</strong> ' . $type . '<br />';
        }
        if ($revenue) {
            $output .= '<strong>Budget</strong>: ' . $revenue;
        }
        if ($expense) {
            $output .= ' - ' . $expense . ' = ' . $profit . '<br />';
        }
        $output .= '</div>';
        if ('delayed' == $work) {
            $be_output_end .= $output;
        } else {
            echo $output;
        }
    }
    echo $be_output_end;
    echo '</div>';
}
 /**
  * Echo Custom Field Value
  *
  * Same as get_custom_field except will echo out the value
  *
  * @since    1.1.8
  *
  * @param       $field_slug Meta key from post
  * @param null  $job_id     Optional, Post ID to get value from
  * @param array $args
  *
  * @internal param null $output_as
  * @internal param null $caption
  * @internal param null $extra_classes
  */
 function the_custom_field($field_slug, $job_id = null, $args = array())
 {
     $field_value = get_custom_field($field_slug, $job_id, $args);
     if (isset($args['output_as']) && !empty($args['output_as'])) {
         the_custom_field_output_as($field_slug, $job_id, $field_value, $args);
     } else {
         if (is_array($field_value)) {
             $field_value = implode(', ', $field_value);
         }
         echo $field_value;
     }
 }
Example #11
0
				
				
			<?php 
}
?>
	
			
			</div>
		</div>
		<!-- /CONTENT -->
		
		<!-- ============================================== -->
		
		<!-- SIDEBAR -->
		<?php 
if (get_custom_field('page_defaultpage_remove_sidebar') != 'Yes') {
    ?>
			<div class="sidebar primary-sidebar <?php 
    echo $sidebar_class;
    ?>
">			
			<?php 
    dynamic_sidebar('default-widget-area');
    ?>
	
		</div>
		<?php 
}
?>
		<!-- /SIDEBAR -->		
		
    function widget($args, $instance)
    {
        extract($args);
        echo $before_widget;
        echo $before_title . '10 Day Old Prospects' . $after_title;
        $old = new WP_Query('category_name=prospect&showposts=-1&posts_per_page=-1&order=ASC');
        $count = 0;
        global $prefix;
        if ($old->have_posts()) {
            echo '<ol>';
            while ($old->have_posts()) {
                $old->the_post();
                global $post;
                if ($post->post_date > date('Y-m-d', strtotime('-10 days'))) {
                    continue;
                }
                ?>
				<li><a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a>, <?php 
                the_date();
                ?>
 <?php 
                edit_post_link('Edit', '(', ')');
                ?>
				<?php 
                $status = get_custom_field($prefix . 'status_summary');
                if ($status) {
                    echo '<br /><strong>Status:</strong> ' . $status;
                }
                ?>
				<br /><strong>Source:</strong> <?php 
                $sources = get_the_terms($post->ID, 'sources', '', ', ', '');
                $list = '';
                if ($sources) {
                    foreach ($sources as $data) {
                        $list .= $data->name . ', ';
                    }
                    echo $list;
                }
                echo '<br />';
                $email = get_custom_field($prefix . 'client_email');
                if ($email) {
                    echo '<strong>Email:</strong> ' . $email;
                }
                echo '<br />';
                $phone = get_custom_field($prefix . 'client_phone');
                if ($phone) {
                    echo '<strong>Phone:</strong> ' . $phone;
                }
                echo '<br />';
                ?>
				</li>
				<?php 
                $count++;
            }
            if ($count < 1) {
                echo "<p>WooHoo! You're either really fast at responding to prospects, or you haven't set up your categories yet. </p><p>This area shows posts that are 10 days or older and in the 'Prospect' category. If you haven't done so already, create a category with the slug 'prospect'.</p>";
            }
            echo '</ol>';
        } else {
            echo "<p>WooHoo! You're either really fast at responding to prospects, or you haven't set up your categories yet. </p><p>This area shows posts that are 10 days or older and in the 'Prospect' category. If you haven't done so already, create a category with the slug 'prospect'.</p>";
        }
        wp_reset_query();
        echo $after_widget;
    }
 function test_get_custom_field()
 {
     CCTM::$post_id = 75;
     $this->assertTrue(get_custom_field('rating') == 'R');
     $this->assertTrue(get_custom_field('rating:raw') == 'R');
     CCTM::$post_id = 77;
     $this->assertTrue(get_custom_field('gallery:gallery') == '<div class="cctm_gallery" id="cctm_gallery_1"><img height="2592" width="1936" src="http://cctm:8888/wp-content/uploads/2012/06/2012-VACATION-059.jpg" title="2012 VACATION 059" alt="" class="cctm_image" id="cctm_image_1"/></div><div class="cctm_gallery" id="cctm_gallery_2"><img height="313" width="637" src="http://cctm:8888/wp-content/uploads/2012/08/I-just-had-sex.jpg" title="I just had sex" alt="" class="cctm_image" id="cctm_image_2"/></div>');
 }
Example #14
0
        echo get_the_title();
        ?>
</p>
                      <p class="<?php 
        if ($i == 4) {
            echo 'lremb';
        } else {
            echo 'lrem';
        }
        ?>
" data-position="235,200" data-in="left" data-step="1"  data-delay="1500" data-out="fade"><?php 
        echo get_the_content();
        ?>
 </p>
                      <p class="teaser" data-position="325,200" data-in="left" data-step="1"  data-delay="1500" data-out="fade"><a href="<?php 
        echo get_custom_field("slide_link");
        ?>
 ">Learn how we work</a></p>
                   </div>
               <?php 
    }
    ?>
           
            <?php 
    $i++;
}
$wp_query = null;
$wp_query = $temp;
// Reset
?>
      </div>
Example #15
0
    function crmpress_dashboard_widget()
    {
        global $post, $prefix;
        echo '<h2 class="dash-title">' . get_bloginfo('name') . ' Project Information</h2>';
        echo '<div class="active-projects">';
        echo '<h2>Active Projects</h2>';
        echo '<ul class="column-one">';
        $active = new WP_Query('category_name=active-project&posts_per_page=20');
        while ($active->have_posts()) {
            $active->the_post();
            $revenue = get_custom_field($prefix . 'revenue');
            $expense = get_custom_field($prefix . 'expense');
            $budget = $revenue - $expense;
            $status = get_custom_field($prefix . 'status_summary');
            $url = get_custom_field($prefix . 'client_url');
            echo '<li>';
            ?>
    					<h3><a href="<?php 
            echo get_edit_post_link();
            ?>
"><?php 
            the_title();
            ?>
</a></h3>
    					Status: <?php 
            echo $status;
            ?>
<br />
    					Budget: <?php 
            if ($revenue) {
                echo '$';
            }
            echo $revenue;
            ?>
 - <?php 
            if ($expense) {
                echo '$';
            }
            echo $expense;
            ?>
 = $<?php 
            echo $budget;
            ?>
<br />
    					Website: <?php 
            if ($url) {
                ?>
 <a href="<?php 
                echo $url;
                ?>
" target="_blank"><?php 
                the_title();
                ?>
</a><?php 
            }
            ?>
    				<?php 
            echo '</li>';
        }
        echo '</ul>';
        wp_reset_query();
        echo '</div>';
        echo '<div class="scheduled-projects">';
        echo '<h2>Scheduled Projects</h2>';
        echo '<ul class="column-two">';
        $schedule = new WP_Query('category_name=scheduled-project&posts_per_page=10');
        while ($schedule->have_posts()) {
            $schedule->the_post();
            $revenue = get_custom_field($prefix . 'revenue');
            $expense = get_custom_field($prefix . 'expense');
            $budget = $revenue - $expense;
            $status = get_custom_field($prefix . 'status_summary');
            $action = get_custom_field($prefix . 'actionitem');
            echo '<li>';
            ?>
    					<h3><a href="<?php 
            echo get_edit_post_link();
            ?>
"><?php 
            the_title();
            ?>
</a></h3>
    					Status: <?php 
            echo $status;
            ?>
<br />
    					Budget: <?php 
            if ($revenue) {
                echo '$';
            }
            echo $revenue;
            ?>
 - <?php 
            if ($expense) {
                echo '$';
            }
            echo $expense;
            ?>
 = <span style="color: #0CB636;">$<?php 
            echo $budget;
            ?>
</span><br />
    					Action Item: <?php 
            if ($action) {
                echo $action;
            }
            ?>
    				<?php 
            echo '</li>';
        }
        wp_reset_query();
        echo '</ul>';
        echo '</div>';
        echo '<div class="prospects">';
        echo '<h2>Prospects</h2>';
        echo '<ul class="column-three">';
        $prospect = new WP_Query('category_name=prospect&posts_per_page=10');
        while ($prospect->have_posts()) {
            $prospect->the_post();
            $email = get_custom_field($prefix . 'client_email');
            $url = get_custom_field($prefix . 'client_url');
            $status = get_custom_field($prefix . 'project_status');
            echo '<li>';
            ?>
    					<h3><a href="<?php 
            echo get_edit_post_link();
            ?>
"><?php 
            the_title();
            ?>
</a></h3>
    					Status: <?php 
            echo $status;
            ?>
<br />
    					Email: <?php 
            if ($email) {
                echo $email;
            }
            ?>
<br />
    					Website: <?php 
            if ($url) {
                ?>
 <a href="<?php 
                echo $url;
                ?>
" target="_blank"><?php 
                the_title();
                ?>
</a><?php 
            }
            ?>
    				<?php 
            echo '</li>';
        }
        wp_reset_query();
        echo '</ul>';
        echo '</div>';
        echo '<div class="clear"></div>';
    }
	<header id="header-homepage">
		
		<ul id="header-slider">
			<?php 
$args = array('numberposts' => 4, 'offset' => 0, 'orderby' => 'menu_order', 'order' => 'DESC', 'post_type' => 'header_slide', 'post_status' => 'publish', 'suppress_filters' => true);
$header_slides = get_posts($args);
foreach ($header_slides as $post) {
    setup_postdata($post);
    ?>
				<li style="background: linear-gradient( rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) ), url('<?php 
    print_custom_field('header_image:to_image_src');
    ?>
') no-repeat center 30%; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;">
					
					<?php 
    $related_post = get_custom_field('related_program:get_post');
    $program_color = $related_post['program_color'];
    if ($program_color != '') {
        $rgb = hex2rgb($program_color);
        ?>
						<h1><span style="background-color: rgba(<?php 
        echo $rgb[0];
        ?>
,<?php 
        echo $rgb[1];
        ?>
,<?php 
        echo $rgb[2];
        ?>
,.7);"><?php 
        the_title();
<?php 
/* FontStack Loader */
if (ot_get_option('default_fontstack')) {
    ?>
	body{<?php 
    echo ot_get_option('default_fontstack');
    ?>
}
<?php 
}
?>



<?php 
/* Custom CSS (from user) */
echo ot_get_option('customcss');
echo get_custom_field('page_css');
?>
 

</style>


<?php 
/* ---------------------------------------------------------*/
/* TYPEKIT - HEADER EMBED CODE */
/* ---------------------------------------------------------*/
if (ot_get_option('alt_fontreplace')) {
    echo ot_get_option("alt_fontreplace");
}
function print_custom_field($fieldname)
{
    print get_custom_field($fieldname);
}
<!-- THE POST QUERY -->
<!-- This one's special because it'll look for our category filter and apply some magic -->
<?php 
wp_reset_query();
global $paged;
global $template_file;
if (get_post_custom_values('blog_post_count')) {
    $post_array = get_post_custom_values('blog_post_count');
    $post_count = join(',', $post_array);
} else {
    $post_count = -1;
}
/* Get Category Filter */
if (get_custom_field('blog_category_filter')) {
    $cats = get_custom_field('blog_category_filter');
    foreach ($cats as $cat) {
        $acats[] = $cat;
    }
    $cat_string = join(',', $acats);
}
$args = array('cat' => $cat_string, 'posts_per_page' => $post_count, 'paged' => $paged);
query_posts($args);
Example #20
0
		<div class="row product-top content" data-target="product-top">
			<div class="col-md-3 col-md-offset-1 product-image">
				<img src="<?php 
    imageOne();
    ?>
"/>
			</div>
			<div class="col-md-3 col-md-offset-1 product-image">
				<img src="<?php 
    imageTwo();
    ?>
"/>
			</div>
			<div class="col-md-3 col-md-offset-1 product-meta">
				<span class="product-name-badge"><?php 
    get_custom_field('wpcf-product-name-badge', TRUE);
    ?>
</span>
				<div class="rvalue">
					<p>R-VALUE:</p>
					<span><?php 
    rvalue();
    ?>
</span>
				</div>
			</div>
		</div>
		<div class="page-content">
			<?php 
    the_content();
    ?>
<?php

$slidershortcode = get_custom_field('slider_shortcode');
if (get_custom_field('slider_shortcode_fullwidth') == "full_width") {
    if (strstr($slidershortcode, 'rev_slider')) {
        //It's Revolution - Do Something
        $strip_this_shit = array("[", "]", " ", "rev_slider");
        $revslider_shortcode_prestrip = get_custom_field('slider_shortcode');
        $revslider_shortcode_poststrip = str_replace($strip_this_shit, "", "{$revslider_shortcode_prestrip}");
        putRevSlider("{$revslider_shortcode_poststrip}");
    } else {
        echo do_shortcode("{$slidershortcode}");
    }
} else {
    echo '<div class="container">
			<div class="sixteen columns">';
    if (strstr($slidershortcode, 'rev_slider')) {
        //It's Revolution - Do Something
        $strip_this_shit = array("[", "]", " ", "rev_slider");
        $revslider_shortcode_prestrip = get_custom_field('slider_shortcode');
        $revslider_shortcode_poststrip = str_replace($strip_this_shit, "", "{$revslider_shortcode_prestrip}");
        putRevSlider("{$revslider_shortcode_poststrip}");
    } else {
        echo do_shortcode("{$slidershortcode}");
    }
    echo '</div>
	</div>';
}
/**
 * Customize Post Content
 *
 * @package      Genesis CRM
 * @author       Bill Erickson <*****@*****.**>
 * @copyright    Copyright (c) 2011, Bill Erickson
 * @license      http://opensource.org/licenses/gpl-2.0.php GNU Public License
 *
 */
function be_post_content()
{
    // Get categories, then change from array of objects to standard array
    $category_objects = get_the_category();
    foreach ($category_objects as $category) {
        $categories[] = $category->slug;
    }
    // Fields
    global $post, $prefix;
    $status = get_custom_field($prefix . 'status_summary');
    $revenue = get_custom_field($prefix . 'revenue');
    $sources = get_the_terms($post->ID, 'sources', '', ', ', '');
    $list = '';
    if ($sources) {
        foreach ($sources as $data) {
            $list[] = $data->name;
        }
    }
    if (!empty($list)) {
        $sources = implode(', ', $list);
    }
    $email = get_custom_field($prefix . 'client_email');
    $phone = get_custom_field($prefix . 'client_phone');
    // Prospect and Closed Loop
    if (in_array('prospect', $categories) || in_array('closed', $categories)) {
        echo '<p>';
        if ($status) {
            echo '<strong>Status:</strong> ' . $status . ' | ';
        }
        if ($revenue) {
            echo 'Quote: ' . $revenue . ' | ';
        }
        if ($sources) {
            echo 'Source: ' . $sources . ' | ';
        }
        if ($email) {
            echo 'Email ' . $email . ' | ';
        }
        if ($phone) {
            echo 'Phone ' . $phone;
        }
        echo '</p>';
    }
    // Active Loop
    if (in_array('active-project', $categories)) {
        $status = get_custom_field($prefix . 'project_status');
        $status_summary = get_custom_field($prefix . 'status_summary');
        $expense = get_custom_field($prefix . 'expense');
        $profit = $revenue - $expense;
        if (!empty($revenue)) {
            $revenue = money_format('%(#10n', $revenue);
        }
        if (!empty($expense)) {
            $expense = money_format('%(#10n', $expense);
        }
        if (!empty($profit)) {
            $profit = money_format('%(#10n', $profit);
        }
        $work = get_custom_field($prefix . 'needs_work');
        if (empty($work)) {
            $work = 'yes';
        }
        echo '<p>';
        echo '<strong>' . ucwords($status) . '</strong>: ' . $status_summary . '<br />';
        if ($revenue) {
            echo '<strong>Budget</strong>: ' . $revenue;
        }
        if ($expense) {
            echo ' - ' . $expense . ' = ' . $profit;
        }
        if ($revenue) {
            echo '<br />';
        }
        if ($email) {
            echo 'Email ' . $email . ' | ';
        }
        if ($phone) {
            echo 'Phone ' . $phone;
        }
        echo '</p>';
    }
    if (in_array('complete', $categories)) {
        $revenue = get_custom_field($prefix . 'revenue');
        $expense = get_custom_field($prefix . 'expense');
        $profit = $revenue - $expense;
        $time = get_custom_field($prefix . 'time_setup') + get_custom_field($prefix . 'time_development') + get_custom_field($prefix . 'time_phone') + get_custom_field($prefix . 'time_other');
        if ($time) {
            $rate = money_format('%(#10n', $profit / $time);
        }
        if (!empty($revenue)) {
            $revenue = money_format('%(#10n', $revenue);
        }
        if (!empty($expense)) {
            $expense = money_format('%(#10n', $expense);
        }
        if (!empty($profit)) {
            $profit = money_format('%(#10n', $profit);
        }
        echo '<p>';
        if ($revenue) {
            echo '<strong>Budget</strong>: ' . $revenue;
            if ($expense) {
                echo ' - ' . $expense . ' = ' . $profit;
            }
            echo '<br />';
        }
        if ($time) {
            echo '<strong>Time Spent:</strong> ' . $time . ' hrs <br /><strong>Effective rate:</strong> ' . $rate . ' /hr<br />';
        }
        if ($email) {
            echo 'Email ' . $email . ' | ';
        }
        if ($phone) {
            echo 'Phone ' . $phone;
        }
        echo '</p>';
    }
}
Example #23
0
<?php

if ($post->post_type == "portfolio_items") {
    // Do the portfolio meta (if appropriate)
    ?>
						<div class="meta">
							<?php 
    $collaborators = get_post_meta($post->ID, '_collaborators', true);
    $testimonial = get_post_meta($post->ID, '_testimonial', true);
    $testimonial_name = get_post_meta($post->ID, '_testimonial_name', true);
    ?>
							<div>
								<h6><a target="_blank" href="http://<?php 
    get_custom_field('_url');
    ?>
">Launch Site</a></h6>
								<br/>
								<?php 
    if ($collaborators) {
        ?>
								<h6>J&amp;J worked with:</h6>
								<p><?php 
        echo $collaborators;
        ?>
</p>
								<?php 
    }
    ?>
							</div>
							<div class="marginleft">
								<?php 
	  </div>
	</div>
</div>
<div class="container">
  <div class="row">
	<div class="col-xs-8">
	  <h4>Bio <?php 
        print_custom_field('ChannelAuthor');
        ?>
</h4>
	  <p><?php 
        print_custom_field('bio');
        ?>
</p>
	  <?php 
        $value = get_custom_field('weburl');
        if (!empty($value)) {
            echo "<a href='{$value}'><strong>Web URL</strong></a>";
        }
        ?>
	</div>
  </div>
</div>
</div>
</div>
<?php 
    }
}
// end of the loop.
?>
/*
 * Template Name: BLOG UNILA
 * Description: Plantilla de pagina con blog.
 */
get_header();
if (get_custom_field('defaultpage_remove_sidebar') == 'Yes' && get_custom_field('secondarypage_remove_sidebar') == 'Yes') {
    $layout_class = 'sixteen columns';
    $content_width_class = 'full-width';
    $content_width = "1100";
} elseif (get_custom_field('defaultpage_remove_sidebar') == 'Yes' && get_custom_field('secondarypage_remove_sidebar') == 'No') {
    $sidebar_class = 'five columns';
    $layout_class = 'eleven columns';
    $content_width_class = 'normal-width';
    $content_width = "750";
} elseif (get_custom_field('defaultpage_remove_sidebar') == 'No' && get_custom_field('secondarypage_remove_sidebar') == 'Yes') {
    $sidebar_class = 'five columns';
    $layout_class = 'eleven columns';
    $content_width_class = 'normal-width';
    $content_width = "750";
} else {
    $sidebar_class = 'three columns';
    $layout_class = 'ten columns';
    $content_width_class = 'normal-width';
    $content_width = "680";
}
?>

<div class="super-container full-width" id="rosa">
    <div class="row rosa"> <!-- Give this div your desired background color -->
        <div class="container">
/**
 * Project Name
 *
 * @author Bill Erickson
 * @link http://www.billerickson.net/twentyten-crm/
 */
function be_get_project_name()
{
    global $prefix;
    $project_name = get_custom_field($prefix . 'project_name');
    if (!empty($project_name)) {
        $name = $project_name . ' (' . get_the_title() . ')';
    } else {
        $name = get_the_title();
    }
    return $name;
}
<!-- THE POST QUERY -->
<!-- This one's special because it'll look for our category filter and apply some magic -->
<?php 
wp_reset_query();
global $paged;
global $template_file;
if (get_post_custom_values('grid_post_count')) {
    $post_array = get_post_custom_values('grid_post_count');
    $post_count = join(',', $post_array);
} else {
    $post_count = -1;
}
/* Get Category Filter */
if (get_custom_field('grid_category_filter')) {
    $cats = get_custom_field('grid_category_filter');
    foreach ($cats as $cat) {
        $acats[] = $cat;
    }
    $cat_string = join(',', $acats);
}
$args = array('cat' => $cat_string, 'posts_per_page' => $post_count, 'paged' => $paged);
query_posts($args);
Example #28
0
                                <?php 
                get_custom_field('_isense_event_common_name');
                ?>
<br/>
                                <?php 
                get_custom_field('_isense_event_address_1');
                ?>
<br/>
                                <?php 
                get_custom_field('_isense_event_city');
                ?>
, <?php 
                get_custom_field('_isense_event_state');
                ?>
 <?php 
                get_custom_field('_isense_event_zip');
                ?>
<br/>
                            </div>
                        </div>
                    <?php 
            } else {
                ?>
                        <div class="post_section" style="margin:0px 0px 10px 0px;">
                            <div class="post_text">
                                <?php 
                the_content();
                ?>
                            </div>
                        </div>
                    <?php 
');"></div>
	</div>	
	<div class="container">
		<div class="row">
			<div class="col-xs-10 col-xs-offset-1">
				<div class="bike-shot">
					<div class="bike-shot-ft">
						<img src="<?php 
        print_custom_field('photoImage');
        ?>
" alt="<?php 
        the_title();
        ?>
" class="top show"/>
						<?php 
        $array_of_images = get_custom_field('uploadsGallery:to_array');
        foreach ($array_of_images as $img_id) {
            print CCTM::filter($img_id, 'to_image_tag');
        }
        ?>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-xs-10 col-xs-offset-1 col-md-8 col-md-offset-2 pre-text">
				<?php 
        if ($array_of_images) {
            ?>
				<div class="bike-shot-thumbs"></div>
				<?php 
Example #30
0
			<?php 
    $channel = get_custom_field('channel');
    ?>
			<p class="lead"><?php 
    print_custom_field('Tagline');
    ?>
</p>
			<div class="list"><ol>
			<?php 
    $episodes = new WP_Query(array('post_type' => 'podcast', 'post_status' => 'publish', 'posts_per_page' => -1));
    if ($episodes->have_posts()) {
        while ($episodes->have_posts()) {
            $episodes->the_post();
            if (get_custom_field('channel') == $channel) {
                $url1 = get_permalink();
                echo '<li>' . "<a href={$url1}>" . get_custom_field('episode') . '</a></li>';
            }
        }
        $my_query->reset_postdata();
    }
    ?>
</ol>
		  	</div>
			<div class="text-center read-more"><span class="glyphicon glyphicon-chevron-down clk" /></div>
		</div>
	</div>
</div>
<?php 
    $var = $var + 1;
}
wp_reset_query();