$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Change Size of P Tag on One Page Template|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Change Size of P Tag on One Page Template

matteradmin9PV0评论
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 question

I 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 question

I 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
Add a comment  | 

1 Answer 1

Reset to default 1

Entry 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.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far