Skip to content

Override inc/template-tags.php #467

Answered by crftwrk
mstudio-dev asked this question in Q&A
Discussion options

You must be logged in to vote

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')) : and endif;. Copy snippet to your child's functions.php and edit as you want. So, this is your code:

  /**
   * 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">
   …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mstudio-dev
Comment options

Answer selected by mstudio-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #466 on April 29, 2023 10:11.