Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ediamin/wp-bootstrap-comment-walker

A custom WordPress comment walker class to implement the Bootstrap 3 Media object in wordpress comment list.
https://github.com/ediamin/wp-bootstrap-comment-walker

Last synced: 3 days ago
JSON representation

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

Awesome Lists containing this project

README

        

wp-bootstrap-comment-walker
======================

**A custom WordPress comment walker class to implement the [Bootstrap 3 Media object](http://getbootstrap.com/components/#media) in wordpress comment list.**

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

```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 in this file you should see a snippet like this:

```php


    'ol',
    'short_ping' => true,
    'avatar_size' => 56,
    ) );
    ?>

```
The above snippet copied from the comments.php of twentyfifteen theme. Now replace the similar code in your `comments.php` with this following code:
```php

    'ul',
    'short_ping' => true,
    'avatar_size' => '64',
    'walker' => new Bootstrap_Comment_Walker(),
    ) );
    ?>

```