Adding Banner above all pages
This topic contains 17 replies, has 6 voices, and was last updated by Kiran 6 years, 5 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
September 4, 2018 at 12:11 pm #445273
I’ve been able to create a widgetized section for a full width header banner to appear above all the geodirectory pages. What I’m struggling with is identifying where to add the widget (what INSERT POINT should be) and what the if conditions should be to indicate all geodirectory pages. Is this something that’s possible to setup?
/* Hook GeoDirectory Banner Widget on All Listing Pages add_action( 'INSERT POINT', 'c8d_before_directory_content' ); function c8d_before_directory_content() { if ( is_PAGE() ) { genesis_widget_area( 'geodirectory-banner', array( 'before' => '<div class="geodirectory-banner" class="widget-area"><div class="wrap">', 'after' => '</div></div>', ) ); } }
September 4, 2018 at 3:29 pm #445304You can use:
geodir_is_geodir_page()
or for a specific GD page:
geodir_is_page($gdpage)
where $gdpage is either:
‘add-listing’
‘preview’
‘listing-success’
‘detail’
‘listing’
‘location’
‘author’
‘search’September 4, 2018 at 3:57 pm #445310Thanks for that! Any idea what the insertion point should be? I’ve tried “genesis_before_content_sidebar_wrap” and “geodir-wrapper” to no avail, while trying both of the page references you provided.
September 4, 2018 at 5:19 pm #445323You can check the templates in :
geodirectory/geodirectory-templates
they all have a geodir_top_content action:
examples:
do_action('geodir_top_content', 'home-page'); do_action('geodir_top_content', 'add-listing-page');
I would try with that.
Hope this help and let us know how it goes,
Thanks
September 10, 2018 at 6:52 pm #446054Thank you! For the most part, I think I’ve been able to get it above the geodirectory pages with the exceptions of the Add Listing and Manage Listing pages for some reason.
logansquarist2.wpengine.com/directory/submit/?listing_type=gd_place
logansquarist2.wpengine.com/author/logansquarist/?geodir_dashbord=true&stype=gd_placeI have the function in place; not sure what’s amiss.
September 10, 2018 at 7:00 pm #446057You are welcome. If you copy the function here (use the code tags) or better in a gist and we’ll have a look at it.
Cheers,
September 11, 2018 at 4:05 am #446093This reply has been marked as private.September 11, 2018 at 3:54 pm #446168Assuming the genesis code is correct then that code actually looks ok.
Maybe try testing your code with something like
//* Hook GeoDirectory Banner Widget on All Listing Pages add_action( 'geodir_top_content', 'c8d_before_directory_content' ); function c8d_before_directory_content() { if ( geodir_is_page('add-listing') || geodir_is_page('preview') || geodir_is_page('listing-success') || geodir_is_page('detail') || geodir_is_page('listing') || geodir_is_page('location') || geodir_is_page('author') ) { echo "<div>testing 123</div>"; } }
If you have any problems please provide wp-admin details and i’ll take a look.
Thanks,
Stiofan
September 11, 2018 at 11:56 pm #446207This reply has been marked as private.September 12, 2018 at 9:31 am #446249Hello logansquarist,
Can you please share you FTP details so we can look more into this.
September 13, 2018 at 1:04 pm #446400This reply has been marked as private.September 13, 2018 at 4:23 pm #446434This reply has been marked as private.September 14, 2018 at 1:41 pm #446503Hello,
I also just discovered that submitting new listings through the login process isn’t working
I created one lisitng and it added successfully. Provide steps how can we recreate from our side.
I just noticed that notification emails are including links that are going to “page not found” results. I believe there is a permalink breakdown. I followed the instructions again but I’m still having trouble. Would someone be able to login to wp-admin and triple check my settings?
I checked publish listing notification and the listing received goes to correct listing. Let us know specific notification that you found issue.
Let us know.
Thanks,
KiranSeptember 14, 2018 at 1:43 pm #446505Hi Kiran,
Thanks for the reply. I realized the Custom Post Type add on had been turned off, so I believe that was causing the issue of links breaking. Apologies for not updating on this end. Just discovered this last night. I’m able to submit listings.
Thank you so much!
September 14, 2018 at 8:16 pm #446521Hi there, just seeing if anyone was able to look into the the banner image / widget problem. Please let me know when you get a moment. Thank you!
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket