Override inc/template-tags.php #467
Answered
by
crftwrk
mstudio-dev
asked this question in
Q&A
-
How can i update-safe override in template-tags.php for instance |
Beta Was this translation helpful? Give feedback.
Answered by
crftwrk
Apr 29, 2023
Replies: 1 comment 1 reply
-
Thank you! This is a pluggable function. Check https://bootscore.me/documentation/functions/ how to use them. In conclusion, you have to grab all the code between the /**
* Displays an optional post thumbnail.
*
* Wraps the post thumbnail in an anchor element on index views, or a div
* element when on single views.
*/
function bootscore_post_thumbnail() {
if (post_password_required() || is_attachment() || !has_post_thumbnail()) {
return;
}
if (is_singular()) :
?>
<div class="post-thumbnail">
<?php the_post_thumbnail('full', array('class' => 'rounded mb-3')); ?>
</div><!-- .post-thumbnail -->
<?php else : ?>
<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1">
<?php
the_post_thumbnail('post-thumbnail', array(
'alt' => the_title_attribute(array(
'echo' => false,
)),
));
?>
</a>
<?php
endif; // End is_singular().
} Solved? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mstudio-dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!
This is a pluggable function. Check https://bootscore.me/documentation/functions/ how to use them.
In conclusion, you have to grab all the code between the
if (!function_exists('bootscore_post_thumbnail')) :
andendif;
. Copy snippet to your child'sfunctions.php
and edit as you want. So, this is your code: