Try this below code your active theme.
$logo = sh_set( $options, 'site_logo', get_template_directory_uri().'/images/logo.png' );
$logo_other = sh_set( $options, 'site_logo', get_template_directory_uri().'/images/logo1.png' );
if (is_page( 42 ) || is_page( 54 ) || is_page( 6 ) || is_page( 8 ) || is_page( 15 ) || is_page( 66 ))
{
echo '<div class="site-logo"><a href="'. esc_url( home_url( "https://wordpress.stackexchange.com/" ) ) .'">';
echo '<img calss="mylogo1" title="'. get_bloginfo('name') .'" src="' . $logo_other .'" />';
echo '</a></div>';
}
else
{
echo '<div class="site-logo"><a href="'. esc_url( home_url( "https://wordpress.stackexchange.com/" ) ) .'">';
echo '<img calss="mylogo2" title="'. get_bloginfo('name') .'" src="' . $logo .'" />';
echo '</a></div>';
}
Related Posts:
- Convert hex color to RGB values in PHP
- How can I fetch loop of post titles via AJAX?
- Include WP_Query in my own PHP file?
- How to change the wp-login.php page title?
- Should I write a PHP function in home.php?
- How to exclude pages from the search results
- How can I limit the length of the previous/next posts in my WordPress Theme?
- how to put the logo in the center of other items in the navigation bar
- Debugging an error: wp_enqueue_style was called incorrectly
- How to log out everywhere else, destroy all sessions “all other devices”?
- Allow authors to post only in categories they create in WordPress
- How do I hide specific user profile fields?
- Using PHP to toggle stylesheet and header image, set in cookie
- Crop image from get_theme_mod Customizer field
- Inject PHP code into “sidebar-content” – code before my WooCommerce sidebar widget?
- Putting PHP variables into javascript [duplicate]
- Insert a button on a page with random number generation
- Change the site tagline (or similar) based on current page
- hover image appears below placeholder instead of overlayed
- How to find error in my code when the error message is pointing to WP core file?
- Send email on Job Dispatched from WP e-commerce [closed]
- Pass variable from one function to another
- Issues getting PHP to display in category pages
- WordPress Quick Question . How to Get Parent Link in Submenu in My Code
- How to edit widget code to add unique class name to each div?
- Exclude category
- how much php coding do i need to know in order to create web blog using wordpress.org
- WordPress wp_add_inline_style unable to give hex colors?
- Parse error: syntax error, unexpected end of file
- How would I use this filter to change the output of the date format to “Twitter time”?
- WP Business Directory Manager Plugin Admin Listings?
- wordpress admin plugin menu custom css
- How to append to an array and return the results in a filter?
- Why i can’t get custom fields value or post ID via Ajax?
- Fatal errors to undefined function in theme 404.php file [closed]
- Fallback image URL if no featured image exists via a shortcode function
- the_meta – no get_the_meta query?
- Get value from db for custom contact form
- WP insert post Redirect after function has executed
- Uncaught TypeError: extract(): Argument #1 ($array) must be of type array, null given
- add_action in namespace not working
- Using a new WP_Query inside the loop
- How to Send Pingbacks for all Posts in WordPress?
- Has a PHP update given me a 404?
- Replace background image with post thumbnail in shortcode
- Using A PHP App in WordPress
- HTML comment cause issue in functions.php script root
- Custom User registration system
- Rewrite rule not working, but only when parameter is text
- How to prevent adding data to a localhost database after refresh?
- wp_ajax_ 400 Bad Request
- How to display sticky post always at the top (before regular post) in wordpress?
- PHP warning with code for nav menu walker [duplicate]
- Woocommerce custom attributes list help
- custom fields anchor points php
- How to delete specific element when it is not homepage?
- How do I correct this filecount?
- Stripe button is not working in a template page
- Conditional Content Display
- How to use custom fields to replace top-level parent title with an image using wp_list_pages?
- Query posts by custom fields (object post)
- Sort author list alphabetically
- How to use url and amin-ajax.php
- WP – Ajax call back data printed in the console.log
- Dynamic Email Handler with ‘header (“Location: …’
- Grabbing value of input field inside of array
- Implement OAuth2 in custom plugin
- login redirect based on user role not work as expected
- redirect user from login page if is logged
- How to set variable to specific field when querying
- How to lock users account until approvation
- WooCommerce: write featured image dimensions to custom fields in product’
- How can I change the URL via add_rewrite_rule()
- Variable ++ in query loop
- Generate and upload screenshot as featured image for user-submitted post
- How can precision be improved for the debug log timestamp?
- Pull latest Youtube Video from json url and make new post
- Edit Error Page style
- How to sort wordpress posts by selecting a year from a drop down?
- WooCommerce Checkout Cart [closed]
- How can I get values from a custom post type depending on where I click on my SVG map?
- a problem in class in class-wp-hook.php
- Differences and dis/advanages between: Fast-CGI, CGI, Mod-PHP, SuPHP, PHP-FPM
- Count custom posts type and filter by tag
- Error with PHP 8
- How to create a User Role and give permission to only use Web Stories plugin?
- transition_post_status hook, works – but not if the post is new
- How can I change the location where the custom field is displayed in the Quick Edit tab in WordPress
- AJAX WP_Query’s order and orderby parameters not working
- PHP $_SESSION array – only showing current index
- How can I use AJAX in child theme template?
- WordPress taxonomy and terms question
- How do I a custom search form by taxonomies?
- WordPress REST API – Custom field not added to pages
- Woocommerce – add tracking code to another email template
- How to add custom user role into wordpress
- change title of page dynamically
- Custom Filtering date with newsletter
- WordPress critical error after trying to update to 6.2 – Fatal error: Allowed memory size of 268435456 bytes exhausted
- Custom plugin doesn’t show in admin menu – when code added, displays an empty page