Tag Info

New answers tagged

0

Could there be something happening in Customizer then? I'm seeing the same thing as the OP here. I can confirm that with about 30 options my Customizer load time dropped from around 3s, to around .5s when switching to get_option over get_theme_mod Calling the methods directly I see a 2ms difference. ...


0

get_theme_mod is just a wrapper around get_option. In theory because it is another layer of abstraction it will work slower but in practice the difference should not be big enough to be noticed by a human. Actual speed differences can be caused if you have some slow code hooked on the theme_mod hooks.


1

You can use PHP's stripslashes() command: <?php echo stripslashes( get_option( 'myOption' ) );


-1

Use it like this : <div id="page" class="hfeed site"> <?php do_action( 'before' ); ?> <?php $page_id = ( 'page' == get_option( 'show_on_front' ) ? get_option( 'page_for_posts' ) : get_the_ID ); $banner = get_post_meta( $page_id, 'banner', true ); if (is_front_page() || $banner == '') { ?> <header id="masthead" ...



Top 50 recent answers are included