
Tagged: title
-
AuthorPosts
-
August 4, 2025 at 8:01 pm #1487569
The pages don’t have title.
Is it possible to display it?
Thanks.August 4, 2025 at 8:08 pm #1487571Hey 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,
RikardAugust 4, 2025 at 8:26 pm #1487574Hi 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.August 5, 2025 at 9:09 am #1487592you 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; }
August 5, 2025 at 2:00 pm #1487599Hi,
Thanks for helping out @guenni007. Did that answer your question @icarogioiosi?
Best regards,
RikardAugust 8, 2025 at 8:46 pm #1487760Hi 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?
Thank you for your time.
August 9, 2025 at 11:34 am #1487777have a look if this is the default border-top of container_wrap – try:
#top .container_wrap { border: none !important; }
August 9, 2025 at 6:24 pm #1487785Hi 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.August 10, 2025 at 7:27 am #1487794so – 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.
August 10, 2025 at 3:41 pm #1487804Hi 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.August 10, 2025 at 6:11 pm #1487806Hi 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?
August 10, 2025 at 6:54 pm #1487810Check 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.
August 11, 2025 at 7:14 pm #1487854Hi Guenni007.
Great, it works for me!
Thanks, once again. -
AuthorPosts
- The topic ‘The pages don’t have title’ is closed to new replies.