-
AuthorPosts
-
March 5, 2024 at 12:03 am #1436313
Hi,
I would know how I can insert the description of the website in automatic from “Settings”.
Is there an option to select in the theme options or I have to insert this code (<?php bloginfo( ‘description’ ); ?>) in a file?
Thank you very much!Best,
Andrea
March 5, 2024 at 9:16 am #1436343Hey andrelio,
Thank you for the inquiry.
Are you referring to the Tagline field in the Settings > General panel? You can add it manually as the site description by adding this hook in the functions.php file:
function ava_custom_meta_description() { $tagline = get_bloginfo('description'); echo '<meta name="description" content="' . $tagline . '" />' . "\n"; } add_action('wp_head', 'ava_custom_meta_description');
However, we recommend installing SEO plugins such as Yoast or Rank Math instead of adding it manually. Please check the link below:
// https://yoast.com/meta-descriptions/
Best regards,
IsmaelMarch 5, 2024 at 10:09 am #1436352Hi Ismael,
I tried to add your code in functions.php, but it doesn’t work.
Yes I’m referring to the Tagline field in the Settings > General panel, but I need it for graphic reasons, not for SEO reasons (anyway I have Yoast SEO installed). Can I send you my account to see it? Thank you!Best regards,
Andrea
March 5, 2024 at 4:58 pm #1436383Hi,
Thanks for the update. So where exactly are you looking to add the description?
Best regards,
RikardMarch 5, 2024 at 5:09 pm #1436389Hi Rikard,
just under the logo, like in many other wordpress websites, if possible.
Best regards,
Andrea
March 6, 2024 at 7:27 am #1436445Hi,
Thank you for the clarification.
You can add this code in the functions.php file:
add_filter('avf_logo_subtext', 'avf_logo_addition'); function avf_logo_addition($sub) { $sub .= "<span class='logo-title logo-subtitle'>"; $sub .= get_bloginfo( 'description', 'display' ); $sub .= "</span>"; return $sub; }
Then add this css code to adjust the position of the description or subtext:
#top #header .subtext.avia-standard-logo-sub { position: absolute; top: 25px; left: 0; }
Best regards,
IsmaelMarch 6, 2024 at 9:14 am #1436464Hi Ismael,
it is perfect! Thank you very much!Best regards,
Andrea
March 6, 2024 at 10:51 am #1436481 -
AuthorPosts
- You must be logged in to reply to this topic.