wordpress

How to Use Bootstrap in WordPress Themes

Making a note of how to add Bootstrap to WordPress themes and how to add Bootstrap to the Keni theme.

Shou Arisaka
1 min read
Oct 23, 2025

Don't want to change the theme. Add to header.php of the Keni theme.

Add to WordPress theme directory via FTP bootstrap.min.css

Add to header.php and load it. <link href="<?php echo get_template_directory_uri(); ?>/bootstrap.min.css" rel="stylesheet">

Want to add to Keni

Keni is an SEO template that those who know will understand. I definitely want to use it while keeping this functionality. But there are also compatibility issues.

So I'll make a note of one example of minimum rewriting in the current version.

Introducing to Keni Cool version

Minimum settings

Before editing files, save the pre-change files to a local environment.

base.css

Delete the following

blockquote:before
blockquote:after

Change existing code to the following

.site-title{
    /*text-align:center; yui*/
    text-align: left;
    margin: 0 auto;
    font-size: 2.25em;
}

.site-header-conts{
    width: 100%;
    padding: 10px 0 10px;
    /*padding: 60px 0 40px; yui*/
}

rwd.css

Correct existing code to the following

    .site-header-in{
        position: relative;
        padding-bottom: 0em;
        /*padding-bottom: 1em; yui*/
    }

    .site-header-conts{
        padding-bottom: 0px;
    }

Add the following
.main-body-in{
    padding-top:0px;
}

※This is a note for myself, so don't expect too much. Please absolutely make a local backup.

Share this article

Shou Arisaka Oct 23, 2025

🔗 Copy Links