Latest news customisation
- This topic has 5 replies, 2 voices, and was last updated 6 years, 3 months ago by Grace Themes.
-
AuthorPosts
-
February 16, 2018 at 9:06 pm #7955ChristopherParticipant
Hello,
In the “Latest News” section of the home page I’d like to display the full text of the posts instead of excerpts of the posts. They’re not long posts so I’m not worried about them over extending the content blocks, I just want a bit more text to be displayed. How would I go about doing that?
Regards,
ChrisFebruary 17, 2018 at 5:04 am #7959Grace ThemesMemberHi Christopher,
This will require to change some code to display full text in “Latest News” section.
Please send your website URL and WordPress admin login details for temporary at [email protected] so we can implement this changes on your website quickly.
Regards
Grace ThemesFebruary 17, 2018 at 10:10 am #7964ChristopherParticipantHello,
Thank you for the reply 🙂
I’m not comfortable giving out the login details for the website.
I don’t know how to code php myself but I can read it and I know my way around the WordPress editor very well so if you could inform me what code I need to change I’d appreciate that.
Regards,
ChrisFebruary 18, 2018 at 4:59 am #7969Grace ThemesMemberHi
You need to make some small changes in custom-functions.php file
Go to Appearance -> Editor -> inc/custom-functions.php
at line no. 804 you will find the below code<div class="news"> <h5>'.get_the_title().'</h5> <p>'.wp_trim_words( get_the_content(), of_get_option('newscontentlength'), '...' ).'</p> <div class="view-all-btn"><a href="'.get_permalink().'">'.of_get_option('readmoretext').'</a></div> </div>
Now just replace this with below modified code
<div class="news"> <h5>'.get_the_title().'</h5> <p>'.get_the_content().'</p> </div>
This will display complete text without Read More button.
Regards
Grace ThemesFebruary 19, 2018 at 10:08 am #7973ChristopherParticipantHello 🙂
That worked perfectly, thank you so much for your help!
Regards,
ChrisFebruary 19, 2018 at 6:19 pm #7977Grace ThemesMemberYou are most Welcome.!
-
AuthorPosts
- You must be logged in to reply to this topic.