Précédent   Forum des professionnels en informatique > PHP > PHP & SGBD > PHP & MySQL
PHP & MySQL Forum d'entraide sur les fonctions MySQL avec PHP. Avant de poster -> FAQ MySQL, Cours MySQL et Sources MySQL. Pour les questions concernant le moteur MySQL plutôt que les fonctions PHP, merci d'utiliser le forum MySQL.
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 22/11/2011, 06h12   #1
Membre du Club
 
Avatar de bond70
 
Inscription : septembre 2008
Messages : 271
Détails du profil
Informations forums :
Inscription : septembre 2008
Messages : 271
Points : 45
Points : 45
Par défaut Afficher une div que sur certaine page

Bonjour,

J'aimerais afficher la div (ligne 14) : class="buildingDiv" sur toutes les pages de mon site SAUF la page d'accueil.

Savez-vous comment faire cela en php ?

MERCI !

Ma page : http://dev.leadcreation.com.au

Code de mon footer :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the id=main div and all content after
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */
?>
	</div><!-- #main -->

	<div style="clear: both; width: 100%" class="buildingDiv"></div>

	<footer id="colophon" role="contentinfo">

			<?php
				/* A sidebar in the footer? Yep. You can can customize
				 * your footer with three columns of widgets.
				 */
				get_sidebar( 'footer' );
			?>
			<div class="mainFooter widget-area">
				<?php if ( ! dynamic_sidebar( 'sidebar-7' ) ) : ?>
				<div id="site-generator">
					<?php do_action( 'twentyeleven_credits' ); ?>
					<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyeleven' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?></a>
				</div>
				<?php endif; // end sidebar widget area ?>
			</div>
	</footer><!-- #colophon -->
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>
bond70 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 22/11/2011, 09h33   #2
Invité régulier
 
Homme
Inscription : octobre 2011
Messages : 4
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations forums :
Inscription : octobre 2011
Messages : 4
Points : 5
Points : 5
Bonjour,

Peut-être en utilisant un test du type
Code :
1
2
3
4
5
6
7
8
 
<?php
    if($_SERVER["REQUEST_URI"] != "/index.php") :
?>
<div style="clear: both; width: 100%" class="buildingDiv"></div>
<?php
    endif;
?>
en mettant la valeur "/index.php" dans une constante ou un paramètre, selon le contexte.
A+
Psou78 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 11h05.


 
 
 
 
Partenaires

Hébergement Web