Advertisement
Jerunnon

wp_head() funktioniert nicht

Apr 24th, 2020
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.97 KB | None | 0 0
  1. // ### Code in der functions.php ###
  2.  
  3. <?php
  4.  
  5. function theme_slug_setup() {
  6.    add_theme_support( 'title-tag' );
  7. }
  8. add_action( 'after_setup_theme', 'theme_slug_setup' );
  9.  
  10.  
  11. function enqueue_my_custom_styles(){
  12.   wp_enqueue_scripts( 'flexbox', get_template_directory_uri() . '/css/flexboxgrid.css', array(), 1.0.0, 'all');
  13. }
  14. add_action('wp_enqueue_scripts', 'enqueue_my_custom_styles');
  15.  
  16. function pix_debug_head() {
  17.   echo '<!-- ####### Frisch eingefügt ###### -->';
  18. }
  19.  
  20. add_action( 'wp_head', 'pix_debug_head' );
  21.  
  22. ?>
  23.  
  24. //  ### Code aus der header.php ####
  25.  
  26. <!DOCTYPE html>
  27. <html lang="de">
  28. <head>
  29.   <meta charset="utf-8">
  30.   <?php wp_head(); ?>
  31. </head>
  32.  
  33. <body>
  34.   <header>
  35.     <div class="container">
  36.       <div class="row">
  37.         <div class="col-lg-12">
  38.           <a href="index.php">
  39.             <?php  get_header_image(); ?>
  40.           </a>
  41.           <?php get_template_part('template_parts/navi'); ?>
  42.         </div>
  43.       </div>
  44.     </div>
  45.  
  46.   </header>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement