Simple Blog Card

Get OGP and display blog card.

Author:Katsushi Kawamori (profile at wordpress.org)
WordPress version required:5.0
WordPress version tested:6.5.2
Plugin version:2.24
Added to WordPress repository:12-11-2019
Last updated:21-04-2024
Rating, %:100
Rated by:3
Plugin URI:https://wordpress.org/plugins/simple-blog-car...
Total downloads:17 027
Active installs:2 000+
plugin download
Click to start download

Blog card

  • Generated with shortcode
  • Generated with block
  • Can specify the number of characters displayed in the description.
  • Displays an ogp image.
  • Can specify the size of the displayed ogp image.
  • Can change the title and description.

How it works

Customize

  • Template files allow for flexible customization.
  • The default template file is template/simpleblogcard-template.php. Using this as a reference, you can specify a separate template file using the filters below.
/** ==================================================
 * Filter for template file.
 *
 */
add_filter(
    'simple_blog_card_generate_template_file',
    function () {
        $wp_uploads = wp_upload_dir();
        $upload_dir = wp_normalize_path( $wp_uploads['basedir'] );
        $upload_dir = untrailingslashit( $upload_dir );
        return $upload_dir . '/tmp/simpleblogcard-template.php';
    },
    10,
    1
);
  • CSS files can be set separately. Please see the filters below.
/** ==================================================
 * Filter for CSS file.
 *
 */
add_filter(
    'simple_blog_card_css_url',
    function () {
        $wp_uploads = wp_upload_dir();
        $upload_url = $wp_uploads['baseurl'];
        if ( is_ssl() ) {
            $upload_url = str_replace( 'http:', 'https:', $upload_url );
        }
        $upload_url = untrailingslashit( $upload_url );
        return $upload_url . '/tmp/simpleblogcard.css';
    },
    10,
    1
);

Screenshots
FAQ
ChangeLog