Johannes davidian op 16/03/2017 12:33:30
<?php
/*
Template Name: contact
*/
if(is_page(43)) {
get_header('cotact');
}
?>
Moet het geen contact zijn?
Link gekopieerd
Als het probleem hem inderdaad zit in wat Obelix en Idefix zegt, en je include in header-contact.php een andere css dan in de standaard header.php file, dan is dat waarschijnlijk het probleem. Hoewel dat niet zou moeten omdat je css als het goed is via de officiele wordpress functie include en niet de link zo in de header zet.
Ik snap alleen je vraag niet precies:
als ik wil de kleur van hallo (word) veranderen i css , css erkent niet deze contact.php pagina wat het kan de reden zijn
Wat bedoel je met css erkent niet deze contact.php pagina? Bedoel je dat de css niet goed geinclude word? In welk css bestand en in welke class probeer je de kleur precies aan te passen?
Link gekopieerd
dank u wel,
Ik was paar dagen ziek dus ik kunde niet reageren.
ik heb het opgelost maar toch als u gaat naar deze pagina:
http://webdesignleren.net/contact/
u kunt zien dat het borders van het side bar(openings tijden etc.) onverwacht verdwijnt en na uren werkt komt het te
verschijnen.
hoe komt dat is het fout van foundation grid system or het fout ligt ergens anders .of het is beter om bootstrap gid system te gebruiken
plus u kunt zien dat ik wil het contact form op image verplaatsen asl background maar het borders van email en uw bericht (message) laat het niet zichzelf zien .
als ik contact form in aparte plaats dan het borders van email en uw bericht is wel zichtbaar net als het borders van naam etc.
hoe ik kan deze problemen oplossen .
ik heb 2 weken geleden contact form geplaatst op image als background toen deed alles correct.maar nu het doet vreemd .
contact page code is:
<?php
/*
Template Name: contact
*/
if(is_page(43)) {
get_header('cotact');
}
else {
get_header();
}
wp_head(); ?>
<div id="primary" class="content-area">
<div class="expanded row">
<main id="main" class="site-main small-12 column">
<div class="expanded row">
<div class="contact-form-tekst">Neem contact met ons op </div> </div>
<div class="small-8 column">
<div class="expanded row">
<div class="contact-form">
<?php
$image_url='http://webdesignleren.net/wp-content/uploads/2017/03/contact-form-background-800-500.jpg';
?>
<img src="<?php echo $image_url;?>">
<div class="expanded row">
<div class="contact-formT">Contactformulier</div> </div>
<div class="expanded row">
<div class="contact-formE small-12-column">
<form id="my_form" onsubmit="submitForm(); return false;">
<p><input id="n" placeholder="Naam" required></p>
<p><input id="e" placeholder="Email Address" type="email" required></p>
<p><input id="t" placeholder="telefoon" ></p>
<p><input id="o" placeholder="Onderwerp" required></p>
<textarea id="m" placeholder="Uw bericht" rows="2" required></textarea>
<p><input id="mybtn" type="submit" value="Submit Form"> <span id="status"></span></p>
</form>
</div></div>
</div></div>
</div>
<div class="small-4 column">
<div class="expanded row">
<div class="aside1-header-tekst small-12 column">Adres en contactgegevens</div> </div>
<div class="section-aside1">
<div class="expanded row">
<div class="subaside1 small-4 column">
<?php
echo do_shortcode('[smartslider3 slider=140]');
?>
</div>
<div class="subaside1-section2 small-8 column">
David's APK Station</br>
Klompenmakerstraat 123</br>
3194 DD Hoogvliet RT
</div>
</div>
<div class="expanded row">
<div class="subaside2 small-2 column">
<?php
echo do_shortcode('[smartslider3 slider=141]');
?>
</div>
<div class="subaside2-section2 small-8 small-pull-2 column">010-XXXXXX </div>
</div>
<div class="expanded row">
<div class="subaside3 small-2 column"><?php
echo do_shortcode('[smartslider3 slider=142]');
?> </div>
<div class="subaside3-section2 small-8 small-pull-2 column">>Plan route </div>
</div>
<div class="expanded row">
<div class="subaside4 small-10 column"> </div>
</div>
<div class="expanded row">
<div class="subaside5 small-12 column">Openingstijden David's APK Station Hoogvliet</div>
</div>
<div class="expanded row">
<div class="subaside6 small-4 column">
<table>
<tbody>
<tr>
<td>
Maandag
Dinsdag
Woensdag
Donderdag
Vrijdag
Zaterdag
Zondag
</td>
</tr>
</tbody>
</table>
</div>
<div class="subaside6-section2 small-6 small-pull-2 column">
<table>
<tbody>
<tr>
<td>08.00 - 18.00 uur
08.00 - 18.00 uur
08.00 - 18.00 uur
08.00 - 18.00 uur
08.00 - 18.00 uur
08.00 - 13.00 uur
Gesloten</td>
</tr>
</tbody>
</table>
</div>
</div>
</div><!-- end van aside1 -->
<div class="expanded row">
<div class="aside2-header-tekst small-12 column">Klantboordeling</div>
</div>
<div class="section-aside2">
<div class="expanded row">
<div class="KB-section1 small-7 column"><?php
echo do_shortcode('[smartslider3 slider=145]');
?> </div>
<div class="KB-section2 small-5 column"></div>
</div> </div>
<div class="expanded row">
<div class="aside3-header-tekst small-12 column">Werkplaats Afspraak</div> </div>
<div class="section-aside3">
<div class="expanded row">
<div class="WA-section1 small-6 column"> </div>
<div class="WA-section2 small-6 column"></div>
</div> </div>
<div class="expanded row">
<div class="aside4-header-tekst small-12 column">Facebook David's APK Station</div> </div>
<div class="section-aside4">
<div class="expanded row">
<div class="Facebook-section1 small-6 column"><?php
echo do_shortcode('[smartslider3 slider=146]');
?> </div>
<div class="Facebook-section2 small-6 column">> Volg ons op Facebook</div>
</div> </div>
<div class="expanded row">
<div class="aside5-header-tekst small-12 column">Twitter David's APK Station</div> </div>
<div class="section-aside5">
<div class="expanded row">
<div class="Twitter-section1 small-6 column"><?php
echo do_shortcode('[smartslider3 slider=147]');
?></div>
<div class="Twitter-section2 small-6 column">> Volg ons op Twitter</div>
</div>
</div>
</div>
</div>
<?php get_template_part('template-parts/content', 'page' );
?>
</main>
</div>
</div>
<?php
if( isset($_POST['n']) && isset($_POST['E']) && isset($_POST['t']) && isset($_POST['o']) && isset($_POST['M'] ) ) {
$n = $_POST['n'];
$e = $_POST['e'];
$t =$_POST['t'];
$o =$_POST['o'];
$m =nl2br($_POST['m'] );
$to ="[email protected] ";
$from = $e;
$subject = 'Contact Form Message';
$headers = "From: $from\n";
$headers .="MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
if(mail($to, $subject, $message, $headers) ) {
echo "success";
} else {
echo "The server Failed to sent the message. Please try again later.";
}
}
?>
<?php
get_footer();
css code voor sidebar is :
/*----------------
aside1------------*/
.aside1-header-tekst {
font-size:1.2em;
font-weight:500;
margin-top:4em;
color:#228B22;
}
.section-aside1 {
height:26em;
width:92%;
border:0.1em solid #074e68;
margin-top:0.4em;
}
.subaside1
{
padding-top:4.5%;
padding-left:4.5%;
float:left;
}
.subaside1-section2
{
font-size:0.80em;
padding-left:15.5%;
padding-top:3.1%;
float:right;
font-weight:500;
color:#074e68;
}
.subaside2
{
margin-top:1.5rem;
padding-left:4.5%;
}
.subaside2-section2
{
font-size:0.80em;
margin-left:0.5em;
margin-top:3em;
float:left;
font-weight:500;
color:#074e68;
}
.subaside3
{
float:left;
margin-top:0.2em;
padding-left:4.5%;
}
.subaside3-section2
{
font-size:0.80em;
margin-left:1em;
margin-top:2.5em;
float:left;
font-weight:500;
color:#074e68;
}
.subaside4 {
content: "";
display:block;
margin-top:0.01em;
margin-left:4.5%;
margin-right:4.5%;
border-bottom:0.050em solid #074e68;
width:90%;
}
.subaside5
{
font-size:0.80em;
padding-left:4.5%;
margin-top:0.5em;
font-weight:500;
color:#074e68;
}
.subaside6
{
font-size:0.80em;
padding-left:4.5%;
margin-top:-0.2em;
font-weight:500;
color:#074e68;
}
.subaside6-section2
{
font-size:0.80em;
padding-left:4.5%;
margin-top:-0.2em;
font-weight:500;
color:#074e68;
}
td {
border:hidden;
}
.aside2-header-tekst {
margin-top:3em;
font-size:1.2em;
font-weight:500;
color:#074e68;
}
.section-aside2{
border:0.1em solid #074e68;
height:8.25em;
width:92%;
margin-top:0.4em;
}
.KB-section1 {
padding-top:4.5%;
padding-left:4.5%;
float:left;
}
.aside3-header-tekst {
margin-top:3em;
font-size:1.2em;
font-weight:500;
color:#074e68;
}
.section-aside3 {
margin-top:0.4em;
border:0.1em solid #074e68;
height:8.25em;
width:92%;
}
.aside4-header-tekst {
margin-top:3em;
font-size:1.2em;
font-weight:500;
color:#074e68;
}
.section-aside4 {
margin-top:0.4em;
border:0.1em solid #074e68;
height:8.25em;
width:92%;
}
.Facebook-section1 {
padding-top:4.5%;
padding-left:4.5%;
float:left;
}
.Facebook-section2 {
font-size:0.80em;
padding-left:5%;
padding-top:27.5%;
float:left;
font-weight:500;
color:#074e68;
}
.aside5-header-tekst {
margin-top:3em;
font-size:1.2em;
font-weight:500;
color:#074e68;
}
.section-aside5 {
margin-top:0.4em;
border:0.1em solid #074e68;
height:8.25em;
width:92%;
}
.Twitter-section1 {
padding-top:4.5%;
padding-left:4.5%;
float:left;
}
.Twitter-section2 {
font-size:0.80em;
padding-left:5%;
padding-top:27.5%;
float:left;
font-weight:500;
color:#074e68;
}
contact for css code is :
/*---------------
contact pagina
------------------*/
.contact-form-tekst {
font-size:1.2em;
font-weight:500;
margin-top:4em;
color:#074e68;
margin-left:-3%;
}
.contact-form {
margin-top:0.4em;
}
.contact-formT {
color:red;
margin-top:-26em;
margin-left:2%;
}
.contact-formE {
margin-left:2%;
margin-top:-24em;
}
#n{
width:40%;
border:0.1em solid red;
}
#e{
width:20%;
border:0.1em solid #228B22;
}
#t {
width:20%;
border:0.1em solid #228B22;
}
#o {
width:20%;
border:0.1em solid #228B22;
#m {
width:10%;
border:0.1em solid #228B22;
margin-left:0.1%;
}
#mybtn{
width:12%;
border:0.1em solid #228B22;
}
dank u wel
johannes
[size=xsmall]
Toevoeging op 19/03/2017 19:01:40: [/size]
dak u wel iedereen,
ik heb de probleem opgelost op deze wijze.
php code:
<?php
/*
Template Name: contact
*/
if(is_page(43)) {
get_header('cotact');
}
else {
get_header();
}
wp_head(); ?>
<div class="expanded row">
<div id="primary" class="content-area">
<div class="expanded row">
<main id="main" class="site-main">
<div class="small-8 column">
<div class="expanded row">
<div class="contact-form-tekst small-4 column">Neem contact met ons op </div> </div>
<div class="expanded row">
<div class="contact-form">
<?php
$image_url='http://webdesignleren.net/wp-content/uploads/2017/03/contact-form-background-800-600.jpg';
?>
<img src="<?php echo $image_url;?>">
<div class="expanded row">
<div class="contact-formT">Contactformulier</div> </div>
<div class="expanded row">
<div class="contact-formE small-12-column">
<form id="my_form" onsubmit="submitForm(); return false;">
<p><input id="n" placeholder="Naam" required></p>
<p><input id="e" placeholder="Email Address" type="email" required></p>
<p><input id="t" placeholder="telefoon" ></p>
<p><input id="o" placeholder="Onderwerp" required></p>
<textarea id="m" placeholder="Uw bericht" rows="12" required></textarea>
<p><input id="mybtn" type="submit" value="Submit Form"> <span id="status"></span></p>
</form>
</div></div>
</div></div>
</div>
<div class="small-4 column">
<div class="expanded row">
<div class="aside1-header-tekst small-12 column">Adres en contactgegevens</div> </div>
<div class="section-aside1">
<div class="expanded row">
<div class="subaside1 small-4 column">
<?php
echo do_shortcode('[smartslider3 slider=140]');
?>
</div>
<div class="subaside1-section2 small-8 column">
David's APK Station</br>
Klompenmakerstraat 123</br>
3194 DD Hoogvliet RT
</div>
</div>
<div class="expanded row">
<div class="subaside2 small-2 column">
<?php
echo do_shortcode('[smartslider3 slider=141]');
?>
</div>
<div class="subaside2-section2 small-8 small-pull-2 column">010-XXXXXX </div>
</div>
<div class="expanded row">
<div class="subaside3 small-2 column"><?php
echo do_shortcode('[smartslider3 slider=142]');
?> </div>
<div class="subaside3-section2 small-8 small-pull-2 column">>Plan route </div>
</div>
<div class="expanded row">
<div class="subaside4 small-10 column"> </div>
</div>
<div class="expanded row">
<div class="subaside5 small-12 column">Openingstijden David's APK Station Hoogvliet</div>
</div>
<div class="expanded row">
<div class="subaside6 small-4 column">
<table>
<tbody>
<tr>
<td>
Maandag
Dinsdag
Woensdag
Donderdag
Vrijdag
Zaterdag
Zondag
</td>
</tr>
</tbody>
</table>
</div>
<div class="subaside6-section2 small-6 small-pull-2 column">
<table>
<tbody>
<tr>
<td>08.00 - 18.00 uur
08.00 - 18.00 uur
08.00 - 18.00 uur
08.00 - 18.00 uur
08.00 - 18.00 uur
08.00 - 13.00 uur
Gesloten</td>
</tr>
</tbody>
</table>
</div>
</div>
</div><!-- end van aside1 -->
<div class="expanded row">
<div class="aside2-header-tekst small-12 column">Klantboordeling</div>
</div>
<div class="section-aside2">
<div class="expanded row">
<div class="KB-section1 small-7 column"><?php
echo do_shortcode('[smartslider3 slider=145]');
?> </div>
<div class="KB-section2 small-5 column"></div>
</div> </div>
<div class="expanded row">
<div class="aside4-header-tekst small-12 column">Facebook David's APK Station</div> </div>
<div class="section-aside4">
<div class="expanded row">
<div class="Facebook-section1 small-6 column"><?php
echo do_shortcode('[smartslider3 slider=146]');
?> </div>
<div class="Facebook-section2 small-6 column">> Volg ons op Facebook</div>
</div> </div>
<div class="expanded row">
<div class="aside5-header-tekst small-12 column">Twitter David's APK Station</div> </div>
<div class="section-aside5">
<div class="expanded row">
<div class="Twitter-section1 small-6 column"><?php
echo do_shortcode('[smartslider3 slider=147]');
?></div>
<div class="Twitter-section2 small-6 column">> Volg ons op Twitter</div>
</div>
</div>
</div>
</div>
</main>
</div>
</div> </div>
<?php get_template_part('template-parts/content', 'page' );
?>
<?php
if( isset($_POST['n']) && isset($_POST['E']) && isset($_POST['t']) && isset($_POST['o']) && isset($_POST['M'] ) ) {
$n = $_POST['n'];
$e = $_POST['e'];
$t =$_POST['t'];
$o =$_POST['o'];
$m =nl2br($_POST['m'] );
$to ="[email protected] ";
$from = $e;
$subject = 'Contact Form Message';
$headers = "From: $from\n";
$headers .="MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
if(mail($to, $subject, $message, $headers) ) {
echo "success";
} else {
echo "The server Failed to sent the message. Please try again later.";
}
}
?>
<?php
get_footer();
CSSS code:
/*---------------
contact pagina
------------------*/
.contact-form-tekst {
font-size:1.2em;
font-weight:500;
margin-top:4em;
color:#074e68;
margin-left:-0.25%;
}
.contact-form {
margin-top:0.4em;
}
.contact-formT {
margin-top:-31em;
margin-left:1.5%;
font-size:1.2em;
font-weight:500;
color:#4f4f4f;
}
.contact-formE {
margin-left:1.5%;
margin-top:-35em;
}
#n{
width:30%;
border:0.1em solid #228B22;
margin-top:-1em;
height:2em;
}
#e{
width:30%;
border:0.1em solid #228B22;
margin-top:-1em;
height:2em;
}
#t {
width:30%;
border:0.1em solid #228B22;
margin-top:-2em;
height:2em;
}
#o {
width:30%;
border:0.1em solid #228B22;
margin-top:-2em;
height:2em;
}
#m {
width:80%;
border:0.1em solid #228B22;
margin-top:-1em;
}
#mybtn{
width:12%;
border:0.1em solid #228B22;
margin-top:1em;
}
[type=email]{display:inline-block!important;}
textarea {display:inline-block!important;}
/*----------------
aside1------------*/
.aside1-header-tekst {
font-size:1.2em;
font-weight:500;
margin-top:4em;
color:#074e68;
}
.section-aside1 {
height:26em;
width:92%;
border:0.1em solid #074e68;
margin-top:0.4em;
}
.subaside1
{
padding-top:4.5%;
padding-left:4.5%;
float:left;
}
.subaside1-section2
{
font-size:0.80em;
padding-left:15.5%;
padding-top:3.1%;
float:right;
font-weight:500;
color:#074e68;
}
.subaside2
{
margin-top:1.5rem;
padding-left:4.5%;
}
.subaside2-section2
{
font-size:0.80em;
margin-left:0.5em;
margin-top:3em;
float:left;
font-weight:500;
color:#074e68;
}
.subaside3
{
float:left;
margin-top:0.2em;
padding-left:4.5%;
}
.subaside3-section2
{
font-size:0.80em;
margin-left:1em;
margin-top:2.5em;
float:left;
font-weight:500;
color:#074e68;
}
.subaside4 {
content: "";
display:block;
margin-top:0.01em;
margin-left:4.5%;
margin-right:4.5%;
border-bottom:0.050em solid #074e68;
width:90%;
}
.subaside5
{
font-size:0.80em;
padding-left:4.5%;
margin-top:0.5em;
font-weight:500;
color:#074e68;
}
.subaside6
{
font-size:0.80em;
padding-left:4.5%;
margin-top:-0.2em;
font-weight:500;
color:#074e68;
}
.subaside6-section2
{
font-size:0.80em;
padding-left:4.5%;
margin-top:-0.2em;
font-weight:500;
color:#074e68;
}
td {
border:hidden;
}
.aside2-header-tekst {
margin-top:3em;
font-size:1.2em;
font-weight:500;
color:#074e68;
}
.section-aside2{
border:0.1em solid #074e68;
height:8.25em;
width:92%;
margin-top:0.4em;
}
.KB-section1 {
padding-top:4.5%;
padding-left:4.5%;
float:left;
}
.aside3-header-tekst {
margin-top:3em;
font-size:1.2em;
font-weight:500;
color:#074e68;
}
.section-aside3 {
margin-top:0.4em;
border:0.1em solid #074e68;
height:8.25em;
width:92%;
}
.aside4-header-tekst {
margin-top:3em;
font-size:1.2em;
font-weight:500;
color:#074e68;
}
.section-aside4 {
margin-top:0.4em;
border:0.1em solid #074e68;
height:8.25em;
width:92%;
}
.Facebook-section1 {
padding-top:4.5%;
padding-left:4.5%;
float:left;
}
.Facebook-section2 {
font-size:0.80em;
padding-left:5%;
padding-top:27.5%;
float:left;
font-weight:500;
color:#074e68;
}
.aside5-header-tekst {
margin-top:3em;
font-size:1.2em;
font-weight:500;
color:#074e68;
}
.section-aside5 {
margin-top:0.4em;
border:0.1em solid #074e68;
height:8.25em;
width:92%;
}
.Twitter-section1 {
padding-top:4.5%;
padding-left:4.5%;
float:left;
}
.Twitter-section2 {
font-size:0.80em;
padding-left:5%;
padding-top:27.5%;
float:left;
font-weight:500;
color:#074e68;
}
johannes
[size=xsmall]
Toevoeging op 19/03/2017 19:05:47: [/size]
ik wil iets bijvoegen ik heb op laatste moment gezien wat Obelix en Idefix gezegd de cotact moest veranderen naar contact.
johannes
Link gekopieerd
Als je de PHP-tags netjes afsluit ( ? >) zijn de code-blokken ook beter leesbaarder.
Link gekopieerd