Example #1
0
 /**
  * Tweak the page header title args
  *
  * @since 2.1.0
  */
 public static function alter_title($args)
 {
     if (is_singular('portfolio')) {
         if (!in_array('title', wpex_portfolio_post_blocks())) {
             $args['string'] = get_the_title();
             $args['html_tag'] = 'h1';
         }
     }
     return $args;
 }
Example #2
0
 /**
  * Tweak the page header
  *
  * @since   2.1.0
  * @access  public
  * @return  bool
  */
 public function wpex_title($title)
 {
     if (is_singular('portfolio') && in_array('title', wpex_portfolio_post_blocks())) {
         $obj = get_post_type_object('portfolio');
         $title = $obj->labels->singular_name;
     }
     return $title;
 }
<?php

/**
 * Portfolio single layout
 *
 * @package Total WordPress theme
 * @subpackage Partials
 * @version 3.0.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
// Single layout blocks
$blocks = wpex_portfolio_post_blocks();
// Loop through blocks and get template part
foreach ($blocks as $block) {
    get_template_part('partials/portfolio/portfolio-single-' . $block);
}