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
  • Author
    Posts
  • #445273

    logansquarist
    Expired Member
    Post count: 34

    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>',
        ) );
      }
    }
    #445304

    Alex Rollin
    Moderator
    Post count: 27815

    You 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’

    #445310

    logansquarist
    Expired Member
    Post count: 34

    Thanks 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.

    #445323

    Paolo
    Site Admin
    Post count: 31211

    You 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

    #446054

    logansquarist
    Expired Member
    Post count: 34

    Thank 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_place

    I have the function in place; not sure what’s amiss.

    #446057

    Paolo
    Site Admin
    Post count: 31211

    You 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,

    #446093

    logansquarist
    Expired Member
    Post count: 34
    This reply has been marked as private.
    #446168

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Assuming 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

    #446207

    logansquarist
    Expired Member
    Post count: 34
    This reply has been marked as private.
    #446249

    dhaval
    Moderator
    Post count: 39

    Hello logansquarist,

    Can you please share you FTP details so we can look more into this.

    #446400

    logansquarist
    Expired Member
    Post count: 34
    This reply has been marked as private.
    #446434

    logansquarist
    Expired Member
    Post count: 34
    This reply has been marked as private.
    #446503

    Kiran
    Moderator
    Post count: 7069

    Hello,

    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,
    Kiran

    #446505

    logansquarist
    Expired Member
    Post count: 34

    Hi 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!

    #446521

    logansquarist
    Expired Member
    Post count: 34

    Hi 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!

Viewing 15 posts - 1 through 15 (of 18 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount