Display markers details in archive
-
I have mapsmarker working on wordpress and I want to display the markers in the map seperated from the map. For example all markers of all maps in an archive or simply sorted by category.
So I am looking for a way to use the mapsmarker API (get_marker) to display in a post the content of the marker object.
function my_marker_filter($content){
global $post;
if($post->post_title==’test_pagina’){
$db = new MMP\DB();
$marker = $db->get_marker(1);
//modify the incoming content
$content = $content . $marker[‘name’];
}
return $content;
}
add_filter( ‘the_content’, ‘my_marker_filter’ );Where I am going wrong?
The page I need help with: [log in to see the link]
- The topic ‘Display markers details in archive’ is closed to new replies.