WordPress.org

Forums

BuddyPress Activity Plus
[resolved] Link Image by default (2 posts)

  1. Qobalt
    Member
    Posted 11 months ago #

    Hi there !

    With few websites, any image thumbnail is available. So we check "no thumbnail".
    How can i add a default thumbnail instead of leaving a blank space in this case ?

    Thank for your tips coming !

    Best regards!

    https://wordpress.org/plugins/buddypress-activity-plus/

  2. WPMU DEV
    Member
    Posted 11 months ago #

    Hi @Qobalt,

    I hope you are well today and thank you for your question.

    You can display default thumbnail when there isn't any thumbnail available or if you check "no thumbnail" by copying the thumbnail image file in the root folder of your child theme and copying and editing BuddyPress Activity Plus template file in to your child theme as following.

    Plugin Template File:

    wp-content\plugins\buddypress-activity-plus\lib\forms\link_tag_template.php

    Edit the code in the above copied template file on line number 4 as following.

    Before Editing:

    <?php if ($image) { ?>

    After Editing:

    <?php $image = ( $image ) ? $image : get_stylesheet_directory_uri() . '/bpap-default-thumbnail.png'; ?>
    <?php if ($image) { ?>

    Best Regards,
    WPMU DEV

Reply

You must log in to post.

About this Plugin

  • BuddyPress Activity Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.