Forum Replies Created
-
AuthorPosts
-
SirTzusky
MemberThank you Chris, Works great!
SirTzusky
MemberThank you for your answer. I just take a look on other child themes from Genesis. It seems that none of them use title attribute on loops...that's odd...
SirTzusky
MemberHi Victor,
Thank you for your answer.
Yes, I'm referring to the image title attribute. Not the post title (this I remove on purpose).Can you tell me more specifically how I use the wp_get_attachment_image function to display the title attribute in the above child_grid_loop function? My WordPress/Genesis knowledge is not that good.
Thank you in advance,
GabrielSirTzusky
MemberThanks again Davinder.
Unfortunately, I already try it and don't work for me. Soon I will start working on a new theme similar to the one I have problems and I hope in the process I will be more focus and see if I do something wrong.
Regards,
GabrielSirTzusky
MemberThanks for your response. It seems that I was not properly understood. I know how to add different images.
The “Genesis / Theme Settings / Content Archives” settings affect all the loops on my website including the image size. And I don't want that, because I want different image sizes for different loops. So I need to find a way to deactivate the “Genesis / Theme Settings / Content Archives” settings.
April 23, 2015 at 1:36 pm in reply to: Different image for mobile/tablet devices in custom loop #148923SirTzusky
MemberI can work this out if someone can help me to change with code (in functions.php) the settings from the backend "Genesis / Theme Settings / Content Archives" ? For example the image size I want to be different than the one in the backend.
April 16, 2015 at 1:36 pm in reply to: Different image for mobile/tablet devices in custom loop #148153SirTzusky
MemberAnyone?
April 14, 2015 at 9:18 am in reply to: Different image for mobile/tablet devices in custom loop #147866SirTzusky
MemberJust to make it clear:
I know how to use image sizes in WordPress. But I find it difficult to display different featured images for mobile devices in a custom loop with Genesis. I use a plugin to display different child theme for mobile devices, but everything I change in my loop the size of the image doesn't change. Below is the code I use for and works great for PC, but when I change grid-thumbnail with mobile-thumbnail, the image doesn't change (I have regenerate the images, so the 300x188 image is there) .
//* Add support for Genesis Grid Loop remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'child_grid_loop' ); function child_grid_loop() { //* Global vars global $_genesis_loop_args; //* Parse args $args = apply_filters( 'genesis_grid_loop_args', wp_parse_args( $args, array( 'grid_image_size' => 'grid-thumbnail', 'grid_image_class' => 'alignleft', 'grid_content_limit' => 0, 'more' => '', ) ) ); //* What page are we on? $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; //* Set global loop args $_genesis_loop_args = $args; //hooks and filters for remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); add_action( 'genesis_entry_header', 'genesis_do_post_image', 8 ); remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); remove_action( 'genesis_entry_content', 'genesis_do_post_content_nav', 12 ); remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); remove_action( 'genesis_entry_content', 'genesis_do_post_content_nav', 12 ); remove_action( 'genesis_entry_content', 'genesis_do_post_permalink', 14 ); remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 ); remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 ); remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); //* The loop genesis_standard_loop(); //* Reset loops //genesis_reset_loops(); remove_filter( 'post_class', 'genesis_grid_loop_post_class' ); remove_action( 'genesis_post_content', 'genesis_grid_loop_content' ); remove_action( 'genesis_entry_content', 'genesis_grid_loop_content' ); }
Has something to do with the global $_genesis_loop_args; ?
Above is the main Loop. And I have template pages where I use custom_genesis_loop to display what I want.
Any ideas?
Thank you.SirTzusky
MemberI solve this out thanks to this post: http://www.studiopress.community/topic/how-to-get-rid-of-entry-content-div/
Here is the code:
add_filter( 'genesis_attr_entry', 'prefix_attributes_entry_content', 15 ); function prefix_attributes_entry_content( $attributes ) { unset( $attributes['class'] ); unset( $attributes['itemprop'] ); unset( $attributes['itemtype'] ); unset( $attributes['itemscope'] ); //* Blog posts microdata if ( 'post' === get_post_type() ) { $attributes['class'] = join( ' ', get_post_class() ); $attributes['itemtype'] = 'http://schema.org/BlogPosting'; //* If main query, if ( is_main_query() ) $attributes['itemprop'] = 'blogPost'; } return $attributes; }
SirTzusky
MemberSo, I am here:
-Has something to do with the schema.org microdata
-Found the code below here within genesis/lib/functions/markup.php
My question is: How do I change the code so I can get rid of title markup or what is that above the loop on pages?
Here is the print screen again.add_filter( 'genesis_attr_entry', 'genesis_attributes_entry' ); /** * Add attributes for entry element. * * @since 2.0.0 * * @param array $attributes Existing attributes. * * @return array Amended attributes. */ function genesis_attributes_entry( $attributes ) { $attributes['class'] = join( ' ', get_post_class() ); $attributes['itemscope'] = 'itemscope'; $attributes['itemtype'] = 'http://schema.org/CreativeWork'; //* Blog posts microdata if ( 'post' === get_post_type() ) { $attributes['itemtype'] = 'http://schema.org/BlogPosting'; //* If main query, if ( is_main_query() ) $attributes['itemprop'] = 'blogPost'; } return $attributes; }
P.S.: I'm a newbie on working with Genesis, microdata etc 🙂 I hope that someone can help me. Thank you.
SirTzusky
MemberHas something to do with the schema.org microdata. (I don't have any plugin installed that add schema.org microdata).
Here are the print screen examples again:
-
AuthorPosts