Converting my HTML template to WP Theme I am confused how to linkto the pages in WP?
For Example I have an Item div which I would like to link to my store page when user click on that but I dont know how to get the correct URL for my store page?!
This is also happening when I would like to link from another site to my page for example how I can link to my page from here?
http//www.ghazalphoto.portfolio.html Or
http//www.ghazalphoto.portfolio.php Or
http//www.ghazalphoto.portfolio
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
|||
|
|
|
Use this to output correct link:
Or if you know ID of your page (you can get ID from administration), you can use just (if ID is 2)
You can read more about get_permalink function here And I would also suggest you to read something about wp_nav_menu function to enable your theme to use Navigation menus. |
|||
|
|
|
When you create a page in wordpress it works like a template in your case to create a portfolio page you need to create a page-portfolio.php file in your theme folder. Add on first line:
Build your portfolio page here. Create a page in Administration-> Pages-> Add New. Select 'Portfolio Page' from drop down on right side. Publish and take note of the now live URL. In WordPress you can link in the code like:
|
||||
|
|
