Which file has geodir-wrapper and/or where are developer docs?
This topic contains 10 replies, has 6 voices, and was last updated by identity 10 years, 4 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
June 20, 2014 at 7:14 pm #5317
I’m trying to find what file generates:
<div id=”geodir-wrapper”
As I want to add a class … but I know there are going to me more questions as I dive in… I looked around a bit and don’t really see any developer docs? The readme.txt file wasn’t any help…
Are there more developer docs somewhere that describe the logic of how things are being done?
Or is everyone just reverse engineering by tinkering with files to see what does what…
For example, I’m confused if geodirlisting.php is what is being used on a page, or is it listing-listview.php that’s being used?
And neither of those files contain <div id=”geodir-wrapper” so…
And when I do find the one file that has <div id=”geodir-wrapper” — can I move that file into the theme directory to override?
Will I need to put everything into a folder geodirectory in the template?
I’m sure I’ll figure all this out by trial and error, but I prefer to RTFM can someone point the way to the Manual please?
June 21, 2014 at 2:46 am #5351There’s no detailed manual yet. This is still a very new product and the developers are releasing new versions weekly, based on initial user feedback. Once that settles down they have promised to document the customisation of themes, use of hooks and filters, etc etc.
So stay tuned, it shouldn’t be too long! 😉
Do you have a text search tool, I don’t have GeoDirectory installed at the moment, but the code you are looking for has to be in there somewhere!
June 21, 2014 at 3:35 am #5359Hi Jason, GD is a plugin, not a theme.
Once GD is activated, you should have all GD widgets in your WP widget page. Build your pages like that.If you want to restyle the GD wrapper, why not just change the style for the wrapper in your child theme’s style.css rather than changing plugin files? ALl your changes will be lost in any upgrade.
The current docs are here, but like purplededge says: under construction …
I hope I understood what you were after …
June 21, 2014 at 6:14 am #5386@jason – there are more people waiting for the docs to be released… the main issue IMHO is that the plugins change significantly from update to update so I think it’s currently unfortunately impossible to have consistent docs.
still, some more docs would be greatly appreciated…
June 23, 2014 at 5:07 pm #5730@purpleedge and @guust – thanks for your input — my theme uses Twitter Bootstrap, so I was going to add in “container” class and the pages that the plugin created when I activated it would then look perfect.
I’ll keep hunting for it… but I’ll also look into building all the pages I need out of the widgets.
I was hoping for Shortcodes — It would be ideal for users to be able to create a page, then just put in:
[geodir map]
[geodir list list-style=”grid”]
and so on.
By doing it all through widgets – I’ve got to build page-whatever.php and put in the calls to get the widgets.
** Update – or just install a plugin that lets me call widgets as shortcodes:
https://wordpress.org/plugins/amr-shortcode-any-widget/
Not a big deal, but shortcodes are the way to go IMO.
Especially for people who are using things like Visual Composer, shortcodes would be handy is all.
June 23, 2014 at 5:40 pm #5732Found it.. I think in all the various files in /geodirectory-templates there is the following:
##### WRAPPER OPEN ######
// this adds the opening html tags to the primary div, this required the closing tag below :: ($type=”,$id=”,$class=”)
do_action( ‘geodir_wrapper_open’, ‘listings-page’, ‘geodir-wrapper’,”);I changed to:
##### WRAPPER OPEN ######
// this adds the opening html tags to the primary div, this required the closing tag below :: ($type=”,$id=”,$class=”)
do_action( ‘geodir_wrapper_open’, ‘listings-page’, ‘geodir-wrapper’,’container’);And voila. Class added.
OK now it makes sense why I couldn’t find the geodir_wrapper_open ID in any of the core plugin files.
The core plugin files are looking to the template files to supply the type, ID and class.
Case closed / resolved.
June 23, 2014 at 10:13 pm #5784At the moment CTRL F is your best friend!
If you search for the action name, you can drill-down to see what it’s doing, then you can do a remove_action and add your own action to the hook in it’s place.
goedirectory_template_actions.php is worth studying.
To see which template files are loaded for various pages, take a look at geodirectory-functions/template_functions.php
nb. I should add that you won’t be changing any of the plugin files (as Guust said) – you can remove actions from the hooks and create your own actions in your theme’s functions.php file – or you can build templates in your theme…
July 2, 2014 at 2:59 am #7097Wow! Thanks for the AMR shortcode any widget tip. That’s an amazing bit of kit. Hopefully once the shortcodes are released it won’t be necessarily….would prefer to run with as few add-ons as possible, but it may be a great alternative and for now lets me experiment with some potential layouts within Enfold.
cheers
July 2, 2014 at 3:41 am #7108Okay, so in playing around (AMR still an awesome plugin to add to the toolbox) I discovered that Enfold can do same/similar by creating a custom widget, dropping in the specific GD widget and configuring it if necessary, and then using the Advanced Editor or the Shortcode wand to pull in a “Widget Area.” Even easier once you’ve created the custom widgets since they show up in the Widget Area dropdown.
Still a bit of a patch until official shortcodes come, but certain bridges the gap until then.
July 2, 2014 at 3:51 am #7112Hey Brian, with Enfold you can create text areas just about anywhere and add shortcodes to them. If shortcodes for all the GD functionality were available we could create our own pages in the backend and place whatever we like wherever we liked!
That’s what I’m hoping for anyway! 🙂
July 2, 2014 at 12:46 pm #7197purpleedge, that’s what is cool about the “Widget Area” feature in Enfold. It does take creating a custom widget, which is easy and then dragging the specified widget into it, but all relatively painless. Some things don’t necessarily display ideally and true shortcodes are the end goal.
In testing, I created custom widgets for the map, locations, and popular posts, dragging each of those into their own named widgets. From there, I created a new page and used the Advanced Editor to construct a new page layout: 1/2 text block & 1/2 homepage map widget, color block 1/1 icon box, 3/4 popular posts/listings widget (had to go with list view as the grids didn’t work as well) & 1/4 locations widget.
That was all just playing around and it looks like the Widget Area can be pulled up from the Enfold shortcode wand.
But yes, really need GD shortcodes that allow for more configuration for each instance to really get control over look and feel.
cheers
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket