Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1487569

    The pages don’t have title.
    Is it possible to display it?
    Thanks.

    #1487571

    Hey icarogioiosi,

    I’m not sure that I fully understand your question. Could you try to elaborate and post a link to an example page?

    Best regards,
    Rikard

    #1487574

    Hi Rikard.
    Thanks for your reply.
    At the top of the page/portfolio entry/article, I’d like its title.
    For the image https://img.savvyify.com/image/Title.yyVOc, if I choose “Realizations” from the menu, I’d like the name of the related page to appear at the top, and also be able to set the color, size, and style of the text string.
    Obviously, I can currently do this page by page using text and variables, but there’s definitely a more efficient way.

    #1487592

    you can use that ava_after_main_title hook on your choosen layout
    place this to your child-theme functions.php:

    add_action('ava_after_main_title', function() {
    	echo '<div class="main_color my_title_container">';
    	echo '<h2 class="page-title">'. get_the_title() .'</h2>';
    	echo '</div>';
    });

    change tags (espacially heading tag) to your need – and style via that extra class: my_title_container
    f.e.

    #top .main_color.my_title_container .page-title {
      font-size: var(--enfold-font-size-theme-h2) ;
      color: var(--enfold-main-color-heading);
      padding: 20px 0 5px 30px;
    }

    see: https://enfold.webers-webdesign.de/enfold-consulting/

    #1487599

    Hi,

    Thanks for helping out @guenni007. Did that answer your question @icarogioiosi?

    Best regards,
    Rikard

    #1487760

    Hi everyone.
    Guenni007’s support was invaluable, as is often the case.
    I was still surprised, however, because I use the Enfold theme in other projects with other starting demos, and in some cases the title is already present.
    I therefore thought there was some sort of on/off switch to activate, or a preference that I had overlooked.
    In any case, the solution proposed is efficient and effective.
    Is there a way to also remove the horizontal gray line highlighted in the image, which is missing without the title?
    Title2

    Thank you for your time.

    #1487777

    have a look if this is the default border-top of container_wrap – try:

    #top .container_wrap {
      border: none !important;
    }
    
    #1487785

    Hi Guenni007.
    Thanks for the suggestion, but unfortunately it doesn’t work.
    That line only appears after the title becomes visible for the code you indicated, so it’s probably related to that and not the container.

    #1487794

    so – i had to see the page you are talking about to give better advice.

    You can see that there are no borders on my test page after inserting the titles. So it can’t be due to the elements used. Unless you have rules for these classes (main_color or page-title) in your CSS.

    #1487804

    Hi Guenni007.
    Unfortunately, the site isn’t live yet, so I can’t send you a link right now.
    So I checked the page, and this is the change I made to the code you suggested that works for me:

    #top .container_wrap_first {
    border: none !important;
    }

    Your input was important in this case too.
    Thanks for your time.

    #1487806

    Hi Guenni007.
    The code inserted according to your instructions in the child-theme functions.php obviously displays the title on all pages.

    add_action(‘ava_after_main_title’, function() {
    echo ‘<div class=”main_color my_title_container”>’;
    echo ‘<h2 class=”page-title”>’. get_the_title() .'</h2>’;
    echo ‘</div>’;
    });

    Is it possible to hide it on a page?

    #1487810

    Check what page-id is it where you do not like to show it – and then :

    #top.page-id-12345 .my_title_container {
      display: none;
    }

    However, if you only want this feature on all pages but not on archive or post pages, for example, you can modify the snippet accordingly.

    #1487854

    Hi Guenni007.
    Great, it works for me!
    Thanks, once again.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘The pages don’t have title’ is closed to new replies.