hallo,
deze is de code infunction.php :



add_action('init', 'my_register_styles');

function my_register_styles() {
    wp_register_style( 'auto-garage-style', get_template_directory_uri() . '/style.css' );    
    wp_register_style( 'auto-garage-contact-form', get_template_directory_uri() . '/contact-form.css' );

}
add_action( 'wp_enqueue_scripts', 'my_enqueue_styles' );

function my_enqueue_styles() {
    if ( is_front_page() ) {
        wp_enqueue_style( 'auto-garage-style' );
    } elseif ( is_page_template( 'contact.php' ) ) {        
        wp_enqueue_style( 'auto-garage-contact-form' );
    } else {
        wp_enqueue_style( 'auto-garage-style' );
    }
}




deze is de code in contact.php pagina :


<?php
 /* Template Name: Contact */ 
 
 ?>
<!DOCTYPE HTML>  
<html>

<style>
.error {color: #FF0000;}
</style>

	 
<div class="container">
<form id="contact" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post">
<h3>Quick Contact</h3>
<h4>Contact us today, and get reply with in 24 hours!</h4>
<fieldset>
      <input placeholder="Your name" type="text" tabindex="1" required="" autofocus=""></fieldset>
<fieldset>
      <input placeholder="Your Email Address" type="email" tabindex="2" required=""></fieldset>
<fieldset>
      <input placeholder="Your Phone Number" type="tel" tabindex="3" required=""></fieldset>
<fieldset>
      <input placeholder="Your Web Site starts with http://" type="url" tabindex="4" required=""></fieldset>
<fieldset>
      <textarea placeholder="Type your Message Here...." tabindex="5" required=""></textarea></fieldset>
<fieldset>
      <button name="submit" type="submit" id="contact-submit" data-submit="...Sending">Submit</button></fieldset>
</form></div>
</html>


de probleem is:
de contact.php pagina erkend niet de contact-form.css bestand.
ik heb paar keer voor zekerheid de cache van mij computer schoon gemaakt . maar het probleem blijft.
ik heb geprobeerd om link te maken van contact-form-css maar de probleem is hetzelfde.
dank u wel
ik heb geen ?> tag in my function.php
ook geen ?> tag in contact.php
Johannes davidian op 03/07/2022 21:36:57

ik heb geen ?> tag in my function.php
ook geen ?> tag in contact.php

Gaarne die in je code-blok van je bericht 19:36:07 toevoegen.
Dan is het topic ook weer leesbaar. Gelieve ook voortaan na het plaatsen van je bericht te kijken of je bericht er goed uitziet.

Reageren