Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
MSF
/
msf-climate-hub
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f34ed9e0
authored
2023-11-03 15:45:22 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
news page
Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent
f3e2907c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
5 deletions
wp-content/themes/msf-child/single.php
wp-content/themes/msf-child/single.php
View file @
f34ed9e
...
...
@@ -4,19 +4,60 @@
*
* @package Understrap
*/
// Exit if accessed directly.
defined
(
'ABSPATH'
)
||
exit
;
get_header
();
$container
=
get_theme_mod
(
'understrap_container_type'
);
if
(
is_front_page
()
)
{
get_template_part
(
'global-templates/hero'
);
$post_thumbnail_id
=
get_post_thumbnail_id
(
$post
->
ID
);
$thumbnail_image
=
get_posts
(
array
(
'p'
=>
$post_thumbnail_id
,
'post_type'
=>
'attachment'
));
$url
=
wp_get_attachment_url
(
get_post_thumbnail_id
(
$post
->
ID
),
'full'
);
$subhead
=
get_field
(
'subhead'
);
//$badge = get_field('badge');
if
(
$thumbnail_image
&&
isset
(
$thumbnail_image
[
0
]))
{
$img_description
=
$thumbnail_image
[
0
]
->
post_content
;
$photo_caption
=
$thumbnail_image
[
0
]
->
post_excerpt
;
$img_alt
=
get_post_meta
(
$post_thumbnail_id
,
'_wp_attachment_image_alt'
,
true
);
$img_title
=
$thumbnail_image
[
0
]
->
post_title
;
$copy
=
get_field
(
'copy'
,
$post_thumbnail_id
);
}
?>
<?php
if
(
has_post_thumbnail
()
)
{
?>
<header
class=
"entry-header header page"
style=
" background-image: url('
<?php
echo
$url
;
?>
')"
>
<div
class=
"content-container"
>
<div
class=
"container"
style=
"height: 100%;"
>
<div
class=
"col-md-12 fx-style"
>
<div
class=
"search-box"
><div
id=
"search-box-content"
>
<?php
the_field
(
'page_search_block'
,
'option'
);
?>
</div>
<div
class=
"search-button"
>
Search
</div></div>
<div
class=
"header_text"
>
<div
class=
"breadcrumb"
>
<?php
get_breadcrumb
();
?>
</div>
<?php
the_field
(
'header_text'
);
?>
</div>
<?php
if
(
$badge
){
$badge_content
=
get_field
(
'badge_content'
);
echo
"<div class='badge'><span>"
.
$badge_content
[
'badge_label'
]
.
"</span><div class='badge_content'><p>"
.
$badge_content
[
'badge_text'
]
.
"</p></div></div>"
;
}
?>
</div>
</div>
</div>
<div
class=
'side-caption header-caption
<?=
(
empty
(
$copy
)
&&
empty
(
$cap
))
?
"hide"
:
""
?>
'
>
<a
class=
'copy-link'
aria-label=
"Header Slide Caption"
href=
'#'
></a>
<span
class=
'image-side-caption'
>
<span
class=
'cap'
>
<?=
$photo_caption
?>
</span>
<span
class=
'copyright'
>
<?=
(
$copy
)
?
"© "
.
$copy
:
""
?>
</span>
</span>
</div>
</header>
<!-- .entry-header -->
<?php
}
?>
<div
class=
"wrapper"
id=
"full-width-page-wrapper"
>
<div
class=
"
<?php
echo
esc_attr
(
$container
);
?>
"
id=
"content"
>
...
...
@@ -25,11 +66,13 @@ if ( is_front_page() ) {
<main
class=
"site-main"
id=
"main"
role=
"main"
>
<div
class=
"header_text mobile"
><div
class=
"breadcrumb"
>
<?php
get_breadcrumb
();
?>
</div>
<?php
the_field
(
'header_text'
);
?>
</div>
<?php
while
(
have_posts
()
)
{
the_post
();
get_template_part
(
'loop-templates/content'
,
'single-story'
);
get_template_part
(
'loop-templates/content'
,
'page'
);
}
?>
...
...
@@ -39,7 +82,7 @@ if ( is_front_page() ) {
</div>
<!-- #content -->
</div>
<!-- #full-width-page-wrapper -->
</div>
<!-- #full-width-page-wrapper -->
<?php
get_footer
();
...
...
Please
register
or
sign in
to post a comment