Forum Replies Created
-
AuthorPosts
-
September 26, 2014 at 11:38 am in reply to: Adding tags, categories in Genesis child theme pages #125838MarcyParticipant
I left a > out of this line:
echo '<footer class="entry-footer"><p class="entry-meta">';
Marcy | Amethyst Website Design | Twitter
September 26, 2014 at 11:11 am in reply to: Adding tags, categories in Genesis child theme pages #125832MarcyParticipantYou may want to post a new thread asking how to filter genesis_post_meta to include pages; this function excludes pages.
I get in a loop. But Genesis IS WordPress, so I post that below.The plugin works fine adding categories and tags to pages. It also adds them to the queries. That's all it does; it's your job to add them to your templates.
The pages should display along with the posts using a normal Genesis category page.
http://my.studiopress.com/tutorials/category-blog-page/
Or you can use a custom template as Kellylise suggests.If you just want the tags and categories on the bottom of your pages, you can add this to your functions.php:
//* Customize the entry meta in the entry footer (requires HTML5 theme support) add_action('genesis_entry_footer', 'custom_page_post_meta'); function custom_page_post_meta() { if ( 'page' === get_post_type() ) { $cats = get_the_category_list( $before = '', $sep = ', ', $after = '', $post_id ); $tags = get_the_tag_list( $before = '', $sep = ', ', $after = '', $post_id ); if ( $cats || $tags ) { echo '<footer class="entry-footer"><p class="entry-meta"'; if ($cats) { echo '<span class="entry-categories">Filed Under: ' . get_the_category_list( ', ', $post_id ) . '</span>'; } if ($tags) { echo '<span class="entry-tags">Tagged With: ' . $tags . '</span>'; } echo '</p></footer>'; } } }
Or you can use the wpsites single.php template, as Kellylise suggests. Just add the part between the if ('page'...) brackets.
Marcy | Amethyst Website Design | Twitter
MarcyParticipantYou can comment out your custom avatar function, and add this line.
$args['avatar_size'] = 96;
to my first function above this line.
$args['callback'] = 'custom_comment_callback_no_date';
The resolution of the gravatars is a whole different thing right now. 🙂
Are you looking at the blurry 48px gravatar on a computer screen with retina display?
The 96px allows for 2X resolution when displayed at 48px.The 48px display should be in your style.css.
Marcy | Amethyst Website Design | Twitter
September 26, 2014 at 9:45 am in reply to: Please help …Confounded by Lifestyle Pro header Image problem #125826MarcyParticipantI use Chrome Developer Tools. Just right-click on your screen, and choose Select Element. If your dev tools are not turned on, you can search for how to do that. You can also use Firebug in Firefox (I use it too.) Here is a tutorial
Yes, as the screen size narrows, your header image narrows, and then the height narrows too, so the gap will appear again. You can keep it from happening for standard screen sizes, by adjusting the height in the media queries.
But there is a better method to do the whole thing.
Remove this:.site-header { max-height: 187px; }
and instead add
.site-header img { vertical-align: bottom; }
That will keep the image always aligned at the bottom with the menu. I can't try it out very well, but that should do it without the height set.
Marcy | Amethyst Website Design | Twitter
September 26, 2014 at 1:21 am in reply to: Adding tags, categories in Genesis child theme pages #125782MarcyParticipantMarcyParticipantFind
.entry-footer .entry-meta { border-top: 1px solid #eeeee8; margin: 0; padding: 32px 0 8px; }
and change the padding to your preference.
Marcy | Amethyst Website Design | Twitter
September 25, 2014 at 10:09 pm in reply to: Wide Screen color bars extended – Mobile Responsive #125763MarcyParticipantLeave the widths of .content and .sidebar alone. They work the way they are.
I can't see your site now, but you you may just not have a background-color on .nav-primary
.nav-primary { background-color: #ff0000; /* This is red; add your color here */ width: 100%; overflow: auto; /* add this if adding the background-color still doesn't show anything */ }
Marcy | Amethyst Website Design | Twitter
September 25, 2014 at 6:57 pm in reply to: Please help …Confounded by Lifestyle Pro header Image problem #125745MarcyParticipantYour image appears to be 187px tall.
If you add a max-height to .site-header, it should help:
.site-header { max-height: 187px; }
Marcy | Amethyst Website Design | Twitter
MarcyParticipantCan have a link to your site?
If not, then in the area you have the ad, change the padding and margin to 0.
You may want to do them like this:
margin: 30px 0; padding: 30px 0;
where 30px is the top and bottom margin and padding.
Marcy | Amethyst Website Design | Twitter
MarcyParticipantYes. Just be sure to place the share link on it's own line.
Look at the WordPress example here:
http://codex.wordpress.org/EmbedsJust do it like the section In a Nutshell.
Marcy | Amethyst Website Design | Twitter
September 25, 2014 at 6:23 pm in reply to: Wide Screen color bars extended – Mobile Responsive #125740MarcyParticipantYou have:
.site-container { max-width: 960px; } .site-container { margin: 0 auto; max-width: 1140px; }
Comment that all out and use:
.site-container { width: 100%; }
Then for your theme, below the .site-container, you would add:
.site-inner, .wrap { margin: 0 auto; max-width: 1140px; } .site-inner { clear: both; padding-top: 40px; }
Well, you can adjust the padding-top on .site-inner, if you don't need it.
Then you can style .site-header, .nav-primary, .footer-widgets for full-width. If needed, add
width: 100%;
to them.You will need to adjust your @media accordingly.
Marcy | Amethyst Website Design | Twitter
MarcyParticipantYes, it does this:
"but still links the comment date and still shows the time"because I didn't read your second line in your original post. I thought you only wanted to unlink the date. :-/
I've pasted the code again.
Cheers, Marcyadd_filter( 'genesis_comment_list_args', 'custom_comment_list_args' ); //* Filter the genesis_comment_list_args to add a custom callback function function custom_comment_list_args( $args ) { $args['callback'] = 'custom_comment_callback_no_date'; return $args; } function custom_comment_callback_no_date( $comment, array $args, $depth ) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> <article <?php echo genesis_attr( 'comment' ); ?>> <?php do_action( 'genesis_before_comment' ); ?> <header <?php echo genesis_attr( 'comment-header' ); ?>> <p <?php echo genesis_attr( 'comment-author' ); ?>> <?php echo get_avatar( $comment, $args['avatar_size'] ); $author = get_comment_author(); $url = get_comment_author_url(); if ( ! empty( $url ) && 'http://' !== $url ) { $author = sprintf( '<a href="%s" %s>%s</a>', esc_url( $url ), genesis_attr( 'comment-author-link' ), $author ); } /** * Filter the "comment author says" text. * * Allows developer to filter the "comment author says" text so it can say something different, or nothing at all. * * @since unknown * * @param string $text Comment author says text. */ $comment_author_says_text = apply_filters( 'comment_author_says_text', __( 'says', 'genesis' ) ); printf( '<span itemprop="name">%s</span> <span class="says">%s</span>', $author, $comment_author_says_text ); ?> </p> <p <?php echo genesis_attr( 'comment-meta' ); ?>> <?php printf( '<time %s>', genesis_attr( 'comment-time' ) ); echo esc_html( get_comment_date() ); echo '</time>'; edit_comment_link( __( '(Edit)', 'genesis' ), ' ' ); ?> </p> </header> <div <?php echo genesis_attr( 'comment-content' ); ?>> <?php if ( ! $comment->comment_approved ) : ?> <?php /** * Filter the "comment awaiting moderation" text. * * Allows developer to filter the "comment awaiting moderation" text so it can say something different, or nothing at all. * * @since unknown * * @param string $text Comment awaiting moderation text. */ $comment_awaiting_moderation_text = apply_filters( 'genesis_comment_awaiting_moderation', __( 'Your comment is awaiting moderation.', 'genesis' ) ); ?> <p class="alert"><?php echo $comment_awaiting_moderation_text; ?></p> <?php endif; ?> <?php comment_text(); ?> </div> <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'before' => sprintf( '<div %s>', genesis_attr( 'comment-reply' ) ), 'after' => '</div>', ) ) ); ?> <?php do_action( 'genesis_after_comment' ); ?> </article> <?php //* No ending </li> tag because of comment threading }
Marcy | Amethyst Website Design | Twitter
MarcyParticipantThe code you list is the same code section I posted above.
Did you try to paste the code I posted at the bottom of your functions.php?
What happened? Did it work?
Marcy | Amethyst Website Design | Twitter
MarcyParticipantSeptember 24, 2014 at 4:56 pm in reply to: Adding tags, categories in Genesis child theme pages #125596MarcyParticipantMarcyParticipantThere are plugins that allow you to add shortcodes around the content to control display on different devices.
Here are 2:
https://wordpress.org/plugins/so-visibility-classes/
https://wordpress.org/plugins/wp-mobile-detect/
Marcy | Amethyst Website Design | Twitter
MarcyParticipantUnfortunately, I don't think there is. I can't find a filter for either Genesis or WordPress.
You just have to add all the code to rewrite the line that adds the link around the date and time.But looking at his code and the genesis code, his code is for XHTML, not HTML5, so it needs to be modified.
Here is the code that does what you want. Just add it to the bottom of your functions.php.
add_filter( 'genesis_comment_list_args', 'custom_comment_list_args' ); //* Filter the genesis_comment_list_args to add a custom callback function function custom_comment_list_args( $args ) { $args['callback'] = 'custom_comment_callback_no_date'; return $args; } function custom_comment_callback_no_date( $comment, array $args, $depth ) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> <article <?php echo genesis_attr( 'comment' ); ?>> <?php do_action( 'genesis_before_comment' ); ?> <header <?php echo genesis_attr( 'comment-header' ); ?>> <p <?php echo genesis_attr( 'comment-author' ); ?>> <?php echo get_avatar( $comment, $args['avatar_size'] ); $author = get_comment_author(); $url = get_comment_author_url(); if ( ! empty( $url ) && 'http://' !== $url ) { $author = sprintf( '<a href="%s" %s>%s</a>', esc_url( $url ), genesis_attr( 'comment-author-link' ), $author ); } /** * Filter the "comment author says" text. * * Allows developer to filter the "comment author says" text so it can say something different, or nothing at all. * * @since unknown * * @param string $text Comment author says text. */ $comment_author_says_text = apply_filters( 'comment_author_says_text', __( 'says', 'genesis' ) ); printf( '<span itemprop="name">%s</span> <span class="says">%s</span>', $author, $comment_author_says_text ); ?> </p> <p <?php echo genesis_attr( 'comment-meta' ); ?>> <?php printf( '<time %s>', genesis_attr( 'comment-time' ) ); printf( '<a href="%s" %s>', esc_url( get_comment_link( $comment->comment_ID ) ), genesis_attr( 'comment-time-link' ) ); echo esc_html( get_comment_date() ) . '</a> ' . __( 'at', 'genesis' ) . ' ' . esc_html( get_comment_time() ); echo '</time>'; edit_comment_link( __( '(Edit)', 'genesis' ), ' ' ); ?> </p> </header> <div <?php echo genesis_attr( 'comment-content' ); ?>> <?php if ( ! $comment->comment_approved ) : ?> <?php /** * Filter the "comment awaiting moderation" text. * * Allows developer to filter the "comment awaiting moderation" text so it can say something different, or nothing at all. * * @since unknown * * @param string $text Comment awaiting moderation text. */ $comment_awaiting_moderation_text = apply_filters( 'genesis_comment_awaiting_moderation', __( 'Your comment is awaiting moderation.', 'genesis' ) ); ?> <p class="alert"><?php echo $comment_awaiting_moderation_text; ?></p> <?php endif; ?> <?php comment_text(); ?> </div> <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'before' => sprintf( '<div %s>', genesis_attr( 'comment-reply' ) ), 'after' => '</div>', ) ) ); ?> <?php do_action( 'genesis_after_comment' ); ?> </article> <?php //* No ending </li> tag because of comment threading }
Marcy | Amethyst Website Design | Twitter
MarcyParticipantThe easy way to remove BOTH the date and time is to add this below the comments section in style.css
.comment-meta {
display: none;
}If you really want to remove ONLY the time, you have to do two things:
- first filter the genesis_comment_list_args
- and then rewrite the genesis_comment_callback function with the get_comment_time part removed.
But I found this earlier forum post. Just copy all the code in the order written into your functions.php
Use the code in the post from stacyvlasits - http://www.studiopress.community/topic/using-simple-hooks-to-remove-comment-date/#post-25849
Marcy | Amethyst Website Design | Twitter
MarcyParticipantIt looks to me like you are creating that page content with an IDX plugin. That content is never pulled by Facebook that I am aware of.
It looks for the first "real" content that is on that page which is your sidebar.
You would need to add "real" content to that page. You can add it above or below your IDX code. Then that will be pulled by Facebook. You will also probably need to add a featured image for FB to use.
You only need to use a few sentences, and you would only need to do this for those pages with your featured listings.
Marcy | Amethyst Website Design | Twitter
MarcyParticipantI don't see any dates or times on that page.
The best method to use to customize your post info is to use the Genesis Simple Edits plugin.
https://wordpress.org/plugins/genesis-simple-edits/
If you need to know all the shortcodes you can use,
http://my.studiopress.com/docs/shortcode-reference/
Marcy | Amethyst Website Design | Twitter
-
AuthorPosts