ThemeShaper Forums » Thematic

[closed]

Question about "the loop"

(2 posts)
  • Started 2 years ago by drewdavid
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. Hi there. I'd like to create an effect where the post title and meta has a background that comes from the left edge of the page and surrounds it, but I'm a novice with this sort of thing.

    I'd like to add a div around the post title and meta to accomplish this, but I'm unclear where this is found. It seems that "the loop" is being called, does this get created in archives.php?

    Thanks I would love to hear some helpful advice on achieving this effect. My other stumbling block is that the title and meta divs are inside the content div, but this background would (again) travel all the way to the edge of the page.

    I hope this makes sense. You can see how I'm doing so far at http://24hrknight.com

    Thanks!

    Posted 2 years ago #
  2. if you look at the index.php you'll see that "the loop" is being created by the thematic_indexloop() function/hook. then if you go digging around in the extensions folder (the meat and potatoes) you'll find this function in content-extensions.php. turns out it is a hook, since it is defined as

    function thematic_indexloop() {
    	do_action('thematic_indexloop');
    } // end thematic_indexloop

    later on in the same file you'll see that thematic_index_loop() is added to this hook and it is, in fact, this function that creates the loop.

    keep in mind that you don't want to go hacking around in this file, but it sure helps to see what you should be doing in your own functions.php to make changes.

    for instance you could either copy the entire thematic_index_loop() function into your child theme and rename it childtheme_override_index_loop(). or you could take note of the thematic_abovepost() and thematic_belowpost() hooks that are in the loop and see if adding something to those might be enough.

    if you need help understanding how to add something take a look at this post i wrote:
    http://forums.themeshaper.com/topic/need-help-understanding-actions-vs-filters-and-changing-post-meta-and-utility#post-22638

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.