Jay Desai
Jay Desai

Reputation: 475

How to make Wordpress Custom page

i m a newbie to wordpress. I have started theme development and encountered these problems. I think these kind of problem does have a solution, but i m not able to find it out.

I m trying to make a custom page. Uptill now i have made header, footer and main index page. I see that whenever my theme is activated, I see these default index page, with header and footer assign to it. I have also made some cutom about us , contact us pages using the Add Pages Functionality of wordpress.

My Problem: 1.Now I m trying to make custom product page where I will have more than 100 images on that pages, and then i can change the images, add the images and description and the link url in future. I have made some html code and put it in the text Tab . I can also see the images on the frontend of the Custom page. But my template breaks. Images goes up and description goes far below.

  1. Also i wanted to add fancybox to all the images which are goin to be replaced or added. But again my template breaks.

So can we make custom.php page and do some coding or anything which you feel is the right way of doing it, Please let me know.

Upvotes: 0

Views: 100

Answers (2)

Dhanuka Nuwan
Dhanuka Nuwan

Reputation: 700

Actually you don't really need to create a custom template for this unless if you are planing to use that same template on another page.

If your page name is products , just create a file called page-products.php in your theme root. and write your code inside that page.

If your planing to develop themes first be comfirtable with wp template hierarchy. http://codex.wordpress.org/Template_Hierarchy

Upvotes: 1

Khushboo
Khushboo

Reputation: 1817

Firstly create product.php page in templates folder using below code on top

<?php
/*
Template Name: My Product Page
*/

 get_header();
   // write your code here
 get_footer();

Then, assign the above template to the page in admin. Then, that page you can call in menu. For more detail, check here :- http://codex.wordpress.org/Page_Templates

Upvotes: 1

Related Questions