Templates - Creation and Design

I am looking to create a template for a new search page that will ultimately provide search just for a new post type that I am creating. I want to create a template so that I can push it out to a multisite and then have the search page exactly the way I want for all sites without having to touch the other sites or tweak them down the road.

I am not finding any posts that address creating a new layout template (not a cornerstone page, but a .php page) and how to get that to show up when creating a new page. I am finding links to Wordpress template management in the forum that go nowhere.

Hey @Mokono,

You can’t do this in Cornerstone out of the box. You’ll either need to build your own PHP search template or use a plugin like SearchWP.

We do have an in-house custom development team that offer paid services, who may be able to assist. They can be contacted at [email protected] if this is of interest to you.

Thank you for your understanding.

I am fully aware this can’t be done in Cornerstone, which is why I said that above. You used to have some topics that talked about creating template pages but those went away with the new forum revamp.

Any chance those pages are coming back?

Hi there,

Those are only applicable for old versions of the theme since the structure is much simpler back then. Plus, those are just creating standard templates. What you’re trying to do is create a separate search functionality and template for a custom post type which will be more complex. Wordpress has only one search functionality by default and it already covers all post types.

And if you just wish to create search form while using Wordpress’s default search template then you can simply create one, like this

<form class="search" action="<?php echo home_url( '/' ); ?>">
        <input type="search" name="s" placeholder="Search&hellip;">
        <input type="submit" value="Search">
        <input type="hidden" name="post_type" value="custom-post-type">
</form>

No need for another template. Or you can simply edit the file /x/searchform.php and apply the above code.

But with creating a separate search feature and functionality for a post type is not something we can cover, it’s a bit complex since it’s not just modifying the theme’s template, but also some Wordpress default functionality or even search widgets.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.