Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<?php
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
#load parent style
function my_theme_enqueue_styles() {
wp_enqueue_style( 'child-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
#load child theme
wp_enqueue_style(
'child-style',
get_stylesheet_directory_uri() . '/style.css',
array('parent-style')
);
}

// 2020Keywords: overriding this function from inc/template-tags.php to:
Expand All @@ -17,20 +24,20 @@ function responsiveblogily_posted_on() {
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
}

# generate time tag
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);

#generate link of posted on xxx
$posted_on = sprintf(
/* translators: %s: post date. */
esc_html_x( 'Posted on %s', 'post date', 'responsiveblogily' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
);

#clear author information
$byline = "";
// $byline = sprintf(
// /* translators: %s: post author. */
Expand All @@ -41,9 +48,11 @@ function responsiveblogily_posted_on() {
// Tags link — modified from twentytwenty theme's get_post_meta() function
if ( has_tag() ) {
?>
<div class="tagcloud tag-right">
<!-- <div class="tagcloud tag-right"> -->
<span class="tagcloud tag-right">
<?php the_tags( 'Tags: ', ', ', '' ); ?>
</div>
<!-- </div> -->
</span>
<?php

}
Expand Down
12 changes: 6 additions & 6 deletions template-parts/content-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
/* 2020Keywords: adding part of speech form field data
Print the part of speech value if exists
*/
$pos = get_post_meta( $post->ID, 'part_of_speech__optional_', true );
$pos = get_post_meta( get_the_ID(), 'part_of_speech__optional_', true );
if ( ! empty ( $pos ) && $pos != -1 ) :
?>
<div class="custom-fields cf-pos">
<?php printf( '%s.', $pos ); ?>
<?php printf( '%s.', esc_html( $pos ) ); ?>
</div>
<?php endif; ?>

Expand All @@ -45,11 +45,11 @@
/* 2020Keywords: adding usage form field data
Print the usage value if exists
*/
$usage = get_post_meta( $post->ID, 'usage__optional_', true );
$usage = get_post_meta( get_the_ID(), 'usage__optional_', true );
if ( ! empty ( $usage ) ) :
?>
<div class="custom-fields cf-usage">
<?php printf( '"%s"', $usage ); ?>
<?php printf( '"%s"', esc_html( $usage ) ); ?>
</div>
<?php endif; ?>

Expand Down Expand Up @@ -84,9 +84,9 @@
<?php echo do_shortcode('[posts_like_dislike]');?>
</div>

</div><!-- .entry-content -->

<?php
endif; ?>

</div><!-- .entry-content -->

</article><!-- #post-<?php the_ID(); ?> -->
8 changes: 4 additions & 4 deletions template-parts/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
/* 2020Keywords: adding part of speech form field data
Print the part of speech value if exists
*/
$pos = get_post_meta( $post->ID, 'part_of_speech__optional_', true );
$pos = get_post_meta( get_the_ID(), 'part_of_speech__optional_', true );
if ( ! empty ( $pos ) && $pos != -1 ) :
?>
<div class="custom-fields cf-pos">
<?php printf( '%s.', $pos ); ?>
<?php printf( '%s.', esc_html( $pos ) ); ?>
</div>
<?php endif; ?>

Expand All @@ -44,11 +44,11 @@
/* 2020Keywords: adding usage form field data
Print the usage value if exists
*/
$usage = get_post_meta( $post->ID, 'usage__optional_', true );
$usage = get_post_meta( get_the_ID(), 'usage__optional_', true );
if ( ! empty ( $usage ) ) :
?>
<div class="custom-fields cf-usage">
<?php printf( '"%s"', $usage ); ?>
<?php printf( '"%s"', esc_html( $usage ) ); ?>
</div>
<?php endif; ?>

Expand Down