GithubHelp home page GithubHelp logo

gilbertobotaro / wp-bootstrap-4-comment-walker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bourafai/wp-bootstrap-4-comment-walker

0.0 0.0 0.0 11 KB

A custom WordPress comment walker class to implement the Bootstrap 4 Media object in wordpress comment list.

License: GNU General Public License v2.0

PHP 100.00%

wp-bootstrap-4-comment-walker's Introduction

wp-bootstrap-4-comment-walker

A custom WordPress comment walker class, to implement the Bootstrap 4 (Alpha) Media object in wordpress comments list.

for Demo with some css here on codepen

Installation and Usage

If you haven't already add the HTML5 theme support for comment list, add this first in your functions.php

function custom_theme_setup() {
    add_theme_support( 'html5', array( 'comment-list' ) );
}
add_action( 'after_setup_theme', 'custom_theme_setup' );

Place class-wp-bootstrap-comment-walker.php in your WordPress theme folder /wp-content/your-theme/

Open your WordPress themes comments.php file /wp-content/your-theme/comments.php and add this snippet if of code if you don't find it.

<ol class="medias py-md-5 my-md-5 px-sm-0 mx-sm-0">
<?php 
  require_once('class-wp-bootstrap-comment-walker.php');

  wp_list_comments( array(
      'style'         => 'ol',
      'max_depth'     => 4,
      'short_ping'    => true,
      'avatar_size'   => '50',
      'walker'        => new Bootstrap_Comment_Walker(),
  ) );
?>
</ol>

wp-bootstrap-4-comment-walker's People

Contributors

bourafai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.