modifying the HTML source of loops

Community Forums Forums Design Tips and Tricks modifying the HTML source of loops

This topic is: not resolved

Tagged: 

This topic contains 7 replies, has 3 voices, and was last updated by  jdingman 1 year, 6 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #21393

    jdingman
    Participant
    Post count: 31

    So when viewing the archives of a tag, it has the normal title, content, image, etc.

    How can I customize the source of that output?

    My goal is what I want to add special code around the links that the title is using and add other code around the loop.

    Would I need to use a completely customized loop to do it?  If so, how would I view what the current loop is producing so I can copy it and customize it?

     

    Thank you


    Learn more about Genesis.

    WordPress News, tips, and tricks – WPForce.com

    #21415

    Christopher Harris
    Participant
    Post count: 46

    You can hook into elements in the loop. See the hook reference section ‘loop action hooks’: http://my.studiopress.com/docs/hook-reference/

    Also, this visual hook guide is handy: http://genesistutorials.com/visual-hook-guide/


    WordPress Consultant and Genesis Developer http://wpattendant.com

    #21444

    jdingman
    Participant
    Post count: 31

    Hi Christopher,

    I tried looking at genesis_post_title as a hook, but in my testing I wasn’t able to modify the HTML.

    Do you have any examples I could see?


    Learn more about Genesis.

    WordPress News, tips, and tricks – WPForce.com

    #21625

    Christopher Harris
    Participant
    Post count: 46

    I do not have any code examples at the moment, but check out Bill Erickson’s code snippets for Genesis. He has many helpful bits… http://www.billerickson.net/code/


    WordPress Consultant and Genesis Developer http://wpattendant.com

    #22634

    wpsmith
    Moderator
    Post count: 178

    Hello Jonathan,

    The question is quite vague as to your needs. However, this should help you get you on your way:


    Travis Smith | Recommended StudioPress Developer & Contributor
    WP Smith | @wp_smith | GitHub

    Due to the forums, please paste code using Pastebin, JS Fiddle (for JavaScript) or GitHub.
    How to use Firebug for Designers by SixRevisions

    #22761

    jdingman
    Participant
    Post count: 31

    Thanks Travis, that should definitely help.

    I’ll play around with it and see what I can do.

    Question actually, is there a place I can view all the options to modify the $title and those variables?  I’m not sure what I have available to modify.


    Learn more about Genesis.

    WordPress News, tips, and tricks – WPForce.com

    #22820

    jdingman
    Participant
    Post count: 31

    I’m a little confused about this as well,

    function wps_tag_post_title_text( $title ) {
    // do something
    return $title;
    }

    How do I modify what the actual HTML for the top HTML is of a title?
    I’m trying to implement Schema.org data into my page, that’s what I’m trying to modify the HTML for.


    Learn more about Genesis.

    WordPress News, tips, and tricks – WPForce.com

    #22821

    jdingman
    Participant
    Post count: 31

    For example, if I have this HTML:

    <div class=”post-3984 person type-person status-publish hentry entry”>

    <h2 class=”entry-title”><a href=”http://v3./person/brian-gardner/” title=”Brian Gardner” rel=”bookmark”>Brian Gardner</a></h2>

    <div class=”entry-content”>

    <div class=”post-info”><span class=”date published time” title=”2013-01-17T00:11:50+00:00″>January 17, 2013</span> By <span class=”author vcard”><span class=”fn”><a href=”http://v3./author/jonathan/” class=”fn n” title=”Jonathan Dingman” rel=”author”>Jonathan Dingman</a></span></span> <span class=”post-comments”><a href=”http://v3./person/brian-gardner/#comments“>20 Comments</a></span> <a class=”post-edit-link” href=”http://v3./wp-admin/post.php?post=3984&amp;action=edit” title=”Edit Person”>(Edit)</a></div><p>My name is Brian Gardner and I created this site. Call it a playground, of sorts, for my mind to unravel itself into paragraph form. I love to write. In fact, I’ve always loved to write. When I was younger, it was an exit strategy — a way to let go of reality and enter a world that meant peace.</p>

    </div><!– end .entry-content –>

    I want to edit almost every tag so I can manually add stuff, like itemscope and itemprop all the along the way.


    Learn more about Genesis.

    WordPress News, tips, and tricks – WPForce.com

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.