WordPress with custom PHP code

I’m a senior PHP developer but have rarely used WordPress.
My question is how difficult is it to incorporate custom PHP code into WordPress?

Not only PHP, but JS Ajax calls to PHP as well?

My plan is to build a site using WordPress but there will be some custom searching (e.g. Google map api calls, etc )
How difficult is this with WordPress?

2 Comments
  1. It’s easy, WordPress is a PHP project like any other. Just dated, coming from old style procedural PHP days. There had been plenty of third party effort to iron out how to run it with more relevant PHP development practices (such as Composer) though.

    You are completely in control of theme code and can use anything you want on front-end side. For integrating well with WP it would be advisable to get acquainted with how it does related things, queueing assets and such, for best compatibility.

    If you mean making JS calls to WP itself: there is older rather barebone AJAX endpoint where you just add a callback with arbitrary logic, and newer WP REST API that is more framework-y and can be extended.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer