Skip to content

Instantly share code, notes, and snippets.

@Codevz
Last active June 18, 2022 10:36
Show Gist options
  • Save Codevz/f6eca42eef1fdcf007728e0478683476 to your computer and use it in GitHub Desktop.
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/
<?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' );
@Codevz
Copy link
Author

Codevz commented Jan 12, 2022

If you want to see more actions and hooks of XTRA WP theme, Please check out documentation here https://xtratheme.com/docs/developer/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment