if has theme mod

Does someone know how to write the next line in wordpress PHP, because i’m not that great with PHP.

If_theme_mode has content echo { my content } else { other content };

thnx

2 Answers
2

try this code:

if( get_theme_mod('your_setting_name') ){
  //your code
}else{
  //your code
}

Note: get_theme_mod() return false if no value exist for your setting

Leave a Comment