How to load custom php file in Wordpress themes

enzo

I've just created a website using wordpress and a custom theme for it. This is my theme directory

/themes/customtheme/
 -index.php
 -header.php
 -footer.php
 -blog.php
 ....

The index.php includes header,footer,information to shown on my website, and a link to my blog page.

Blog file will looks same as normal blog site.

May i know how to write a hyperlink(a href) in index.php under theme directory so that it can prompt to the blog.php when click?

Grzegorz Pawlik

If I understand well your question you need to create a new page template using your blog.php file. Just add the following code at the beginning of the file:

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

And then create in the backed a new page and associate it to the newly created template.

Read more about page templates here.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to execute a wordpress function inside custom PHP file

From Dev

How can I add custom php include() file in wordpress

From Dev

How to add custom javascript code in the Wordpress file "single.php"

From Dev

How to load a Custom PHP Magento Block inside a template file

From Dev

How to update premium WordPress themes?

From Dev

How to modify Wordpress Themes on Openshift

From Dev

how to load a file with php

From Dev

Load in `.vimrc` themes and plugins from custom locations

From Dev

Create a Wordpress page with custom url and custom code in Themes

From Dev

How can I avoid Wordpress theme upgrades changing my parent themes functions.php?

From Dev

How to add a custom WordPress PDF file link

From Dev

How to load a custom js file with a controller?

From Dev

How to load custom configuration file with twisted?

From Dev

SASS and Liferay - how to use in custom themes?

From Dev

How to add custom Bootstrap themes to Heroku?

From Dev

How to load the javascript file in html (php) file

From Dev

How to load php file without php extension

From Dev

How to load php file without php extension

From Dev

How to include a custom php file?

From Dev

Wordpress: Load custom field in ajax

From Dev

Keeping WordPress theme and layout when opening custom php file

From Dev

How to use wordpress function in an ajax php file

From Dev

How to load php file to specific place on site?

From Dev

How to load random URL from a file in php

From Dev

How to load a php file correctly using jquery

From Dev

PHP How to load file contents as XML variable

From Dev

How to correctly load a PHP file in another PHP file?

From Dev

How to load bootstrap script and style in functions.php (wordpress)?

From Dev

How to load style.css after fonts.php in wordpress?

Related Related

  1. 1

    How to execute a wordpress function inside custom PHP file

  2. 2

    How can I add custom php include() file in wordpress

  3. 3

    How to add custom javascript code in the Wordpress file "single.php"

  4. 4

    How to load a Custom PHP Magento Block inside a template file

  5. 5

    How to update premium WordPress themes?

  6. 6

    How to modify Wordpress Themes on Openshift

  7. 7

    how to load a file with php

  8. 8

    Load in `.vimrc` themes and plugins from custom locations

  9. 9

    Create a Wordpress page with custom url and custom code in Themes

  10. 10

    How can I avoid Wordpress theme upgrades changing my parent themes functions.php?

  11. 11

    How to add a custom WordPress PDF file link

  12. 12

    How to load a custom js file with a controller?

  13. 13

    How to load custom configuration file with twisted?

  14. 14

    SASS and Liferay - how to use in custom themes?

  15. 15

    How to add custom Bootstrap themes to Heroku?

  16. 16

    How to load the javascript file in html (php) file

  17. 17

    How to load php file without php extension

  18. 18

    How to load php file without php extension

  19. 19

    How to include a custom php file?

  20. 20

    Wordpress: Load custom field in ajax

  21. 21

    Keeping WordPress theme and layout when opening custom php file

  22. 22

    How to use wordpress function in an ajax php file

  23. 23

    How to load php file to specific place on site?

  24. 24

    How to load random URL from a file in php

  25. 25

    How to load a php file correctly using jquery

  26. 26

    PHP How to load file contents as XML variable

  27. 27

    How to correctly load a PHP file in another PHP file?

  28. 28

    How to load bootstrap script and style in functions.php (wordpress)?

  29. 29

    How to load style.css after fonts.php in wordpress?

HotTag

Archive