Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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

    #1436343

    Hey 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,
    Ismael

    #1436352

    Hi 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

    #1436383

    Hi,

    Thanks for the update. So where exactly are you looking to add the description?

    Best regards,
    Rikard

    #1436389

    Hi Rikard,

    just under the logo, like in many other wordpress websites, if possible.

    Best regards,

    Andrea

    #1436445

    Hi,

    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,
    Ismael

    #1436464

    Hi Ismael,
    it is perfect! Thank you very much!

    Best regards,

    Andrea

    #1436481

    Hi,

    Great, I’m glad that Ismael could help you out. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.