-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-blog-header.php
45 lines (41 loc) · 1.27 KB
/
template-blog-header.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: Page Like Blog Post – Helpdesk Header
*/
set_custom_source( 'components/SidebarTOC', 'css' );
set_custom_source( 'components/SignupSidebar', 'css' );
set_custom_source( 'pages/post', 'css' );
set_custom_source( 'pages/blog', 'css' );
set_custom_source( 'common/splide', 'css' );
set_custom_source( 'splide', 'js' );
set_custom_source( 'sidebar_toc', 'js' );
set_custom_source( 'custom_lightbox', 'js' );
global $post;
$page_title = str_replace( '^', '', get_the_title() );
$page_header_args = array(
'title' => $page_title,
'text' => do_shortcode( '[urlslab-generator id="6"]' ),
'toc' => true,
);
if ( has_post_thumbnail() ) {
$page_header_args['image'] = array(
'type' => 'main',
'src' => get_the_post_thumbnail_url( $post, 'blog_post_thumbnail' ),
'alt' => $page_title,
);
}
?>
<?php get_template_part( 'lib/custom-blocks/compact-header', null, $page_header_args ); ?>
<div class="Post Post--sidebar-right">
<div class="wrapper Post__container">
<div class="Signup__sidebar-wrapper">
<?= do_shortcode( '[signup-sidebar]' ); ?>
</div>
<div class="BlogPost__content Post__content">
<div class="Content">
<?php the_content(); ?>
<?php urlslab_display_related_resources(); ?>
</div>
</div>
</div>
</div>