Depending on your setup you could use the conditional is_home()
or is_front_page()
like this:
<?PHP if( is_home() ) { ?>
<div> … </div>
<?PHP } ?>
See also the question “When to use is_home() vs is_front_page()?” for further details on the defferences between the two…
PS: you should consider using a child theme for this.
Related Posts:
- Software for WordPress Theme and Plugin Development? [closed]
- How to detect mobile devices and present them a specific theme?
- Using wp_add_inline_style without a stylesheet
- Should we use get_template_part() in functions files instead of include_once?
- Reset positions of metaboxes in admin
- Add a dropdown to theme customizer
- design and development workflow
- How to control initial wp_head() output?
- enqueue script for specific shortcode
- The difference between calling wp_enqueue_scripts to load scripts and styles in custom theme
- WordPress twentytwenty theme inline css overriding css body
- What is the problem if I use CDN in my WordPress parent theme(built using bootstrap)?
- How can I insert default widgets when my theme is activated (similar to what twenty eleven does)?
- How to change post thumbnail title and alt attributes to post title?
- Why might $input (Settings API) be coming through empty?
- add generated stylesheet from parent theme after child-themes style.css
- date_i18n() issue
- Creating Page Based on Category
- How to check if post has any tag?
- LOST in WP Template Hireachy
- using wp_enqueue_script to attach jquery-ui
- Merging PHP download script into `functions.php`
- Should use widgets in this case?
- Changing the entire control choices using wp.customize with JavaScript
- Static Front Page problem
- Enabling Default Widgets in a Custom Theme
- Can not Remove Archives and Meta from Sidebar
- Get last modified date for menu link
- A theme that follows all the best practices to learn from?
- get_post() function returns post even if it is trashed
- WordPress how to override function adjacent_posts_rel_link_wp_head() in link-template.php the correct way
- Can wordpress run in root of existing php site with no theme on index.php but all other WP posts/pages?
- How to regenerate thumbnails when they’re stored on S3
- customizing the_password_form filter
- Change setting name in Customizer and keep the data
- CSS won’t style output of wp_nav_menu() correctly
- after_setup_theme, Global Variable and Theme Customizer
- How to make WP admin recognize a newly created child theme?
- searchform.php override not working
- Can’t show custom post thumbnail sizes as background images
- Load child template based on parent
- Theme translation not applying
- How to add filter the post thumbnail before save in database?
- How to move the the_excerpt’s read more link to another div
- How to create a custom template to admin dashboard
- Change The Meta-Description Of Home-Page?
- Easy lightbox effect inside of dashboard widget
- Add, edit specific CPT with custom role
- how to display search term in the template full site editor
- Custom Field created in add_meta_boxes reappearing itself again in the default Custom Metabox
- How to add new page to wordpress theme through coding?
- Dynamically generated wordpress customizer options?
- Filter categories used with Custom Structure Permalink
- Code to determine WP version check
- How to escape html generate by a loop
- get_term_link is Ending to single.php
- making my theme multisite compatible?
- wp e-commerce – theme problem – why won’t it load wpsc-single_product.php? [closed]
- Extending Twenty Eleven Theme
- Moving post title down the page / Removing a block from a post
- I want to change background image of my wordpress site on particular post type
- how to retrieve the image title for image Post Format
- Iris color picker in custom theme option page not saving value
- Hestia Child theme creation
- How to add custom class to get_avatar()
- Want to add cart and a search bar in the right of logo line
- how do i develop a global nav and local nav to be wordpress dynamic?
- Output richtext metabox value
- Twenty Twelve Author not displaying
- How to make a theme unable to be used on a multisite network?
- Default PHP document / names needed for a WordPress theme?
- How can I sort my loop based on meta data, using a form?
- What is the_permalink() on a category page?
- How to modify theme content in Thematic?
- How to determine when my theme is deactivated?
- 1 post per category on homepage and counting those posts
- if (has_custom_menu())?
- WordPress theme options checkbox default checked state
- Custom themes that won’t work when theme is changed
- only the first post is shown
- wordpress can’t find single-project page
- WordPress Theme: What is the right way to put inline CSS loading from a CSS file
- Is there a way to add classes to a page when using a Gutenberg reusable block as page layout?
- How to show some of category in wordpress
- How to make the media library searchable by image title
- How do I build a WordPress Profile/Author Header?
- Custom page template not showing on page creation
- Create settings field on button click
- Undefined index: custom_sidebars
- How To Customise WordPress Comment Submit Button?
- Next/Previous post navigation
- Single Featured Image Repeating
- How to remove menu from WP-Admin menu
- apply_filters to featured image
- How do I move menu to the bottom in Custom Community theme?
- How do I get information about a page, such as featured image, except, and title?
- How can I install my custom-made theme on a wordpress.com blog? [closed]
- A problem in loading index.php
- .submenu class missing in output from wp_nav_menu
- How to Enable Hot Module Replacement with Webpack