-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-portfolio.php
executable file
·45 lines (33 loc) · 2.15 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
<?php /* Template Name: Portfolio Page */ ?>
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
<?php $pageKind = "portfolio"; ?>
<?php get_header(); ?>
<main class="page-main width-full page-<?=$pageKind;?> <?=get_page_class();?>" id="main-content" itemscope itemtype="https://schema.org/<?=custom_page_article(get_the_ID());?>" itemprop="mainEntity">
<div class="page-content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article <?php post_class(); ?> id="<?=$post->post_name;?>" name="<?=$post->post_name; ?>" itemscope itemtype="https://schema.org/CreativeWork">
<div class="post-container">
<?php $postType = get_post_type_object(get_post_type()); ?>
<div class="<?=$pageKind;?>-name" itemprop="articleSection"><a href="<?=home_url() . "/" . esc_html($postType->labels->uri_slug) . "/"; ?>"><?=get_post_type();?></a></div>
<div class="<?=$pageKind;?>-view-all"><a href="<?=home_url() . "/" . esc_html($postType->labels->uri_slug) . "/"; ?>">View all</a></div>
<h1 class="page-title" itemprop="name headline"><?php the_title(); ?></h1>
<div class="the-content" itemprop="text articleBody description" id="TheContent">
<?php the_content("<p>Continue Reading »</p>"); ?>
<?=custom_page_css(get_the_ID());?>
</div>
</div>
</article>
<div class="page-last-updated">
<time datetime="<?=get_the_date('c');?>" itemprop="datePublished" class="hidden"><?php the_date(); ?></time>
<?=display_last_updated();?>
</div>
<aside id="page-widgets" class="page-sidebar <?=$pageKind;?>-widgets width-full">
<?php dynamic_sidebar( selectSidebarCustomField(get_the_ID(), 'singlepage') ); // Select from 'Widgets_Slug' custom field ?>
<div class="widget child-page-widget">
<?php //get_child_pages(get_the_ID(), false); // Display the children of this page ?>
</div>
</aside>
<?php endwhile; endif; ?>
</div>
</main>
<?php get_footer(); ?>