Custom Page out of Wp Theme

i have this website running in WP and I had to create a feature to generate pages automatically and I did it through a separate WP backend, which creates the .php pages within the root of the site.

When I call domain/slug-of-page.php everything is ok.

But when I call the page without the extension (.php) the WP understands that it is an invalid url (404 error) because there is no page in the WP with that name.

I tried to insert the page created in the wp_posts table but when calling the page it loads the WP theme … I don’t want it to load the theme.

Is there a way to make the url friendly (without the extension) and not handled by the WP handler?

Thanks for every help.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

try this, wordpress has custom page templates.

Creating Custom Page Templates for Global Use


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x