0

I am new on wordpress and are using the themes as well. May I know where do I put a new file if let say main.php? I want to make a custom main page and replace the index.php page on the theme. Do I need to put it under htdocs\wordpress\wp-content\themes\<theme-name>. I am using this locally on my computer.

On my main.php, I also include css file. Where do I insert the css file as well?

2
  • 1
    How to Create a Custom Page in WordPress wpbeginner.com/wp-themes/… Commented Jun 28, 2016 at 5:06
  • 1
    Thanks for the useful guide Commented Jun 28, 2016 at 6:03

2 Answers 2

1

you can set your front page in wordpress dashboard customization options

Go to Administration > Settings > Reading panel.

and select the page listing in dropdown , but before that you have to create a new page and select you custom page from dropdown . see the below image.

enter image description here

refer this for more info

you can have your css file keep on style directory of your theme and link it in your main page using

get_template_directory_uri() . '/styles/your-style-file.css'
Sign up to request clarification or add additional context in comments.

3 Comments

thanks for the help. For the get_template_directory_uri(), do I need to put on the admin page or on my main.php file?
In your main page , where you want to refer your custom css style file
Do I need to put this on the main page is_front_page() as well
0

You have to create page template for this.

Have a look over below thread hope this will help you

https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.