ThemeShaper Forums » Thematic

[closed]

moving entry date outside post

(4 posts)
  • Started 3 years ago by AnotherAndrew
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. AnotherAndrew
    Member

    I have an index or category or archive page where I want to float just the meta-entry-date div outside of the excerpt.

    I want to do this so that I can put a border on the div that would then contain the meta-entry date. It would look like the bottom portion of this page: http://www.mgrear.com/cnspub/vatican-news.php

    My current thematic page looks like this:
    http://www.mgrear.com/cnspub/blog/

    I am using the excerpt tag to achieve this, but as you can tell the meta-entry-date span is inside the post.

    So, essentially I would need to create two divs, one that would contain the entry-title and the excerpt in the entry-content div and the other div to just contain the entry-date that is currently in a span.

    And this would allow me to float them.

    Banging my head on the desk trying to figure this out!

    Does anyone have a suggestion?

    Posted 3 years ago #
  2. go into the library/extensions/content-extensions.php file.

    copy the thematic_indexloop() function into your child's functions.php

    rename the function childtheme_override_indexloop()

    now play with the markup until you get what you want.

    Posted 3 years ago #
  3. AnotherAndrew
    Member

    helgatheviking,

    OK. I did that and came up with the following.

    However, it seems that want I really want to edit is the order in "<?php thematic_content(); ?>"

    Where do I find how to do this?

    // CNS theme index page, first post full content, then excerpts
    function remove_thematic_index_loop() {
    remove_action ('thematic_indexloop','thematic_index_loop');
    }
    add_action('init','remove_thematic_index_loop');

    function fullfirst_index_loop () {
    global $options;
    foreach ($options as $value) {
    if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; }
    else { $$value['id'] = get_option( $value['id'] ); }
    }

    /* Count the number of posts so we can insert a widgetized area */ $count = 1;
    while ( have_posts() ) : the_post() ?>
    <div class="post-listings">

    <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
    <?php thematic_postheader(); ?>
    <div class="entry-content"><?php

    if ((is_home() || is_front_page()) && ($count > 1 || is_paged())) {
    echo apply_filters('thematic_post', the_excerpt());
    }
    else {
    thematic_content();
    }

    ?>
    <?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
    </div>
    </div><!-- .post-listings -->
    <?php thematic_postfooter(); ?>
    </div><!-- .post -->

    <?php comments_template();

    if ($count==$thm_insert_position) {
    get_sidebar('index-insert');
    }
    $count = $count + 1;
    endwhile;
    }
    add_action('thematic_indexloop', 'fullfirst_index_loop');

    Posted 3 years ago #
  4. hmmm.... first off, you no longer have to remove an action from the thematic_indexloop and then add a new one. you can simply rename your fullfirst_index_loop() to childtheme_override_index_loop()

    if you want to edit thematic_content you'd follow the same procedure. copy it to your functions.php and rename it to the override version thereof. you could also filter the $post variable seen in the thematic_content function via the thematic_post filter. (note the apply_filters('thematic_post',$post); bit at the end of the function)

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.