0
votes

I have a Home Page(index.php) in my custom wordpress page . In Home page i have a horizontal navigation bar where i have a "contact us" section since i am new to wordpress development i dont know how to create contact us in wordpress.

code of my contact us page is

<?php/* This is contact page of SampleTheme */
?>

<?php
get_header();
?>
<div class="EventCalender">  <?php echo do_shortcode(' [do_widget id=spider_calendar-2]'); ?> <br>
<p class="EventCalenderPara"> There are  13 Planed events!! We all hope<br>
to see you and your family there! </p></div>
<?php get_footer(); /?>

when i run this page by runing url "localhost/wordpress/contact.php" i am getting 404 error. I have only index,header,footer,function,contact pages in my custom wordpress theme

1

1 Answers

0
votes

"localhost/wordpress/contact.php" -- It is wrong. you can create a new contact page then run this url "localhost/wordpress/contact" if your contact page name is "contact" If you want to create custom page follow this use this top of your contact.php page

<?php /* Template Name:Contact*/ ?>

Then go to dashboard -> pages -> edit contact page (if not exist create a new page) -> from right sidebar click template name and choose Contact. save and run