Maybe it’s just a matter of parentheses.
if ( ( $post->post_parent == '4426' || in_array( '4426', $post->ancestors) ) && !is_page(4430) ) { // Who We Are
//do something
}
I’m assuming is_page
accepts an Integer being the page ID and 4430
is not the slug or page title.
Related Posts:
- How to check if post meta key exists or not in wordpress database
- Where is the old post permalink slug stored?
- Keyboard shortcut for updating a page or post?
- Custom Post Types, slug, archive and SEO plugins
- get all posts ID from a category
- Portable Post Links
- Related Posts by Multiple Tags?
- Action hook ‘wp’ firing twice… why?
- Manipulate post category after time
- Categories box not showing on post edit pages
- WP REST API, query total posts in a category
- how to enable different number of revisions for different blogs when using WPMU?
- Removing the title attribute from links in the post content
- How to remove_filter that filters iframes in posts? [duplicate]
- Some posts returning 404 instead of displaying post
- How to enqueue scripts depending on post formats?
- Custom function for “Submit for Review” hook
- If specific user role then sticky post
- How to add a custom field after wp post
- What Is meta_id In wp_postmeta?
- the_posts filter been called multiple time
- Submitting POST data to a custom page template triggers a 404, why?
- How to prevent WordPress from updating the modified time?
- Custom WP_QUERY $args
- Dynamic carousel on individual posts
- Can’t get the_content of the parent page from its single post?
- How do I Show ALL posts for Catagories and Tags?
- Prepend or add an Image to the content of a Post
- Remove all links in post content
- Select a specific post to display in a news box
- Having trouble with the_post_thumbnail to display thumbnail with custom size
- Classic editor throws 403 error based on post content
- How to build a site with a map that shows where people offer and need help?
- I get this error message when I try to add a module to a course on my website using Sensei plugin
- Getting value from get_post_custom
- Publish post’s date is set to Nov 30 -0001
- WP_Query: Mixing category__in and tag__in together
- Fix existing media names with accents
- How to exclude visited posts from loop
- How to display excerpt post on hamepage and archive pages?
- Worpdress function for difference dates
- Get all comments of author’s posts
- Problems with Page Not Found
- Get posts and include taxonomy term
- Adding bootstrap classes to video shortcodes
- Two Custom Post Types with Identical Articles Competing for the same Slug
- Single Post in Tab/Slider
- get_posts from a category id doesn’t work
- Change page creation layout
- Get post number both in the loop and in the post
- posts_per_page returning only one post
- After ajax image is outside the “ tag
- Get images from the post
- Can WordPress handle following functionalities?
- I can’t find the relevant part of the loop in my theme file. How do I find the full content with “More…”
- How to change the order of elements within a post?
- Right align a youtube video
- Post meta not working
- Classic Button in Classic editor
- Adding an option to post editor to show a site disclaimer or message
- Css and function issue on author archive page
- How do I fix broken links to images in imported posts’ post_content?
- Blog open in new Tab
- Posts order in grid
- Get post attachment with post id
- How to show random post order in specific category each refresh this category page
- Get Category in save_post Hook
- Refresh wordpress post without reloading browser
- how to make special modal for each post
- How can I set the permalink of an article / page equal to the permalink of an existing article / page?
- Administrator Posts
- How to show category image if no featured image is set?
- How to add category base prefix to wordpress permalink
- Get post id outside loop : Notice: Trying to get property of non-object
- WP_Query to get posts in a specific tag or has post_format
- How can I view my posts in ascending order by number of views
- Pagination for single post
- Sort / Filter Queries
- get_page_by_title() not working if special characters are present
- Editing WP Plugin
- Bulk replacing content of multiple pages/posts?
- How can add posts without category into category
- Ordering posts alphabetically by meta keys and title
- Continuous listing from a custom field
- Text editor has problem with having ” in a post
- Getting posts from multiple users?
- Add class name of content, Hypernate doesn’t work to IE and Chrome
- WordPress Post Grid
- Why I getting only 1 post?
- Choose options via url
- Stripping tag from elements in post
- find view post hyperlink in PHP wordpress admin file
- Even/Odd every two posts
- What function does the loop of displaying posts?
- Display post count on archive page in reverse order
- How can add custom commands in post-new.php in wordpress
- Filter/Sort Post Form On Taxonomy page
- Restore posts, but only posts that exist in my database backup
- How to move all images in a post to a single gallery for a bunch of posts?
- Display post by select it from a dropdown menu