WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to change the text font of a post by default (8 posts)

  1. kostisgrde
    Member
    Posted 1 year ago #

    hello, I am new here and its the first time I am using wordpress to build a website.
    I want to know if it is posible to change the font text of a post by default.
    I know I can just go to new post and add this code:
    <p style="font-family: 'Aldrich', sans-serif;">here I type my text</p>

    but I want to set a font as the default font for my text on post and pages!

    I am using theme twenty eleven.
    please help :)

  2. Ryan Cowles
    Member
    Posted 1 year ago #

    Hi Kostisgrde, and welcome!

    If you are familiar with CSS, then modifying the default font size for your posts and pages should be pretty straightforward (and don't worry, even if you aren't familiar, you can learn).

    Instead of modifying your theme's style.css directly, it is advised that you either create a child theme, or use a Custom CSS plugin. If you are using JetPack, you can use its Custom CSS module. Once it is turned on, you can add something like the following:

    .entry-content p,
    .entry-summary p {
    	font-family: 'Aldrich', sans-serif;
    }

    This will change the default font family for paragraphs contained within the .entry-content and .entry-summary containers. I hope this helps! Feel free to give me a shout if you'd like me to elaborate.

  3. kostisgrde
    Member
    Posted 1 year ago #

    I know some CSS but not so much...
    ok so it is possible!
    I didn't know about jetpack, I checked it out and seems awsome, unfortunately I am running the wordpress on local host xampp for now and I can not activate it. no I am not using a child theme, I am using the original 2011 theme, when I read about child I had change so much and now I am hesitating... What could happen if I am not using a child? I don't understand that very much.
    ok so I guess I have to go to editor then stylesheet.... and I should paste this:
    .entry-content p,
    .entry-summary p {
    font-family: 'Aldrich', sans-serif;
    }

    right?
    thing is I cant find where the css for the post content is...
    thx for your help!

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    If you change theme files your changes will be overwritten when the theme is updated - and for default themes (twentyeleven is one) that also happens when WP is updated - so that's not a great way to go. You can also use a simple plugin like custom CSS manager to add custom CSS - http://wordpress.org/extend/plugins/custom-css-manager-plugin/

    Then you just add your changes to the CSS to that via the dashboard.

    Try using a browser tool such as Firebug to help you work with CSS - it's super useful!

  5. Ryan Cowles
    Member
    Posted 1 year ago #

    WPyogi is correct. And if you are in Chrome, you can also use Developer Tools which is similar to Firebug. Either of those will help you pinpoint which styles you will have to modify.

  6. Ryan Cowles
    Member
    Posted 1 year ago #

    Just to followup about JetPack - It looks like they just pushed an update that includes "Development Mode" which doesn't require a connection. http://jetpack.me/2013/03/28/jetpack-dev-mode-release/

    I haven't had a chance to test it myself, but from the sounds of it, you should be able to use it in a localhost environment now by enabling it.

  7. kostisgrde
    Member
    Posted 1 year ago #

    ok I created successfully my child and I did what Ryan Cowles said to change the font!
    thank you both very much for your time and help! :)

  8. Ryan Cowles
    Member
    Posted 1 year ago #

    No problem – I'm glad to hear that you got it working!

Topic Closed

This topic has been closed to new replies.

About this Topic