-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-portfolio.php
executable file
·57 lines (44 loc) · 1.59 KB
/
single-portfolio.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* Coastal Template for portfolio
*
* WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
* Please do all modifications in the form of a child theme.
*
* @package Coastal Theme\Templates
* @author Station Seven
* @license GPL-2.0+
* @link http://stnsvn.com
*/
//* This file handles single entry configuration for portfolio custom post type
// Control layout on Portfolio pages
add_filter( 'genesis_pre_get_option_site_layout', 'stnsvn_portfolio_layout', 15 );
function stnsvn_portfolio_layout( $opt ) {
$opt = get_theme_mod('portfolio_sidebar', 'full-width-content');
return $opt;
}
//Remove comments section
remove_action( 'genesis_after_entry', 'genesis_get_comments_template' );
//Hide share box
$display_portf_share_box = get_theme_mod( 'portf_display_share_buttons' );
if ( $display_portf_share_box == '') {
remove_action( 'genesis_entry_footer', 'blog_share_box', 10 );
}
//Remove categories and tags
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
//Add go back button
function portf_go_back_button() {
$go_back_url = (get_theme_mod( 'backbtn-url' ) <> "" ) ? get_theme_mod( 'backbtn-url' ) : home_url();
$go_back_text = get_theme_mod( 'backbtn-text');
if ($go_back_text <> ""){
echo '<div class="back-to-top">
<a href="'.$go_back_url.'">
<h4 class="button">'.$go_back_text.'</h4>
</a>
</div>';
}
}
add_action( 'genesis_entry_footer', 'portf_go_back_button', 11 );
genesis();
?>