The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

New Image on each page for header (3 posts)

  1. CieraH
    Posted 7 years ago #

    I am using WordPress as a CMS and trying to have a different image on each page as the header image. I am using the theme Parterprogramm. I am a beginner at PHP, CSS, HTML. Are there any plugins or other easy way to do this? I have read about multiple plugins and other optiond but I seem to get lost. My CSS style sheet is pulling the image (images/middle_home.jpg) by name:

    .middle {
    	width: 900px;
    	height: 150px;
    	float: left;
    	background: url(images/middle_home.jpg) no-repeat;
    	border-bottom: 4px solid #335877;
    	position: relative;
    	text-transform: uppercase;

    and my header.php code is below:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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="text/html; charset=iso-8859-1" inhalt="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    	<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
    	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    	<!--[if IE]><link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/ie.css" media="screen" /><![endif]-->
    	<?php wp_head(); ?>
    <div id="huelle">
    <div id="kopf">
    		<div id="search">
    			<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    				<input type="text" value="Search..." name="s" id="s" onfocus="if(this.value=='Search...')this.value=''" onblur="if(this.value=='')this.value='Search...'" />
    				<input type="submit" id="searchsubmit" value="" />
    	<div id="navigation">
    	  <ul><li <?php if(!is_page()) echo 'class="current_page_item"'; ?>></li>
        <div class="middle"></div>
    <div id="wrap">
    <?php if (function_exists('pixopoint_menu')) {pixopoint_menu();} ?>

    I don't want the image selection to be random - but if that's the only "easy" way - it will do.


  2. CieraH
    Posted 7 years ago #

    oh yeah - I can get a header image to show up at the top of the page using the plugin "Get the Image" but not to replace my actual header image original to the theme.

  3. quike
    Posted 7 years ago #

    i'm gonna try what it says under:


Topic Closed

This topic has been closed to new replies.

About this Topic