Last active
June 18, 2022 10:36
-
-
Save Codevz/f6eca42eef1fdcf007728e0478683476 to your computer and use it in GitHub Desktop.
XTRA WP Theme modify any options value on any individual pages and posts, https://xtratheme.com/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* With this function you can modify any options value for specific page or post. | |
* | |
* @var $value saved theme options value | |
* | |
* @return string|array | |
*/ | |
function codevz_custom_options( $options ) { | |
// Change logo on home page and page 404 | |
if ( is_front_page() || is_404() ) { | |
$options[ 'logo' ] = 'https://yoursite.com/MY_CUSTOM_LOGO.png'; | |
} | |
return $options; | |
} | |
add_filter( 'codevz/options', 'codevz_custom_options' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to see more actions and hooks of XTRA WP theme, Please check out documentation here https://xtratheme.com/docs/developer/