• Resolved liminalearth

    (@liminalearth)


    We are trying to use WordPress Hooks to override the ‘Read More’ link on our marker bubbles.

    I’ve read this part of the documentation here: https://www.open-user-map.com/knowledge-base/change-or-extend-content-of-each-location-bubble/ and think I need to do something like this

    add_filter('oum_location_bubble_content', function ( $content, $location ) {
    
        // Grab the Read More div ?
        // Replace it with the new href we want ?
    
        return $content;
    
    }, 10, 2);

    Instead of just going to the location permalink, we want to add on an extra param to the ‘read more’ link (like so: https://liminal.earth/stories/the-devils-causeway/?markerid=7938. That markerid will zoom in the map to the selected marker, and show the full page of the location).

    What’s the best way to grab the Read More div in that filter so we can override it? Or do we have to replace the entire content and build the bubble back up from scratch?

Viewing 1 replies (of 1 total)
  • Plugin Author 100plugins

    (@100plugins)

    Hi @liminalearth,

    You would need to build the whole bubble content to do this.

    This is the current code that builds the read more link:

    $link_tag = '<div class="oum_read_more"><a href="'. get_the_permalink($location['post_id']) .'">' . __('Read more', 'open-user-map') . '</a></div>';

    Hope this helps!

    Best regards,
    Daniel

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress Hooks to override the ‘Read More’ part of bubble’ is closed to new replies.