Tagged: x
-
AuthorPosts
-
February 1, 2017 at 7:37 am #1353641
oga23ParticipantHi,
i found this code in some of your replies.function x_renew_entry_meta() { // // Author. // $author = sprintf( '<span>%s</span>', get_the_author() ); // // Date. // $date = sprintf( '<span><time class="entry-date" datetime="%1$s">%2$s</time></span>', esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date( 'm.Y' ) ) ); // // Categories. // if ( get_post_type() == 'x-portfolio' ) { if ( has_term( '', 'portfolio-category', NULL ) ) { $categories = get_the_terms( get_the_ID(), 'portfolio-category' ); $separator = ', '; $categories_output = ''; foreach ( $categories as $category ) { $categories_output .= '<a href="' . get_term_link( $category->slug, 'portfolio-category' ) . '" title="' . esc_attr( sprintf( __( "View all posts in: “%s”", '__x__' ), $category->name ) ) . '"> ' . $category->name . '</a>' . $separator; } $categories_list = sprintf( '<span>%s</span>', trim( $categories_output, $separator ) ); } else { $categories_list = ''; } } else { $categories = get_the_category(); $separator = ', '; $categories_output = ''; foreach ( $categories as $category ) { $categories_output .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in: “%s”", '__x__' ), $category->name ) ) . '">' . $category->name . '</a>' . $separator; } $categories_list = sprintf( '<span>%s</span>', trim( $categories_output, $separator ) ); } // // Comments link. // if ( comments_open() ) { $title = apply_filters( 'x_entry_meta_comments_title', get_the_title() ); $link = apply_filters( 'x_entry_meta_comments_link', get_comments_link() ); $number = apply_filters( 'x_entry_meta_comments_number', get_comments_number() ); if ( $number == 0 ) { $text = __( 'Leave a Comment' , '__x__' ); } else if ( $number == 1 ) { $text = $number . ' ' . __( 'Comment' , '__x__' ); } else { $text = $number . ' ' . __( 'Comments' , '__x__' ); } $comments = sprintf( '<span><a href="%1$s" title="%2$s" class="meta-comments">%3$s</a></span>', esc_url( $link ), esc_attr( sprintf( __( 'Leave a comment on: “%s”', '__x__' ), $title ) ), $text ); } else { $comments = ''; } // // Output. // if ( x_does_not_need_entry_meta() ) { return; } else { if(x_is_portfolio_item()): printf( '<p class="p-meta">%1$s%2$s</p>', $categories_list, $comments ); else: printf( '<p class="p-meta">%1$s%2$s%3$s%4$s</p>', $author, $date, $categories_list, $comments ); endif; } }But it is for the renew theme and when i change first line from renew to integrity, the icons for category and come are gone.
Can you please provide me with a code like this for the integrity stack?Much appriciated. Thanks.
February 1, 2017 at 7:47 am #1353654
ThaiModeratorHi There,
You don’t have to change the template file.
Please add the following CSS under Customizer > Custom > Global CSS:
.single-x-portfolio .p-meta span:nth-child(1), .single-x-portfolio .p-meta span:nth-child(2) { display: none; }Hope it helps 🙂
February 1, 2017 at 10:04 am #1353848
oga23Participantisn’t it beter(seo wise) to add some code to child theme? so something doesn’t have to be loaded in the first place and then being prevented from displaying via css afterwards?
css is pileing up on my site 😉thanks for your answer👍
February 1, 2017 at 10:06 am #1353849
oga23Participantisn’t it beter(seo wise) to add some code to child theme? so something doesn’t have to be loaded in the first place and then being prevented from displaying via css afterwards?
css is pileing up on my site 😉thanks for your answer👍
February 1, 2017 at 10:07 am #1353850
oga23Participantisn’t it beter(seo wise) to add some code to child theme? so something doesn’t have to be loaded in the first place and then being prevented from displaying via css afterwards?
css is pileing up on my site 😉thanks for your answer👍
February 1, 2017 at 10:09 am #1353853
oga23Participantisn’t it beter(seo wise) to add some code to child theme? so something doesn’t have to be loaded in the first place and then being prevented from displaying via css afterwards?
css is pileing up on my site 😉thanks for your answer👍
February 1, 2017 at 11:04 am #1353929
ThaiModeratorHi There,
In that case, please add the following code under functions.php file locates in your child theme:
function x_integrity_entry_meta() { // // Author. // global $post; $author = sprintf( '<span><a href="%s"><i class="x-icon-pencil" data-x-icon=""></i> %s</a></span>', get_author_posts_url($post->post_author), get_the_author() ); // // Date. // $date = sprintf( '<span><time class="entry-date" datetime="%1$s"><i class="x-icon-calendar" data-x-icon=""></i> %2$s</time></span>', esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); // // Categories. // if ( get_post_type() == 'x-portfolio' ) { if ( has_term( '', 'portfolio-category', NULL ) ) { $categories = get_the_terms( get_the_ID(), 'portfolio-category' ); $separator = ', '; $categories_output = ''; foreach ( $categories as $category ) { $categories_output .= '<a href="' . get_term_link( $category->slug, 'portfolio-category' ) . '" title="' . esc_attr( sprintf( __( "View all posts in: “%s”", '__x__' ), $category->name ) ) . '"><i class="x-icon-bookmark" data-x-icon=""></i> ' . $category->name . '</a>' . $separator; } $categories_list = sprintf( '<span>%s</span>', trim( $categories_output, $separator ) ); } else { $categories_list = ''; } } else { $categories = get_the_category(); $separator = ', '; $categories_output = ''; foreach ( $categories as $category ) { $categories_output .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in: “%s”", '__x__' ), $category->name ) ) . '"><i class="x-icon-bookmark" data-x-icon=""></i> ' . $category->name . '</a>' . $separator; } $categories_list = sprintf( '<span>%s</span>', trim( $categories_output, $separator ) ); } // // Comments link. // if ( comments_open() ) { $title = apply_filters( 'x_entry_meta_comments_title', get_the_title() ); $link = apply_filters( 'x_entry_meta_comments_link', get_comments_link() ); $number = apply_filters( 'x_entry_meta_comments_number', get_comments_number() ); $text = ( 0 === $number ) ? 'Leave a Comment' : sprintf( _n( '%s Comment', '%s Comments', $number, '__x__' ), $number ); $comments = sprintf( '<span><a href="%1$s" title="%2$s" class="meta-comments"><i class="x-icon-comments" data-x-icon=""></i> %3$s</a></span>', esc_url( $link ), esc_attr( sprintf( __( 'Leave a comment on: “%s”', '__x__' ), $title ) ), $text ); } else { $comments = ''; } // // Output. // if ( x_does_not_need_entry_meta() ) { return; } else { printf( '<p class="p-meta">%1$s%2$s</p>', $categories_list, $comments ); } }Hope it helps 🙂
February 1, 2017 at 11:46 am #1353989
oga23ParticipantYEs! it works like a charm! thank you soo much!
can you please advise how to close the gap on my homepage between h1 and h3? it is quite big so i can’t put averything in the screen on the bacground picture….
beta.mojzastopnik.sithank you.
February 1, 2017 at 2:41 pm #1354219
JadeModeratorHi there,
Please add the class mtn to the h3 element to close the gap.
Hope this helps.
February 1, 2017 at 10:30 pm #1354734
oga23Participantthat is amazing! thank you so much.
may i ask hpw did you make the title font thinner in the integrity demo 1? in the section below the revolution slider with the circle images? everything i try it does not work.
regards.
February 2, 2017 at 12:37 am #1354837
FriechModeratorHi There,
You mean the STACKS, EXPERTS, and CUSTOMIZER? You can add font-weight: 400; on the STYLE field of your headline or text element.
What font-family you’re using? Sometimes it depends on the font-family if it does have support for font-weight thin.
font-weight value is from 100 (thin) to 900 (bold)
Hope it helps, Cheers!
February 2, 2017 at 3:20 am #1354946
oga23Participanti am using raleway for titles, it has different weight values, but the code doesn’t help. i tried that. maybe the reponse-h man class is preventing it to change?
February 2, 2017 at 4:04 am #1354997
Paul RModeratorHi,
Please navigate to Appearance > Customize > Typography > Body and Content and set font weight to 300.
https://www.screencast.com/t/61h1yVG7
Thanks
February 2, 2017 at 4:23 am #1355010
oga23Participantyes,i can do that, but how can i make other titles bold? for example shop, portfolio, blog, etc…?
February 2, 2017 at 5:09 am #1355047
oga23Participantwhat is function of resp-h-timeline/man class? maybe is it causing the font wieght to be fixed?
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1353641 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
