Add this code in your theme’s functions.php
add_action('wp_footer', 'my_home_page_styles', PHP_INT_MAX);
function my_home_page_styles() {
if(is_front_page()) {
?>
<style>
#main {
margin-left: 0 !important;
}
.container {
width: 95% !important;
}
</style>
<?php
}
}
Don’t forget to clearing your cache before refreshing. Use Ctrl + F5
to refresh in Google Chrome.
Related Posts:
- Style something only on the home page
- View homepage in a preview mode
- Show two different sized featured images on homepage
- How to use custom Html file instead of wordpress homepage
- If its not frontpage
- Landing / Static HTML page
- Changing the homepage
- custom, static home page / landing page with Twenty Eleven theme?
- How to add a body class to all interior pages except the homepage
- How to only show the first X words (from each post) on the home page?
- How to create an archive for all posts that do not have a post format?
- home.php or frontpage (via settings) for theme?
- How do I make my single-work page show on my front-page.php?
- query_vars in home, not loading the “home” page
- get_home_path() returning error 500
- Insert Latest Articles in Homepage
- is_home() in HTML head
- Image resizing on home page (product category) [closed]
- How do I make the main page be the blog page and not a separate “home” page?
- Testing if current page is the static page set as home page
- How do I make the homepage as the blog page?
- When clicking on “home” page from any other page, it goes to IP address and my website doesn’t load
- In db https is used for home, but in backend http is used and cannot be edited
- When does WP ignore content added through the backend editor?
- Create a front page template and separate page for posts?
- How can I hide Home in my menu in a specific page?
- What does choosing a Post Page do?
- How can I upload an image for background use using the Theme Editor in WordPress?
- my homepage does not have SSL but another page is ok
- How to show snapchat snaps on my wordpress! [closed]
- style.css doesn’t load on the home page when front-page.php activated (using stock theme)
- How do I make a page appear like the “Your latest posts” from homepage display options?
- two columns of posts on homepage, one of them “favorites”
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- Weird Symbols in Chrome (wordpress) [closed]
- Main timeline in a different path
- Try to run a function only on Home
- Using a conditional tag for the home page banner
- How can I make my posts on my home page just show summaries?
- wp-admin/admin-ajax.php – Slowing My Site down
- How not to show leave a Reply to Home Page?
- Automatically set Homepage
- Merging two pages into one homepage
- How do I make a page the landing page?
- WordPress Home Page
- improve my array to display the_title, category, excerpt for homepage
- index.php isn’t front page but shows as it is
- Static homepage duplicate issue
- Different banner on home page
- Coming soon page used instead of home page
- Possible to Alternate between Two Home pages?
- Delete Title and Icone in Homepage
- Homepage white screen after migration server
- I want to load a pre-built php page (and assocated scripts/styles/directories) as the front page. How do I go about this?
- Make Home page current if there are sub-menus
- Accidentally deleted the ‘home’ page as my front page, can someone help?
- Display post formats differently on index.php (loop in function)
- Making draft page as the main page
- Contributors should only access home page
- Show latest posts on responsive theme
- Different URL for homepage then all your other pages
- How to make my Home button on the menu redirect to my root page
- wordpress help needed. How to display both home.php and index.php?
- Problems with homepage in different browsers
- After upgrade my WordPress version 5.4.4 to 5.6, I can not set my homepage
- Blog page and the Home page showing the same content
- How do I get the Revolution Slider in the header on the homepage, but not the blog index page?
- Timeout when loading Home Page, correctly load other pages in front or admin
- Remove Home page slug in translated pages
- What is the difference between `Home page / Archieves` and the page set as homepage?
- Remove/Redirect /page/ from homepage WordPress
- how to modify html on homepage (no home-page.php in my theme)
- ‘Nothing found’ on home page after custom CSS edit
- Why 2 home pages?
- Homepage was doubled and cannot be adjusted in Elements
- Logo Keeps Changing to the Default for Transparent Settings
- Homepage Setting missing
- How Create Different Layouts For Single WordPress Theme?
- homepage not fully loading after loutout
- div show on home page only not in paged
- Automatically change home page [closed]
- Change style of Twenty Seventeen child theme
- Edting Homepage text cannot find in homepage
- How to get different homepage layout, based on the URL and customizer
- Which file is the theme index page?
- My blog index page shows the last post as a title?
- Homepage only shows URL after moving to different server
- Adding language attribute to homepage
- Style post formats differently on the home page
- Show sticky blog post on homepage
- Change header when on home page
- Using pre_get_posts to filter by custom fields while using static front page
- Home in page/post not refer to homepage
- blog page showing as home/landing page despite template change and reading settings
- Set home page to last page of a certain category
- Hompage showing page from different theme
- How to display both home.php and index.php
- How do I edit my WordPress front page which doesn’t show in the admin pages area?
- I have front error for open website [closed]
- newbie help with home page