I am new to WP.
I have installed WP in my local system with WAMP and trying to create my own theme.
I have created pages and trying to set my "Home" page as front page and "Blogs" page as my posts page.
But when i try to change customizing theme page is giving error like "localhost redirected you too many times."
Kindly help me with this.
Thanks in advance.
Note: I have created style.css, index.php, header.php, footer.php & functions.php
footer.php
<footer>
<p>This is my footer</p>
<?php wp_nav_menu(array('theme_location'=>'secondary')); ?>
</footer>
<?php wp_footer(); ?>
</body>
</html>
functions.php
<?php
function first_script_enqueue() {
wp_enqueue_style('customstyle', get_template_directory_uri() . '/css/frist.css', array(), '1.0.0', 'all');
wp_enqueue_script('customjs', get_template_directory_uri() . '/js/frist.js', array(), '1.0.0', true);
}
add_action( 'wp_enqueue_scripts', 'first_script_enqueue');
function first_theme_setup() {
add_theme_support('menus');
register_nav_menu('primary', 'Primary Header Navigation');
register_nav_menu('secondary', 'Footer Navigation');
}
add_action('init', 'first_theme_setup');
header.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>First Theme</title>
<?php wp_head(); ?>
</head>
<body>
<?php wp_nav_menu(array('theme_location'=>'primary')); ?>
index.php
<?php get_header(); ?>
<h1>This is my index</h1>
<?php get_footer(); ?>
style.php
/*
Theme Name: First Theme
Description: This is first theme.
Version: 0.1 alpha
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: black, white, responsive, one-colume, two-colume, featured-image, custom-menu, custom-header, post-formats
*/
Note: first.css & first.js are there in mentioned folder but its empty for now.
code
sample for more help :)