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
- Any guides on creating custom admin pages?
- Multiple is_page() in page.php
- What is the best practice for escaping data URIs?
- How do I get the author’s page url from their ID?
- Dynamic URL to reference custom PHP files
- Conditional Statement – check if post has an attachment image
- add_rewrite_rule with bottom priority doesn’t handle the WordPress pages
- Trying to use Ternary operators with WP Conditionals
- Newbie question: no index.php? in my plain wordpress permalink
- Passing the page ID to a login php script
- Use wp_get_recent_posts with search term
- Echo URL of large version of Featured Image
- Way to querry data (tags) from a wordpress database?
- Redirect to a different page through registration, depending on page
- Recent posts with featured image or fallback image with permalink
- What is the correct way to write this conditional statement?
- How to add a php custom page to WordPress
- Reordering Buddy Press profile navigation [closed]
- 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
- 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
- Get URL Parameters from referer
- get_the_title() gets printed out twice
- How do I find PHP file that contains content of my page?
- WordPress page content outside WordPress
- Inject class in body when particular page template is used
- Advanced Custom Fields – display label and value only if value entered
- Use WordPress function in php file
- Get the URL of the page from which an ajax request has been launched within ajax callback
- Parsing Menu Items and Blog Posts
- How to avoid duplicates when creating recent network posts
- Automatically add images to a menu
- page-slug.php not working but only for specific slug
- Need php code’s output to display underneath a Divi Module
- How Do I Find & Remove H1 From Site-Title-Wrapper? [closed]
- I’m unable to call img path using single quotes in an array?
- Need to Modify a WordPress Shortcode with another wordpress shortcode
- Display child page content of a specific parent on home page
- Can’t change website Title on wordpress
- Removing custom sort order from admin page listing
- PHP Output also in Child theme, but different
- How to make a conditional statement within $output in shortcodes.php?
- How to use title attributes in sidebar widget?
- $wpdb->get_results breaking page?
- How to Display a List of Child Pages For a Parent Page in WordPress
- Call featured image url
- WordPress Search
- How to add PHP pagination to wordpress
- Use an anchor link to open an iframe inside a WordPress page
- Adding custom url to readmore link using get_permalink()
- How to set base url for php widget
- include content within conditional statement?
- How do I add my PHP app to a WordPress page whilst keeping semantic URLs?
- Modifying WP URL handing code?
- Page load timer?
- How to deal with a GET variable of ‘name’?
- WordPress permalink issue
- Show label for value only when value exists, basic php
- Page not visible in ‘All pages’ after being added through PHP
- Cascading dropdown select search based on Parent Page & Child Page
- Edit and delete permissions pages and posts
- A function to get the content of a page
- Unable to display multiple parameters from url by javascript through shortcodes
- Get nice name of category from slug (remove dashes of category)
- Current WordPress Page Title as Search Parameter into A Tag
- WordPress recent post
- Display page content in different sections – based on page break block?
- How does one make a URL return dynamic JSON with custom Content Type?
- Posts Per Page with a button to add more Posts
- Child and Parent Pages list of sub pages
- Require advice handling a URL redirect from a Third Party. URL Params need to populate and then forward to payment
- loading a php file to a specific page id
- WordPress add_rewrite_rule
- Get current_post in reverse order with pagination
- How do I generate formatted permalinks as specified in backend options?
- changing static link to relative link
- Create a custom theme-specific page, invisible in the admin-panel?
- Create a dynamic buddupress tab
- Jetpack: Display Site Title when no Site Logo
- If else statement based on referral URL
- Execute php in pages
- Magento and WordPress URL integration [closed]
- Custom Meta Box If Else Statement
- How to remove parent section in an attachment URL in wordpress?
- I want Page titles and excerpts to show up on home.php in certain order
- How to include support for all page types, calendar urls, archive, etc
- ACF: Echo page title when checkbox is checked
- How do I reformat this to add php inside php?
- How to handle parent and child pages?
- How do I remove blog entries from home page Twenty Eleven child theme?
- Not able to see the error [closed]
- How can I change the URL via add_rewrite_rule()
- bloginfo url in javascript
- How to extract URLs from wordpress taxonomies