theMikeD

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • in reply to: How to I control the comment box items? #48961

    theMikeD
    Participant
    Post count: 20

    Dave, I never found a way. I had to toss the entire thing and re-do it for the sake of one colon. Dumb, but there you are.

    in reply to: How to I control the comment box items? #22438

    theMikeD
    Participant
    Post count: 20

    OK, I guess that is the solution. This can be marked as resolved.

    in reply to: Studiopress: it would be really handy if… #22437

    theMikeD
    Participant
    Post count: 20

    Beuller? Is this thing on?

    in reply to: How to I control the comment box items? #20024

    theMikeD
    Participant
    Post count: 20

    Maybe the only way is to copy out the genesis_comment_callback() function into my own functions.php, rename it, modify it to my needs, and then run a filter on genesis_comment_list_args to replace the callback entry with my custom one? That seems a bit heavy handed, but perhaps thats the only way. Is that considered correct wrt genesis code practice?


    theMikeD
    Participant
    Post count: 20

    Figured it out:

     

    if ( condition ) {
    remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
    add_action( ‘genesis_before_header’, ‘genesis_do_subnav’ );
    }

    in reply to: How do I disable the secondary menu? #12172

    theMikeD
    Participant
    Post count: 20

    OK, I did it in a backhanded way by doing this:

    add_theme_support( ‘genesis-menus’, array( ‘primary’ => __( ‘Primary Navigation Menu’, ‘genesis’ ) ) );

    IOW only defining the main menu.

    in reply to: Studiopress: it would be really handy if… #9861

    theMikeD
    Participant
    Post count: 20

    It would also be really handy if the code block used a monospace font and obeyed spacing done with tabs. Thanks x2!

    in reply to: Modifying the excerpt on a post list page #9860

    theMikeD
    Participant
    Post count: 20

    Ahh, an extra space killed me. This code does the trick:


    function md_add_dateline( $content ) {
    $d = the_date('',"", ": ", true);
    return str_replace ('',$p, $content);
    }
    add_filter( 'the_excerpt', 'md_add_dateline');

     

    in reply to: Modifying the excerpt on a post list page #9858

    theMikeD
    Participant
    Post count: 20

    function md_add_dateline( $content ) {
    return “HELLO”;
    }
    add_filter( ‘the_excerpt ‘, ‘md_add_dateline’);

     

    According to the docs, that should filter the excerpt and replace it with “HELLOO” but it does not. But once I figure it out, I think that’ll be the way to go.

    in reply to: Modifying the excerpt on a post list page #9848

    theMikeD
    Participant
    Post count: 20

    Geez, I hope not! There must be a way to filter the excerpt and insert the date in there!

    in reply to: How can I change the featured image size? #9847

    theMikeD
    Participant
    Post count: 20

    OK, if I tell genesis to use the large image in the UI, I can restrict the image size for smaller images in CSS. A dumb, clumsy, mobile-unfriendly solution but it doesn’t look like genesis has the ability to change this.

    in reply to: How can I change the featured image size? #9843

    theMikeD
    Participant
    Post count: 20

    Yes and no. I have already implemented the grid loop. But using a grid as an example, what I want is a full-size post first, then a grid under it. I think I may have solved it however…I’ll report back.

    in reply to: How can I change the featured image size? #9837

    theMikeD
    Participant
    Post count: 20

    Thanks for the reply. The size is already set up as part of wordpress, so I know that works. The goal is to be able to tell genesis to use the “large” size for the image.

    For example, in the genesis core file called post.php there exists the following:

    function genesis_do_post_image() {

    if ( ! is_singular() && genesis_get_option( ‘content_archive_thumbnail’ ) ) {
    $img = genesis_get_image( array( ‘format’ => ‘html’, ‘size’ => genesis_get_option( ‘image_size’ ), ‘attr’ => array( ‘class’ => ‘alignleft post-image’ ) ) );
    printf( ‘<a href=”%s” title=”%s”>%s</a>’, get_permalink(), the_title_attribute( ‘echo=0′ ), $img );
    }

    }

    If I change the highlighted to

    ‘size’ => ‘large’

    I get the behaviour I want…but for all posts, not just the first one. What I want is a way to say “Make a given post have the large size image”

    …Mike

    in reply to: My very simple custom loop isn't working. Help! #9810

    theMikeD
    Participant
    Post count: 20

    Hi Susan,

    I got it sorted out:

    remove_action(‘genesis_loop’, ‘genesis_do_loop’);
    add_action(‘genesis_loop’, ‘custom_featured_loop’);

    function custom_featured_loop (  ) {

    global $post;global $wp_query;

    $args = array(
    ‘paged’ => get_query_var( ‘paged’ ),
    ‘post_type’ => ‘bc_featured_entries’,
    );

    $wp_query = new WP_Query( $args );

    genesis_do_loop();
    }

    in reply to: Is this specific layout possible? #955

    theMikeD
    Participant
    Post count: 20

    Yes, I figured that much Sozo :)

    For the record, here is the code that does it:

     

    add_action( ‘genesis_before_content’, ‘md_get_upper_content’ );
    function md_get_upper_content() {
    echo “<div class=’upper-content’>”;
    remove_action( ‘genesis_after_post’, ‘genesis_get_comments_template’ );
    genesis_do_loop();
    echo “</div>”;
    }

    remove_action(‘genesis_loop’, ‘genesis_do_loop’);
    add_action(‘genesis_loop’, ‘custom_loop’);
    function custom_loop () {
    global $post, $wp_query;
    add_action( ‘genesis_after_post’, ‘genesis_get_comments_template’ ); // put back the comments we stripped earlier
    remove_action( ‘genesis_before_post_content’, ‘genesis_post_info’ ); // remove author etc
    remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ ); // remove meta
    remove_action( ‘genesis_post_title’,’genesis_do_post_title’ ); // remove post title
    remove_action( ‘genesis_post_content’, ‘genesis_do_post_content’ ); // removes content
    remove_action( ‘genesis_before_post_content’, ‘genesis_post_title’ ); // remove the title
    genesis_do_loop();
    }
    genesis();
    ?>

     

    eta: this would look better if either code option or the pre option were supported, but you get the idea.

    • This reply was modified 1 year, 8 months ago by  theMikeD.
    • This reply was modified 1 year, 8 months ago by  theMikeD.
    • This reply was modified 1 year, 8 months ago by  theMikeD.
    • This reply was modified 1 year, 8 months ago by  theMikeD.
    • This reply was modified 1 year, 8 months ago by  theMikeD.
    • This reply was modified 1 year, 8 months ago by  theMikeD.
Viewing 15 posts - 1 through 15 (of 15 total)