Bitwise operators expect conditionals on either side of them to evaluate to either TRUE
or FALSE
. If FALSE
it checks the next conditional until it finds a TRUE
or all conditionals have been checked. Also, the is_page()
function doesn’t allow parameters to be passed in on a bitwise basis. So simply change your code to the below and you’re good!
<?php if ( is_page('Our-Team') || is_page('Representation') ) echo "page_active"; ?>
Related Posts:
- Mega Menu Walker
- start_lvl Ignored in Custom walker_nav_menu
- Displaying Logged-In User Name in WordPress Menu
- Hide main div if wp_nav_menu is empty
- Check if a menu is empty?
- How to remove a metabox from menu editor page?
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- How to add active class to custom menu using while loop and wp_list_pages
- WordPress menu deletes when trying to add a hook
- Logout and redirect using the WP Menu
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Run a filter when a walker runs
- Menu — How to add “current-menu-grand-ancestor” css class
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- Automatically adding new post categories to menu
- Add data attribute to each li in menu
- Unique icons next to each WordPress menu item
- Child page menu in sidebar
- Title Case WordPress Menu Items
- WordPress Quick Question . How to Get Parent Link in Submenu in My Code
- Detecting classes, adding widgets, and adding divs in with a Nav Walker
- How to change menu order item
- Add item to top of menu using a filter in functions.php
- Register a menu – Error Header
- Add login hyperlink to secondary navigation menu
- Add value to new attribute inside WordPress menu items
- Get the name of menu item with wp_nav_menu
- How to add aria role and schema markup to custom walker container
- How can I use custom menus with a Bootstrap WordPress theme?
- Nav-Menu not showing up
- Remove submenu item from list
- Dynamic Menu drops pages?
- Menu not styling. New menus functionality giving me a headache
- how to changes mobile menu toggle breakpoint in WordPress
- How to display already created menus via php?
- Providin exception to WordPress wp_nav_menu Custom CSS Classes
- How to put 2 php codes in functions.php without site crashing
- Menu not updating for logged in users after redirect
- Add element after navigation element title don’t works like I expect
- Add parent menu item in sub-menu in custom nav_walker
- Fatal error when using array_diff() function inside of wp_update_nav_menu hook?
- Pulling a variable into the wp_nav_menu function
- How I can add div to menu?
- WordPress adding in site URL to header links
- Custom Navigation Bar JSON Syntax Error in JSON at Position 0
- How to add different menu items on different menus?
- Enforcing password complexity
- How do I make my function add variables/values to the $post object?
- Calculate percentage of post by category
- Change comments form title on a page by page basis
- Creating wordpress user registration form
- Get the title before comma
- category not display in word press grammatically
- “Can’t use function return value in write context” error
- Display 4 chronological posts starting with a random post
- my function doesn’t return my post from today
- Warning: array_pop() expects parameter 1 to be array, boolean given
- items_wrap not working
- get_the_terms – only top level
- Changing Woocommerce flat rate every nth number of items
- Using file_get_contents with Gravity Forms uploads folder to create images in the media library returning false
- Replace word in “the_content” only for index.php
- Custom location for attached images
- WP Walker using custom css classes
- How to display posts by current user in a drop down
- How do I add custom bulk actions to multiple custom post types?
- Two menus show up
- How to display login form anywhere, when user isn’t logged in, without redirecting?
- Widget back end radio button issue
- GET problem in WordPress
- Help with WordPress function inside a shortcode
- Send a mail to specific address in a custom field when a new comment is made on a specific post
- WP All Import / Update stock quantity from multiple XML files
- How to style injected code in header section?
- Hide a div when a custom field is empty
- SQL error with custom query
- How to change basename url for wp-admin?
- How to exclude meta no index pages from wp_list_pages
- Products listing check if meta checkbox is checked
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Edit a function to take different actions based on user role
- Using Javascript On Page – Header and Footer Now Missing
- wp_get_nav_menu_items() with ACF
- How to give custom roles the capability to edit one Menu instead of every Menu
- Unzip_file causing Media file upload error
- Primary navigation menu with timed items from custom post type
- WP HTTP API call response
- Escaping a Single Quote in str_replace for Nav Function
- Private messaging – Getting and displaying the avatar/url of a message recipient
- insert thumbnail image from php script
- How to call a certain object/menubar in a PHP file
- Trying to see if page is category or single and displaying title with appropriate heading tag
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- Fix My Custom Function: Remove Automatic
- WP Debug enabled Undefined index error in a widget
- Dynamic Email Handler with ‘header (“Location: …’
- WooCommerce: write featured image dimensions to custom fields in product’
- Generate and upload screenshot as featured image for user-submitted post
- transition_post_status hook, works – but not if the post is new