Tagged: Post Formats
In Genesis Sample I am using Post Formats, I followed this guide: http://my.studiopress.com/snippets/post-formats/
you can disable the URL link and ALT info on icon? In practice, I would like to display only the icon, without link and alt.
I found this snippet of code in the file themes/genesis/lib/structure/post.php
//* Get post format $post_format = get_post_format(); //* If post format is set, look for post format image if ( $post_format && file_exists( sprintf( '%s/images/post-formats/%s.png', CHILD_DIR, $post_format ) ) ) printf( '<a href="%s" title="%s" rel="bookmark"><img src="%s" class="post-format-image" alt="%s" /></a>', get_permalink(), the_title_attribute( 'echo=0' ), sprintf( '%s/images/post-formats/%s.png', CHILD_URL, $post_format ), $post_format ); //* Else, look for the default post format image elseif ( file_exists( sprintf( '%s/images/post-formats/default.png', CHILD_DIR ) ) ) printf( '<a href="%s" title="%s" rel="bookmark"><img src="%s/images/post-formats/default.png" class="post-format-image" alt="%s" /></a>', get_permalink(), the_title_attribute( 'echo=0' ), CHILD_URL, 'post' ); }
I did a lot of attempts but I can not disable links and alt.
But I do not want to touch the core of Genesis. Maybe you can use a hook in the child theme?
Thanks for any help
Since there is not a filter or action within the Genesis core callback, the default callback will have to be removed and a new custom callback will have to be attached in it’s place. Try the code below;
I used the code, it works wonderfully
Thank you very much
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.