-
AuthorPosts
-
September 25, 2014 at 4:37 pm #112646
TimParticipantHi i would like to change my p-meta. but due to poor php knowledge i cant get it working.
Rigth now my p-meta looks like this:
admin/ 09.2014/ Allgemein/ Leave a Comment
and i would rather like it to be like this:
SEPTEMBER 14. 2014/ categorie
Is that posible?
September 25, 2014 at 5:05 pm #112676
Nabeel AModeratorHi Till,
Please provide us the URL of your website so we can take a look into your issue.
September 28, 2014 at 4:58 am #114089
TimParticipanthere it is:http://www.sandbanksylt.de/test/hobie-story/
September 28, 2014 at 9:19 am #114154
ChristopherModeratorHi there,
Please create a Child theme:
http://theme.co/x/member/kb/how-to-setup-child-themes/
Then using this guide:
http://theme.co/x/member/kb/customization-best-practices/
Please copy the file below:
wp-content/themes/x/framework/functions/renew.php
to:
wp-content/themes/x-child-renew/framework/functions/renew.php
and change the code from line 20-113 into:
if ( ! function_exists( 'x_renew_entry_meta' ) ) : function x_renew_entry_meta() { $author = sprintf( '<span>%s</span>', get_the_author() ); $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( 'F d.Y' ) ) ); 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 ) ); } if ( comments_open() ) { $title = get_the_title(); $link = get_comments_link(); $number = get_comments_number(); if ( $number == 0 ) { $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 ) ), __( 'Leave a Comment' , '__x__' ) ); } else if ( $number == 1 ) { $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 ) ), $number . ' ' . __( 'Comment' , '__x__' ) ); } else { $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 ) ), $number . ' ' . __( 'Comments' , '__x__' ) ); } } else { $comments = ''; } if ( x_does_not_need_entry_meta() ) { return; } else { printf( '<p class="p-meta">%1$s%2$s%3$s%4$s</p>', $author, $date, $categories_list, $comments ); } } endif;That will do the trick 🙂
September 30, 2014 at 3:11 pm #115899
TimParticipantSorry nothing happend…. i made a functions direktory in my child theme because there was none. may that be the problem?
September 30, 2014 at 4:15 pm #115932
DarshanaModeratorHi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
October 7, 2014 at 2:40 am #120368
TimParticipantThis reply has been marked as private.October 7, 2014 at 7:24 am #120528
Paul RModeratorHi Till,
Sorry for the confusion there.
Please transfer the code into wp-content/themes/x-child-renew/functions.php
You may remove the functions directory you createdThanks
October 8, 2014 at 3:11 am #121146
TimParticipantThis reply has been marked as private.October 8, 2014 at 11:31 am #121412
ZeshanMemberHi Till,
Thank you for writing in!
The above code provided contains functions which aren’t specified in your version of X theme (2.2.0). Please update your theme and bundled plugins to the latest versions (2.6.0) and the issue should be resolved.
Please review our update guide.
Hope this helps. 🙂
Thank you.
October 9, 2014 at 2:50 am #121957
TimParticipantHi. Completed the update but still, the blog page wont load since adding code to functions.php.
Thru a link on my home page i can go to one of the posts. the bottom of the page gives me the folowing message:
Fatal error: Call to undefined function x_google_authorship_meta() in /homepages/44/d28670702/htdocs/sandbanksylt/test/wp-content/themes/x-child-renew/framework/views/renew/content.php on line 21
October 9, 2014 at 9:44 am #122283
Paul RModeratorHi Till,
Can you try it again.
I deleted <?php x_google_authorship_meta(); ?> in wp-content/themes/x-child-renew/framework/views/renew/content.php
It is no longer needed in the latest version of xtheme
Thanks
October 9, 2014 at 11:27 am #122380
TimParticipantNow it us working thank you!
I still ned to remove the “Admin” and “leave a coment” part
where can i do so?
October 9, 2014 at 11:29 am #122381
TimParticipantAlso i would like to move that line above the tittle of the block. Can you tell me how to do that?
October 9, 2014 at 5:56 pm #122638
RadModeratorHi there,
From the code you just added at functions.php,
1. Find this :
$author = sprintf( '<span>%s</span>', get_the_author() );And change it into this
$author = '';2. Then add this :
$comments = '';Directly on top of this
if ( x_does_not_need_entry_meta() ) {which should be under `else {
$comments = ”;
}`Or, just turn off comments.
3. Copy this template /wp-content/themes/x/framework/views/renew/_content-post-header.php to your child theme ( /wp-content/themes/x-child-renew/framework/views/renew/_content-post-header.php )
Then replace its code by this :
<?php // ============================================================================= // VIEWS/RENEW/_CONTENT-POST-HEADER.PHP // ----------------------------------------------------------------------------- // Standard <header> output for various posts. // ============================================================================= ?> <header class="entry-header"> <?php x_renew_entry_meta(); ?> <?php if ( is_single() ) : ?> <h1 class="entry-title"><?php the_title(); ?></h1> <?php else : ?> <h2 class="entry-title"> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php the_title(); ?></a> </h2> <?php endif; ?> </header>Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-112646 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
