You could try this instead
if (!is_front_page() && is_home()) {
get_template_part('template-parts/blog-categories');
}
Explanation for the difference between front_page an home is here: https://wordpress.stackexchange.com/a/239838
if you set a page as a blog-page it is “home”, in your case the landing-page is the so called “front_page”. This is WordPress specific.
Related Posts:
- How to check if feed URL was requested?
- How to get URL of current page displayed?
- Sending the reset password link programatically
- Getting only direct child pages in WordPress with get_pages
- Disable Attachment Pages Completely
- How to add a .php file to WordPress
- How to Remove all Instances of edit_post_link
- Encode text string being appended as query to URL [closed]
- Any guides on creating custom admin pages?
- Is it safe to use $_SERVER[‘REQUEST_URI’]?
- Multiple is_page() in page.php
- The correct method to pass query vars in AJAX using ajaxurl
- What is the best practice for escaping data URIs?
- Create WordPress pages with PHP
- urlencoding of the_title() doesn’t work?
- How do I get the author’s page url from their ID?
- Dynamic URL to reference custom PHP files
- Is it possible to generate a page without create in the admin?
- How to change “Shipping Calculator “field label on Cart Page – woocommerce? [closed]
- WordPress admin never finishes saving page on site with large page count
- class=”parent” for wp_list_pages?
- Conditional Statement – check if post has an attachment image
- PHP Script within wordpress theme
- add_rewrite_rule with bottom priority doesn’t handle the WordPress pages
- Listing all sub-pages?
- Trying to use Ternary operators with WP Conditionals
- How to link to a custom .php page in my folder
- Concatenate site_url and string doesn’t work
- Get only the grandchildren, not the direct children of page/current page?
- What’s the proper way to use wp_enqueue_script/style?
- Help with a custom page template – listing contents of childpages?
- Callback URL in WordPress
- How to do conditional publishing?
- Print number of post (in reverse)
- Wrong links in WordPress?
- Newbie question: no index.php? in my plain wordpress permalink
- How is WordPress manipulating the posts like there are folders?
- Passing the page ID to a login php script
- How can the plugin directory path be returned into ?
- conditional statement for custom taxonomy
- Add a Different CSS Class Into The Body Tag of Different WP Pages
- Limit get_pages to only show 5 items
- syntax issue on php 7.4
- How do I publish only one page to production after making changes on staging?
- Use wp_get_recent_posts with search term
- Extract subdomain and relative address from a url
- Custom Template 404 for specific custom post type
- Remove query string specific key value
- Can’t load WP function into external function
- Custom category code not showing all posts
- Add user settings to specific roles
- How to display conditional-content if wp_nav_menu( $args ) retruns something
- Echo URL of large version of Featured Image
- Create a new usermeta field for users
- Why does WordPress remove my variables in the URL?
- Insert a button on a page with random number generation
- Can’t get page content in WordPress
- Way to querry data (tags) from a wordpress database?
- Global variable $post returning incorrect object
- How can I load a PHP page without using a Template?
- Redirect to a different page through registration, depending on page
- Recent posts with featured image or fallback image with permalink
- Best practice for migration friendly images in posts/pages?
- How to Arrange PHP Files to Allow for Multiple Types of Pages?
- What is the correct way to write this conditional statement?
- Page Automatically Generated from Theme?
- Recent Posts slider, using WP_Query(), loads duplicate sliders
- How to add a php custom page to WordPress
- Reordering Buddy Press profile navigation [closed]
- Sort query_posts for Parent Pages to menue order or the count?
- How to hide all child pages with post_query?
- Dynamic content based on a URL parameter
- How do I exclude recent post from recent post php widget
- Colon is Missing In My Website Url in WordPress
- How to change redirection route to a php page for making it only accessible by logged-in members?
- How to use $_GET function WordPress backend
- My page.php shows the index.php
- Populate editor with some content of a page with a page template
- Extend PHP regex to cover “srcset” and “style” attributes
- How can I add an area/option for a custom page description?
- Create Page To Count Comments For Each Post In WordPress Site
- My php header() function is not working [closed]
- Scrape external webpage for first image and add it to new post
- Create custom permalinks to show Custom Post Type’s relationship?
- Search Query: how to construct a search string from two select elements?
- Get URL Parameters from referer
- Need help enqueueing webfonts
- get_the_title() gets printed out twice
- Is_front_page inside header.php is always returning true
- How do I find PHP file that contains content of my page?
- WordPress page content outside WordPress
- Using the_excerpt() on a page
- Inject class in body when particular page template is used
- Use .php file as page instead of wordpress page & template file?
- Advanced Custom Fields – display label and value only if value entered
- Use WordPress function in php file
- PHP conditional script issue
- Why is $wp->request empty in WordPress 6.0?
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- Get the URL of the page from which an ajax request has been launched within ajax callback