Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1130349
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionI have two blog types on my website (Blogs and Updates). I need to change the P tag font size in both page templates. These are the page templates that show a list of the posts/articles. Blogs page (category.php) shows 10 articles at a time, and Updates page (index.php) shows 10 articles at a time.
For the Blog page (category.php): I was able to change the font size on the category.php page template using
body.category p {
font-size: 20px !important;
}
For the Updates page (index.php): The paragraph string that shows the article excerpt
<?php the_excerpt(); ?>
is inside of a div that is styled by class a named ".entry"...if that makes any difference. I have tried several variations, but nothing has worked yet:
.page-template-index .entry p {
font-size: 16px !important;
}
body.index p {
font-size: 16px !important;
}
entry.index p {
font-size: 16px !important;
}
Any help is greatly appreciated!
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionI have two blog types on my website (Blogs and Updates). I need to change the P tag font size in both page templates. These are the page templates that show a list of the posts/articles. Blogs page (category.php) shows 10 articles at a time, and Updates page (index.php) shows 10 articles at a time.
For the Blog page (category.php): I was able to change the font size on the category.php page template using
body.category p {
font-size: 20px !important;
}
For the Updates page (index.php): The paragraph string that shows the article excerpt
<?php the_excerpt(); ?>
is inside of a div that is styled by class a named ".entry"...if that makes any difference. I have tried several variations, but nothing has worked yet:
.page-template-index .entry p {
font-size: 16px !important;
}
body.index p {
font-size: 16px !important;
}
entry.index p {
font-size: 16px !important;
}
Any help is greatly appreciated!
Share Improve this question asked Dec 14, 2018 at 15:38 WebmanWebman 631 silver badge11 bronze badges 4 |1 Answer
Reset to default 1Entry is a class so when you're adding it to css you need to add a . in front. just try doing this:
.entry p {
font-size: 16px !important;
}
See if that works.
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionI have two blog types on my website (Blogs and Updates). I need to change the P tag font size in both page templates. These are the page templates that show a list of the posts/articles. Blogs page (category.php) shows 10 articles at a time, and Updates page (index.php) shows 10 articles at a time.
For the Blog page (category.php): I was able to change the font size on the category.php page template using
body.category p {
font-size: 20px !important;
}
For the Updates page (index.php): The paragraph string that shows the article excerpt
<?php the_excerpt(); ?>
is inside of a div that is styled by class a named ".entry"...if that makes any difference. I have tried several variations, but nothing has worked yet:
.page-template-index .entry p {
font-size: 16px !important;
}
body.index p {
font-size: 16px !important;
}
entry.index p {
font-size: 16px !important;
}
Any help is greatly appreciated!
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionI have two blog types on my website (Blogs and Updates). I need to change the P tag font size in both page templates. These are the page templates that show a list of the posts/articles. Blogs page (category.php) shows 10 articles at a time, and Updates page (index.php) shows 10 articles at a time.
For the Blog page (category.php): I was able to change the font size on the category.php page template using
body.category p {
font-size: 20px !important;
}
For the Updates page (index.php): The paragraph string that shows the article excerpt
<?php the_excerpt(); ?>
is inside of a div that is styled by class a named ".entry"...if that makes any difference. I have tried several variations, but nothing has worked yet:
.page-template-index .entry p {
font-size: 16px !important;
}
body.index p {
font-size: 16px !important;
}
entry.index p {
font-size: 16px !important;
}
Any help is greatly appreciated!
Share Improve this question asked Dec 14, 2018 at 15:38 WebmanWebman 631 silver badge11 bronze badges 4- Can you provide a link? – RiddleMeThis Commented Dec 14, 2018 at 15:41
-
2
Did you try
.entry p? – rudtek Commented Dec 14, 2018 at 16:00 - Holy cow lol.... .entry p worked! – Webman Commented Dec 14, 2018 at 16:12
- I'm glad it worked. I've added as an answer. could you please mark it (green check to the left of the answer) – rudtek Commented Dec 14, 2018 at 16:50
1 Answer
Reset to default 1Entry is a class so when you're adding it to css you need to add a . in front. just try doing this:
.entry p {
font-size: 16px !important;
}
See if that works.
本文标签: Change Size of P Tag on One Page Template
版权声明:本文标题:Change Size of P Tag on One Page Template 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749099184a2315727.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


.entry p? – rudtek Commented Dec 14, 2018 at 16:00