Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26381

    Hi,

    Is it possible to add a date header to portfolio items on the gallery page and single page?

    Example of my portfolios galleries here -

    http://etool.net.au/projects/

    http://etool.net.au/about/our-press/

    Single portfolio page here – http://etool.net.au/portfolio/office-warehouse/

    I have date/author meta data on my blog which I would like to keep, but just wondering if I can add it to the portfolio layout too?

    Thanks, Siobhan

    #130208

    Hi,

    For the Portfolio Overview, you can edit wp-contentthemesenfoldconfig-templatebuilderavia-shortcodes > portfolio.php, find this code

    $output .= "<div data-ajax-id='{$the_id}' class=' grid-entry flex_column isotope-item all_sort {$style_class} {$post_class} {$sort_class} {$grid} {$extraClass}'>";
    $output .= "<div class='main_color inner-entry'>";
    $output .= apply_filters('avf_portfolio_extra', "", $entry);
    $output .= "<".$link_markup[0]." data-rel='grid-".avia_post_grid::$grid."' class='grid-image avia-hover-fx'>".$custom_overlay.get_the_post_thumbnail( $the_id, $image_size )."</".$link_markup[1].">";
    $output .= !empty($title) || !empty($excerpt) ? "<div class='grid-content'><div class='avia-arrow'></div>" : '';
    $output .= !empty($title) ? "<h3 class='grid-entry-title'><a href='{$title_link}' title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>": '';
    $output .= !empty($excerpt) ? "<div class='grid-entry-excerpt'>".$excerpt."</div>" : '';
    $output .= !empty($title) || !empty($excerpt) ? "</div>" : '';
    $output .= "</div>";
    $output .= "</div>";

    Replace it with

    $portfolio_date = get_the_date($entry->post_date);

    $output .= "<div data-ajax-id='{$the_id}' class=' grid-entry flex_column isotope-item all_sort {$style_class} {$post_class} {$sort_class} {$grid} {$extraClass}'>";
    $output .= "<div class='main_color inner-entry'>";
    $output .= apply_filters('avf_portfolio_extra', "", $entry);
    $output .= "<".$link_markup[0]." data-rel='grid-".avia_post_grid::$grid."' class='grid-image avia-hover-fx'>".$custom_overlay.get_the_post_thumbnail( $the_id, $image_size )."</".$link_markup[1].">";
    $output .= !empty($title) || !empty($excerpt) ? "<div class='grid-content'><div class='avia-arrow'></div>" : '';
    $output .= !empty($title) ? "<h3 class='grid-entry-title'><a href='{$title_link}' title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>": '';
    $output .= "<br>";
    $output .= "<span class='post-meta-infos'>";
    $output .= "<span class='date-container minor-meta'>".$portfolio_date."</span>";
    $output .= "</span>";
    $output .= !empty($excerpt) ? "<div class='grid-entry-excerpt'>".$excerpt."</div>" : '';
    $output .= !empty($title) || !empty($excerpt) ? "</div>" : '';
    $output .= "</div>";
    $output .= "</div>";

    You can edit the date settings on Settings > General panel.

    For single portfolio without the Advance Layout Editor, you can edit includes > loop-portfolio-single.php, find the code:

    //display the actual post content
    the_content(__('Read more','avia_framework').'<span class="more-link-arrow"> &rarr;</span>');

    Below, you can echo the date code:

    echo "<span class='post-meta-infos'>";
    echo "<span class='date-container minor-meta'>".get_the_time('d M Y')."</span>";
    echo "</span>";

    Regards,

    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Add date to portfolio pages’ is closed to new replies.