• Hello,

    I am using wordpress as a homepage for an upcoming event. Depending on how much sponsors are paying, their logo shall be shown on some but not on all pages. The theme i am using contains the following code:

    function nichtAufSeite($pageName){
    		$this->pages[]=$pageName;
    	}
    
    	function displayOK($pageName){
    		if (count($this->pages)==0) return true;
    		if (in_array($pageName,$this->pages)) return false;
    		return true;
    
    	}

    A sponsor can be added with the folling entry:

    $sponsor = new Sponsor();
    $sponsor->name ='SPONSOREN';
    $sponsor->uri ='www.myurl.de/';
    $sponsor->bild ='sponsoren.png';
    $sponsor->mouseOverBild ='sponsoren.png';
    <ul>$sponsor->nichtAufSeite('start');</ul>
    $sponsors[]=$sponsor;

    The underlined items tell WP on what page this particular sponsor shall not be show.

    However, lets say the page “start” has some child pages. How do I have to modify the code, so that the sponsor is not show on the page “start” but is shown on the page “start/childpage” ?

    Thanks in advance.

  • The topic ‘Displaying Items on Child- but not on Parentpages’ is closed to new replies.