• Hello guys,

    Sorry for a newbie question, I’m just getting started with WordPress.

    What am I trying to do is extend my site functionality: add some page with google maps on it. The page is rather heavy (tons of php an javascript on it) and does not look like a common “text displaying” WordPress page.

    I’ve read about plugins creaton and here is a way I have found:
    – Create some common page (let’s call it “map page”).
    – Create a plugin that tracks all pages loading, checks the ID, and replaces the content of my “map” page with my google maps stuff.

    Seems to be working, but it looks like I am doing it wrong. Tracking all pages for displaying a single one makes my developer experience cry.

    Can you please point me to a correct direction of adding a custom page to WordPress?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Doing it the way that you are is overkill, and really not needed. Not sure if that helps or just makes you feel bad for not doing it the easy way in the firt place, but don’t worry – everyone gets it worng the first time. And the next time, and pretty much most times after that. it’s all about learning as we go along. 🙂

    The way that I’d approach this is to set up a custom page template that holds all of the code for your system. That way you can assign that template to the page that you want to, and it won’t affect any other pages.

    Thread Starter zaero

    (@zaero)

    Thanks a lot!

    I’ve googled a bit about page templates creation and it’s just what I need.

    BTW, I found this article, hope it will help to new guys with similar question:
    https://www.cleancode.co.nz/blog/704/wordpress-page-specific-hooks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Best way to add custom page to he website’ is closed to new replies.