Home › Forums › Jevelin Theme › Change 'by' prefix before author name in blog post
Home › Forums › Jevelin Theme › Change 'by' prefix before author name in blog post
Hi Team,
Is there a way to change prefix ‘by’ before author name of the blog post to other word?
Thanks,
Marcin
.
Additionally would it be possible ot remove hiperlink when hovering over author name?
Hi Marcin,
I hope you are well today and thank you for your question.
You can try achieving this by using the attached custom child theme of Jevelin theme that contains following custom code in the functions.php file of it so change the word “by” in it to whatever you want to.
function jevelin_meta_one() { $elements = jevelin_option( 'post_elements' ); ?> <span class="post-meta-author"> <?php esc_html_e( 'by', 'jevelin' ); ?> <?php echo esc_attr( get_the_author() ); ?> </span> <?php if( !defined('FW') || ( isset($elements['date']) && $elements['date'] == true ) ) : ?> " class="post-meta-date sh-default-color"><?php echo esc_attr( get_the_date() ); ?> <?php endif; ?> <?php }
Best regards,
Shufflehound team
Hi Team,
Thanks for this solution. We’ve decided that we prefer to delete completely word ‘by’ before author name. Can you please post code for this approach?
One more thing, is is possible to remove as well link to author page (showing when hovering on author name)?
Cheers,
Marcin
To achieve this please use the attached modified child theme.
<p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”>Hi Team,</p>
<p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”></p>
<p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”>Can I paste last suggested by you code to my functions.php file?</p>
<p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”>I have several other modifications done and I need to keep it in this way adding only suggested by you function.</p>
<p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”><span lang=”en-US”>Can you let me know please where exactly I should place it in my functions.php file? [</span><span lang=”pl”>zip attached</span><span lang=”en-US”>]</span></p>
<p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”>Anything should be modified before pasting code of this function to my functions.php file</p>
<p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”>Thanks,</p>
<p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”>Marcin</p>
Sorry, above text has been pasted with extra formatting
>>>>
Hi Team,
Can I paste suggested by you code to my functions.php file?
I have several other modifications done and I need to keep it in this way adding only suggested by you function.
Can you let me know please where exactly I should place it in my functions.php file? [zip]
Thanks,
Marcin
Yes you can paste it at the end of your child theme functions.php file.
I’m pasting below code:
function jevelin_meta_one() {function jevelin_meta_one() { $elements = jevelin_option( ‘post_elements’ );?>
<span class=”post-meta-author”><?php echo esc_attr( get_the_author() ); ?> </span>
<?php if( !defined(‘FW’) || ( isset($elements[‘date’]) && $elements[‘date’] == true ) ) : ?> ” class=”post-meta-date sh-default-color”><?php echo esc_attr( get_the_date() ); ?> <?php endif; ?>
<?php }
just before ‘?>’ which are the last characters in my functions.php file.
But it’s giving me below error:
Fatal error: Cannot redeclare jevelin_meta_one() (previously declared in /wp-content/themes/jevelin-child/functions.php:159) in /wp-content/themes/jevelin/inc/helpers.php on line 1318
I should paste this code in other place?
It seems you have already added the function jevelin_meta_one in your child theme file therefore it is duplicating now causing the issue.
If it is hard for you to do it yourself then just share me your child theme so that i can integrate the required code in it and provide it to you.
Thanks for your efforts. I guess I will ask a developer to get this done. I have anyway few other modifications to be done.
You are always welcome here 🙂
Hi, I’m using Jevelin 4.6.9 and having the same issue. I’ve tried all the solutions presented here but they don’t work for me. Is there something I’m missing?
I want to try two alternatives:
Thanks!