Forum Replies Created
-
AuthorPosts
-
theMikeDParticipant
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.
theMikeDParticipantOK, I guess that is the solution. This can be marked as resolved.
theMikeDParticipantBeuller? Is this thing on?
theMikeDParticipantMaybe 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?
January 15, 2013 at 8:19 pm in reply to: How can I change which menu is displayed in the primary position? #12184theMikeDParticipantFigured it out:
if ( condition ) {
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_subnav' );
}theMikeDParticipantOK, 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.
theMikeDParticipantIt would also be really handy if the code block used a monospace font and obeyed spacing done with tabs. Thanks x2!
theMikeDParticipantAhh, 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');
theMikeDParticipantfunction 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.
theMikeDParticipantGeez, I hope not! There must be a way to filter the excerpt and insert the date in there!
theMikeDParticipantOK, 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.
theMikeDParticipantYes 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.
theMikeDParticipantThanks 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
theMikeDParticipantHi 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();
}theMikeDParticipantYes, 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.
-
AuthorPosts