-
AuthorPosts
-
January 18th, 2017 at 20:56 #42054
Hi there,
On frontpage/presentation page I would like to display a title above the posts. The set-up plug-in just offers this option for the columns.
“Text area 2” isn’t the right solution in this case.I tried to change frontpage.php but wasn’t able to find out in which part to add the code.
Best regards
Website: www.weltangucker.de
- This topic was modified 7 years ago by Klaus.
January 25th, 2017 at 10:17 #42220ZedCryout Creations mastermindThe posts on the frontpage are loaded with
if ($nirvana_frontposts=="Enable"): get_template_part('content/content', 'frontpage'); endif; ?>
in frontpage.php, so you’d need to place your title somewhere before that line.If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.April 5th, 2017 at 10:30 #43728Thanks for this answer.
I tried it with severeal snippets at several places before that line, but I can’t get the expected additional title.I have no trouble to place the additional title AFTER the region of desire but not BEFORE!
Every try to place visible HEadlines before the line I have realy no success. If I do the same after your mentioned line I can have my title below the saction.
I have really no clue what is wrong…
Could you write please your answer a little bet more defined, please?
April 7th, 2017 at 13:08 #43807ZedCryout Creations mastermindadd_filter( 'get_the_excerpt', 'nirvana_custom_excerpt_more',10 ); } ?> <h3 class="custom-title">Sample title</h3> <!--this is the custom title and the only modification to the code--> <?php if ($nirvana_frontposts=="Enable"): get_template_part('content/content', 'frontpage'); endif; ?>
You’ll also need a bit of styling depending on how and where you want that title aligned.
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.April 9th, 2017 at 01:09 #43842So the Sample Title appears at the right place. But I cannot amend styling. My idea was to add #custom-title to the existing list in style.css as styling already exists
Existing CSS
#front-text1 h2,
#front-text2 h2,
#front-text5 h2,
#front-columns h2,
{
display: block;
float: none;
margin: 0px auto;
font-size: 45px;
line-height: 55px;
clear: both;
font-weight: 300;
}amended CSS
#front-text1 h2,
#front-text2 h2,
#front-text5 h2,
#front-columns h2
#custom-title h2,
{
display: block;
float: none;
margin: 0px auto;
font-size: 45px;
line-height: 55px;
clear: both;
font-weight: 300;Unfortunately it doesn’t work. Where am I wrong?
Website: www.weltangucker.de
- This reply was modified 7 years ago by Klaus.
April 9th, 2017 at 15:34 #43853ZedCryout Creations mastermindYou need to pay attention to the id/classname placement. In my example it’s a H3 and it bears the id directly, making the correct identifier
h3#custom-title
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.April 9th, 2017 at 17:21 #43860Thank you for helping on Sunday!!
Sorry but I don’t get it… I tried
h3#custom-title, #front-text1 h2, #front-text2 h2, #front-text5 h2, #front-columns h2 { display: block; float: none; margin: 0px auto; font-size: 45px; line-height: 55px; clear: both; font-weight: 300; }
as well as
h3#custom-title h3, #front-text1 h2, #front-text2 h2,
as well as
h3#custom-title h2, #front-text1 h2, #front-text2 h2, #front-text5 h2, #front-columns h2 { display: block;
as well as to separate it to
h3#custom-title h3 { display: block; float: none; margin: 0px auto; font-size: 45px; line-height: 55px; clear: both; font-weight: 300; }
but the custom-title does not change for one single pixel…
In Firefox console I can adjust font-weight for h3.custom-title but it seems to belong to #pp-afterslider h3 and that is where I get stuck in CSS…
Website: www.weltangucker.de
April 21st, 2017 at 17:46 #44183ZedCryout Creations mastermindSorry, there was a discrepancy in my previous answer. The example code uses a classname while the styling uses an ID.
Modify the code to also use ID:
<h3 id="custom-title">Sample title</h3>
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.April 26th, 2017 at 17:08 #44333 -
AuthorPosts
The topic ‘Title for posts on frontpage’ is closed to new replies.