Modify HTML output

This topic contains 7 replies, has 2 voices, and was last updated by  Simone 9 years, 10 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #39745

    tringwebdesign
    Expired Member
    Post count: 34

    I know this can be done and is probably a lack of my understanding of how the actions/filters work. Can someone provide an example of modifying the HTML output.

    E.g. I would like on the detail event listing page to have the words “Event Details” and move the actual event title underneath the image carousel (action example?)

    Another (filter?) example is removing the event image form the map bubble (.geodir-bubble_image .geodir_thumbnail – setting this to display: none !impoortant; doesn’t seem to work)

    #39748

    Simone
    Expired Member
    Post count: 3515

    this should be working

    
    
    .geodir-bubble_image .geodir_thumbnail
    {display:none !important;}

    in your sample you had two “o” in !important

    About the title in the detail, I’m sure I have written a function here in the forum, I will search it and let you know

    #39751

    tringwebdesign
    Expired Member
    Post count: 34

    This did the trick with the bubble image

    
    
    .geodir-bubble_image {
    	display: none !important;
    }

    I think the other issue has something to do with geodir_action_before_single_post.

    edit: this might be it: https://wpgeodirectory.com/support/topic/move-slider-gallery/

    #39752

    tringwebdesign
    Expired Member
    Post count: 34

    Have replaced the event title below the image, just need to work out how to add more html into the main_content

    
    
    remove_action( 'geodir_details_main_content', 'geodir_action_page_title',20);
    add_action( 'geodir_details_main_content', 'geodir_action_page_title',35);
    #39753

    Simone
    Expired Member
    Post count: 3515

    What you mean with the HTML output? You mean based on the post type (e.g. only in events?)
    you can make something like that, in the function

    
    
    $current_posttype = geodir_get_current_posttype();
    if ($current_posttype =="gd_event") {
    echo "bla";
    } 
    #39754

    tringwebdesign
    Expired Member
    Post count: 34

    On the event listing page (domain.com/events/united-kingdom/greater-london/london/museum/star-wars-at-madame-tussauds/) inject the following:

    
    
    <article itemtype="http://schema.org/LocalBusiness" itemscope="" class="post-76 gd_event type-gd_event status-publish has-post-thumbnail hentry gd_event_tags-museum-1 gd_event_tags-star-wars gd_eventcategory-museum" id="post-76">
        <h2>Event Details</h2>
                <div class="geodir_flex-container">

    So

    <h2>Event Details</h2>

    is inserted before the flexslider

    #39756

    tringwebdesign
    Expired Member
    Post count: 34

    Got it, in my functions.php:

    
    
    add_action('geodir_before_single_post' , 'itson_geodir_before_single_post', 10);
    
    function itson_geodir_before_single_post(){
    ?>
    
    <h2>Event Details</h2>
    
    <?php
    }

    from your post: https://wpgeodirectory.com/support/topic/share-buttons/#post-29165

    #39759

    Simone
    Expired Member
    Post count: 3515

    great! 🙂

Viewing 8 posts - 1 through 8 (of 8 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