Make Customizer Load Specific Page

Is it possible to force the WordPress Theme Customizer to load a specific page? Or a page template?

What about sample content. So instead of loading the home page content load dummy content that will help the user understand what it will look like with typical content instead of the content that’s there right now.

I haven’t tried anything and am looking for some suggestions where to start. Perhaps some hooks to look at.

1 Answer
1

Yes, you can definitely make the customizer load a specific page. You can also set a return page. You can do this with the query strings url & return. You need to pass encoded urls for these to work. So instead of loading http://yoursite.com/wp-admin/customize.php you will want to load http://yoursite.com/wp-admin/customize.php?url=http%3A%2F%2Flocalhost%3A8888%2F%3Fpage_id%3D2

In my example the customizer will load the page with page id = 2.

You can do the same for the return page with the return parameter.

See the wp-admin/customize.php file for more info.

Leave a Comment