Home > Mobile >  Call a custom php function in header of wordpress theme
Call a custom php function in header of wordpress theme

Time:02-25

I have defined a custom function in functions.php., And I want to call it in header, exactly as <meta name="description" content="<?php meta_desc(); ?>">. But I am seeing empty meta description when I view source code. This custom function works well If I use it somewhere else.

CodePudding user response:

Hope this helps you :

<meta name="description" content="<?php echo meta_desc(); ?>">
  • Related