first commit
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
/**
|
||||
* Single post layout
|
||||
*
|
||||
* @package OceanWP WordPress theme
|
||||
*/
|
||||
|
||||
// Exit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>">
|
||||
|
||||
<?php
|
||||
// Get posts format.
|
||||
$format = get_post_format();
|
||||
|
||||
// Get elements.
|
||||
$elements = oceanwp_blog_single_elements_positioning();
|
||||
|
||||
// Loop through elements.
|
||||
foreach ( $elements as $element ) {
|
||||
|
||||
// Featured Image.
|
||||
if ( 'featured_image' === $element
|
||||
&& ! post_password_required() ) {
|
||||
|
||||
$format = $format ? $format : 'thumbnail';
|
||||
|
||||
get_template_part( 'partials/single/media/blog-single', $format );
|
||||
|
||||
}
|
||||
|
||||
// Title.
|
||||
if ( 'title' === $element ) {
|
||||
|
||||
get_template_part( 'partials/single/header' );
|
||||
|
||||
}
|
||||
|
||||
// Meta.
|
||||
if ( 'meta' === $element ) {
|
||||
|
||||
get_template_part( 'partials/single/meta' );
|
||||
|
||||
}
|
||||
|
||||
// Content.
|
||||
if ( 'content' === $element ) {
|
||||
|
||||
get_template_part( 'partials/single/content' );
|
||||
|
||||
}
|
||||
|
||||
// Tags.
|
||||
if ( 'tags' === $element ) {
|
||||
|
||||
get_template_part( 'partials/single/tags' );
|
||||
|
||||
}
|
||||
|
||||
// Social Share.
|
||||
if ( 'social_share' === $element
|
||||
&& OCEAN_EXTRA_ACTIVE ) {
|
||||
|
||||
do_action( 'ocean_social_share' );
|
||||
|
||||
}
|
||||
|
||||
// Next/Prev.
|
||||
if ( 'next_prev' === $element ) {
|
||||
|
||||
get_template_part( 'partials/single/next-prev' );
|
||||
|
||||
}
|
||||
|
||||
// Author Box.
|
||||
if ( 'author_box' === $element ) {
|
||||
|
||||
get_template_part( 'partials/single/author-bio' );
|
||||
|
||||
}
|
||||
|
||||
// Related Posts.
|
||||
if ( 'related_posts' === $element ) {
|
||||
|
||||
get_template_part( 'partials/single/related-posts' );
|
||||
|
||||
}
|
||||
|
||||
// Comments.
|
||||
if ( 'single_comments' === $element ) {
|
||||
|
||||
comments_template();
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</article>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/**
|
||||
* Post single meta
|
||||
*
|
||||
* @package OceanWP WordPress theme
|
||||
*/
|
||||
|
||||
// Exit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Get meta sections.
|
||||
$sections = oceanwp_blog_single_meta();
|
||||
|
||||
// Return if sections are empty.
|
||||
if ( empty( $sections )
|
||||
|| 'post' !== get_post_type() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Return if quote format.
|
||||
if ( 'quote' === get_post_format() ) {
|
||||
return;
|
||||
} ?>
|
||||
|
||||
<?php do_action( 'ocean_before_single_post_meta' ); ?>
|
||||
|
||||
<ul class="meta clr">
|
||||
|
||||
<?php
|
||||
// Loop through meta sections.
|
||||
foreach ( $sections as $section ) {
|
||||
?>
|
||||
|
||||
<?php if ( 'author' === $section ) { ?>
|
||||
<?php
|
||||
// Get co-authors
|
||||
$authors = [];
|
||||
|
||||
$co_authors = get_coauthors(get_the_ID());
|
||||
|
||||
foreach($co_authors as $co_author) {
|
||||
if(get_class($co_author) !== 'WP_User') {
|
||||
array_push($authors, $co_author->display_name);
|
||||
continue;
|
||||
}
|
||||
|
||||
array_push($authors, $co_author->data->display_name);
|
||||
}
|
||||
|
||||
if (empty($authors)) {
|
||||
$post_author = get_the_author_meta( 'display_name' , get_post_field('post_author') );
|
||||
array_push($authors, $post_author);
|
||||
}
|
||||
|
||||
$authors = join(', ', $authors);
|
||||
?>
|
||||
<li class="meta-author"></span><i class="icon-user" aria-hidden="true"></i><?php echo $authors ?></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( 'date' === $section ) { ?>
|
||||
<li class="meta-date"<?php oceanwp_schema_markup( 'publish_date' ); ?>><span class="screen-reader-text"><?php esc_html_e( 'Post published:', 'oceanwp' ); ?></span><i class="icon-clock" aria-hidden="true"></i><?php echo get_the_date(); ?></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( 'mod-date' === $section ) { ?>
|
||||
<li class="meta-mod-date"<?php oceanwp_schema_markup( 'modified_date' ); ?>><span class="screen-reader-text"><?php esc_html_e( 'Post last modified:', 'oceanwp' ); ?></span><i class="icon-note" aria-hidden="true"></i><?php echo esc_html( get_the_modified_date() ); ?></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( 'categories' === $section ) { ?>
|
||||
<li class="meta-cat"><span class="screen-reader-text"><?php esc_html_e( 'Post category:', 'oceanwp' ); ?></span><i class="icon-folder" aria-hidden="true"></i><?php the_category( ' <span class="owp-sep">/</span> ', get_the_ID() ); ?></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( 'reading-time' === $section ) { ?>
|
||||
<li class="meta-cat"><span class="screen-reader-text"><?php esc_html_e( 'Reading time:', 'oceanwp' ); ?></span><i class="icon-cup" aria-hidden="true"></i><?php echo esc_attr( ocean_reading_time() ); ?></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( 'comments' === $section && comments_open() && ! post_password_required() ) { ?>
|
||||
<li class="meta-comments"><span class="screen-reader-text"><?php esc_html_e( 'Post comments:', 'oceanwp' ); ?></span><i class="icon-bubble" aria-hidden="true"></i><?php comments_popup_link( esc_html__( '0 Comments', 'oceanwp' ), esc_html__( '1 Comment', 'oceanwp' ), esc_html__( '% Comments', 'oceanwp' ), 'comments-link' ); ?></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
|
||||
<?php do_action( 'ocean_after_single_post_meta' ); ?>
|
||||
@@ -0,0 +1,11 @@
|
||||
<div class="store-block py-5">
|
||||
<p class="title text-center"><strong>Download</strong> the Float app now.</p>
|
||||
<div class="download-btn-wrapper d-flex flex-wrap justify-content-around mx-auto">
|
||||
<a class="mx-2 mb-2" href="https://smart.link/afcjz898yquo8" target="_blank">
|
||||
<img src="https://blog.float.sg/wp-content/themes/float/images/google.svg" alt="google-img">
|
||||
</a>
|
||||
<a class="mx-2 mb-2" href="https://smart.link/afcjz898yquo8" target="_blank">
|
||||
<img src="https://blog.float.sg/wp-content/themes/float/images/apple.svg" alt="apple-img">
|
||||
</a>
|
||||
</div>
|
||||
</div><!-- store-block -->
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="subscribe-form-wrapper bgc-gray d-flex justify-content-center">
|
||||
<form class="subscribe-form" id="subscribe-form" method="POST" data-action="/newsletter-subscribe">
|
||||
<h2 class="text-center">Think we're onto something? Sign-up for Float</h3>
|
||||
<div class="mb-4">
|
||||
<input type="text" name="name" id="name" value="" placeholder="Name">
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<input type="email" name="email" id="email" value="" placeholder="Email">
|
||||
</div>
|
||||
<div class="form-msg-block mb-4"></div>
|
||||
<div class="text-center">
|
||||
<button type="submit" id="subscribe-button" class="subscribe-button">Sign-up</button>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- subscribe-form -->
|
||||
Reference in New Issue
Block a user