Custom post type compatible?
-
How can I make the map interface available for custom post types, not just posts?
-
I have the same need. I wish to make Novo Maps work in the same way with my custom post type categories.
It’s on my list… sorry I did not have much time to code and improve the plugin lately
I need this feature too =)
+1 for us as well, thank you!
Hi guys,
I needed the same fix.
@mrdusty , @xmginc, @jacdesigner , @nwright2471
I was able to add the map to the new post after updating
class-novo-map-admin.php
Line 357
$screens = array( ‘post’, ‘page’, ‘YOUR POST TYPE’ );The map shows up on the custom post.
But I noticed an issue with this plugin having a conflict later on, as then I save the custom post I get a “This is no Post or Page.” messege on blank screen.
If I deactivate NovoMaps – the post saves fine.@bluisier Are you aware of this issue?
@plot0006 yes on line 527 of class-novo-map-admin.php I’m checking if it’s a post or page (that’s why you get this message) –>
if(! can_edit_post_page($post)) {so you could remove this checkBut this option is smthing many people are asking and I will add it… it’s just I have no time to look into it at the moment
First: Thank you for this nice Plugin!
+1 for custom post types. very important.
Hi everybody,
In version 1.0.9, I just added a new filter to allow you guy to enable novo-map for custom_post_type. You just need to add the followinf filter in you theme functions.php file :
add_filter( 'novo_map_allowed_post_type', 'novo_map_post_types' ); function novo_map_post_types($types) { $types = array( 'post', 'page', 'testimonial' ); return $types; }Est-ce que ca va renter en conflit avec ce que j’ai déjà implémenter :
Intégration de Novo-Map aux PROJECT (CTP)
Dossier plugins/novo-mapAjouter en ligne 381 ou 387 dans “class-novo-map-admin.php”
$screens = array( ‘post’, ‘page’, ‘project’ );Ajouter le code suivant après la ligne 70 dans “admin-helpers.php”
elseif ( isset( $post[‘post_type’] ) && ‘project’ == $post[‘post_type’] ) {
if ( ! current_user_can( ‘edit_post’, $post[‘ID’] ) ) {
_e(‘<div class=”notice notice-error is-dismissible”><p>User not allowed to edit this post.</p></div>’);
return false;
}
else {
return true;
}
}-
This reply was modified 6 years, 11 months ago by
GSF-Mateo.
@yaoxdutphn bien sur que si tu mets à jour le plugin, tes modifications vont être effacées. Il te faudra ensuite utiliser le filtre depuis le thème du site à la place
Oui ca je sais qu’à chaque mise à jour, je dois remettre ce code en place.
Mais alors pour que je comprenne bien, avec ta nouvelle mise à jour 1.0.9, l’ajout de CTP est automatique, ou il faut faire quelques chose pour les activer. Pour moi les CTP en l’occurrence s’appellent PROJECT. Merci pour ton éclairage.
MF@yaoxdutphn il te faut utiliser le filtre que j’ai ajouté dans la version 1.0.9 depuis le thème de ton site comme indiqué ici –> https://www.novo-monde.com/novo-map-manuel-utilisation/#filtres
-
This reply was modified 6 years, 11 months ago by
The topic ‘Custom post type compatible?’ is closed to new replies.