Is it posible to show text on Homepage,
This support request was posted in Netelier by wrafico
- wrafico January 19, 2015 at 5:17 pm
Hello, I read a topic called “Text not showing on Homepage” on which you said the teplate does not support it, but I really really need a field text to place HTML inside. It’s a must. Have you added that feature in the updates?
I have managed to paste it in the welcome message, but is kind of messy to work like that. Any advice?
Thank you!Juanfra Aldasoro January 20, 2015 at 3:15 pm
Thanks for writing and hoping that you are doing well today.
Actually, there’s an input named “Welcome Message” within the theme options in which you can input some text. When it comes to HTML text, what you can try is editing the file template-home.php and add the_content(); function in order to display what you put in the page description.
Juan.wrafico January 21, 2015 at 4:39 pm
Thank you!. I’ve tried no success.
You mean that using this code as it is “the_content()” wil pull out the text? Or do i need more code.
Also, If I’m using a child theme do I need to create this in a new template-home file and added to childs foder, right?Juanfra Aldasoro January 21, 2015 at 10:04 pm
No problem 🙂
Actually if you’re running the latest version of netelier you can add a filter in order to display the home content. What you need to do is add the following code into your functions.php
add_filter( 'nice_home_content', '__return_true' );
the_content() always display the content of the page if it’s in the loop context. If it’s not displaying anything the reasons might be:
1- You don’t have any content for that page.
2 – The function call is not in the loop content.
What I mean by having it in the loop content is having something like:
if ( have_posts() ) : while ( have_posts() ) : the_post(); the_content(); endwhile; endif;
If you are using a child theme, then you should do all the modifications there.
Juan.wrafico January 22, 2015 at 12:29 am
Thank you for taking so much time!! It works perfect. Cheers.Juanfra Aldasoro January 22, 2015 at 12:39 am
No problem 🙂 My pleasure.
Have a nice day,
This topic is marked as resolved
Only the topic author can re-open this thread.