templates - Wordpress comments children customization to work with bootstrap? -


i have been searching whole day how customize comments template on wordpress. im working on new wordpress theme , trying build using bootstrap. @ end comment template got me stuck.

i never liked how wordpress customize comments , pain customize it, , twitter bootstrap have nice comment nesting using media list.

but problem wordpress use different nesting children comments.

what have rendering on template this

<div id=comments">    <ul class="media-list">       <li id="comment-124" class="media">          <div class="avatar pull-left">            avatar image          </div>          <div class="media-body">             <div class="media-heading">                comment info time when posted             </div>             <p> comment text </p>          </div>       </li>       <ul class="children">          , children comment template replies       </ul>    </ul> </div> 

what twitter bootstrap use children comments nested inside main comment this

<ul class="media-list">    <li class="media">       <a class="pull-left" href="#">         <img class="media-object" data-src="holder.js/64x64">       </a>       <div class="media-body">          <h4 class="media-heading">media heading</h4>          ...           <!-- nested media object -->          <div class="media">          ...          </div>       </div>    </li> </ul> 

what need change ul="children" load inside media-body class

while searching solution came across explanations wordpress here uses walker_comment class customize comments template , there inside when try change or of own customization nothing happens.

does have explanation how fix this?

i think misunderstanding workflow both wordpress , bootstrap.

wordpress no nesting on comments per se. ( see remark below )

bootstrap kind of styling framework has no nesting per se.

your theme , , changes every theme, (but did not specify theme ..)

to edit , open comments.php template file , style anyhow want .

what functions called template tags or in specific case , comments template tags ( link )

in code , part wrote avatar image produced function

get_avatar() codex link

and comment date (surprise surprise ) :

comment_date() codex link

the comment text produced ( ready surprised again ) :

comment_text() codex link

and on ..

now , should consider using child theme if instead of editing theme directly.

now , after clearing , wordpress have kind of nesting function natively , explained, not magic-does-all function, depends on how theme made . these settings can found under admin -> settings -> discussion

there find

enable threaded (nested) comments 10 levels deep (nesting) 

and

break comments pages 50 comments per page (pagination) 

..and other settings ( depending on wp version ) ..

that being said - there lot of bootstrap "empty" or "started" themes work (or @ least understanding why approach bit wrong )

for example :

http://wordpress.org/extend/themes/the-bootstrap

https://github.com/facens/wpbootstrap

http://bootstrapwp.rachelbaker.me/

http://braginteractive.com/bootstrap/

https://github.com/enile8/bootstrap-for-wordpress

http://320press.com/wpbs/features/

and list 10 or 20 more , think in case , giybf..


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -