Title: ob_start() function
Last modified: August 20, 2016

---

# ob_start() function

 *  [Gianluigi](https://wordpress.org/support/users/lastninja/)
 * (@lastninja)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/ob_start-function/)
 * Hi all,
    I want to edit the header of a template theme to insert a slideshow.
   I dont knw where header code is! Here’s the code of header.php:
 *     ```
       <?php if (wp_loaded() === true) { ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
       <head profile="http://gmpg.org/xfn/11">
       <meta http-equiv="Content-Type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" />
       <title><?php wp_title( '|', true, 'right' ); bloginfo( 'name' ); ?></title>
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url') ?>" type="text/css" media="screen" />
       <!--[if IE 6]><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie6.css" type="text/css" media="screen" /><![endif]-->
       <!--[if IE 7]><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie7.css" type="text/css" media="screen" /><![endif]-->
       <?php if(WP_VERSION < 3.0): ?>
       <link rel="alternate" type="application/rss+xml" title="<?php printf(__('%s RSS Feed', THEME_NS), get_bloginfo('name')); ?>" href="<?php bloginfo('rss2_url'); ?>" />
       <link rel="alternate" type="application/atom+xml" title="<?php printf(__('%s Atom Feed', THEME_NS), get_bloginfo('name')); ?>" href="<?php bloginfo('atom_url'); ?>" />
       <?php endif; ?>
       <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
       <?php if (is_file(TEMPLATEPATH .'/favicon.ico')):?>
       <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />
       <?php endif; ?>
       <?php wp_head(); ?>
       <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/script.js"></script>
       </head><?php } ?>
       <body <?php if(function_exists('body_class')) body_class(); ?>>
       <?php
       ob_start();
       ```
   
 * Where to start to modify header correctly? Waht is ob_start()?
 * Tks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 4 months ago](https://wordpress.org/support/topic/ob_start-function/#post-3342252)
 * That’s a PHP function to turn output buffering on [http://php.net/manual/en/function.ob-start.php](http://php.net/manual/en/function.ob-start.php)
 *  Thread Starter [Gianluigi](https://wordpress.org/support/users/lastninja/)
 * (@lastninja)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/ob_start-function/#post-3342266)
 * ok thanks but… what kind of buffering is? In other terms, what should be buffered
   and from what source?
 * tks
 * _[closed – continue with [http://wordpress.org/support/topic/worspress-structure-to-modify-header-image?replies=4](http://wordpress.org/support/topic/worspress-structure-to-modify-header-image?replies=4)]_

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘ob_start() function’ is closed to new replies.

## Tags

 * [header](https://wordpress.org/support/topic-tag/header/)
 * [ob_start](https://wordpress.org/support/topic-tag/ob_start/)

 * 2 replies
 * 2 participants
 * Last reply from: [Gianluigi](https://wordpress.org/support/users/lastninja/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/ob_start-function/#post-3342266)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
