This topic contains 6 replies, has 4 voices, and was last updated by Matthew Corsi 3 months, 3 weeks ago.
August 16, 2013 at 6:59 pm #33914
I was wondering if there was a way to make changes to the template files that will not be erased the next time the plugin is updated. In essence, what is the best way to go about customizing the results and search template files?
So far I’ve been very impressed with the plugin, great stuff!
MattAugust 16, 2013 at 8:03 pm #33917
Thank you, Matthew.
There is actually a simple way to keep your changes that I haven’t covered in the documentation yet.
You can use your theme or child theme folder to save your modified template files using the steps below (for example let say you are using “twenty twelve” theme):
1)Go to your theme or child theme folder and create a folder named geo-my-wp.
2)Within geo-my-wp folder you can create another folder named “posts-locator” if you are using the Posts Locator core extension and/or “members-locator” if you are using Members Locator extensions:
3) within each of those folders you can create two more folder: “search-forms” to place your search form custom template file search and/or “search-results” for custom search results template files.
4) Into each of the folders above you can copy-paste, from geo-my-wp core plugin folder, the search form or search results template folders that you would like to modify ( or create one from scratch ). Then you can modify the PHP and CSS files of your custom templates files.
so for example if you are modifying the ‘default’ search results template file of the Posts Locator extension, you will have something like:
this is pretty much the same structure of folders that it comes with the core plugin.
once you create your custom template file this way, you will be able to select it in GEO my WP form editor in the “Search form template” and “Results template” settings.
hope I did not confuse you.
the attached image is a screenshot of my local site:January 24, 2014 at 1:41 am #33916
I was able to get the custom results template to work at the following path
Following the same logic I cannot get my custom search form template to display
I’ve tried the following file path name combinations. What am I missing?
wp-content/themes/MyChildTheme/geo-my-wp/posts/search-forms/search-form.phpJanuary 24, 2014 at 3:25 am #33915
The current version of Support does not support the custom search form template files but only available as part of the Premimum Settings add-on.
However, the feature will most likely be added to the coming update of Support.
Which , I already have a first beta ready if you’d like to test.July 5, 2016 at 10:24 am #53060
I’m trying to make some tweaks to the “Current Location” css and I followed the above formula to try to create a “future-proof” file. But it doesn’t seem to be working.
The paths that I’ve tried:
MyTheme > geo-my-wp > current-location > assets > css > gmw-cl-style.css
MyTheme > geo-my-wp > plugins > current-location > assets > css > gmw-cl-style.css
Also, when disabling the css file (by renaming the file to xgmw-cl-style.css) in the default plugin add-on location, it just breaks, and doesn’t try to get my customized file at either of those locations.
Can you point me in the right direction?
The topic ‘Update Safe Changes to Template Files’ is closed to new replies.