Plugin Author
Sven
(@hofmannsven)
Thank you very much for your feedback!
You can display the markers of the current post via wp_get_post_terms() in the loop:
<?php
/*
* List marker of a post
*/
$post_markers = wp_get_post_terms( $post->ID, 'marker' );
echo '<ul>';
foreach ( $post_markers as $post_marker ) :
echo '<li>';
echo __('Marker', 'textdomain') . ': ' . $post_marker->name . '<br />';
echo __('Color', 'textdomain') . ': ' . $post_marker->description . '<br />';
echo '</li>';
endforeach;
echo '</ul>';
?>
Or show a list with all markers:
<?php
/*
* List all markers
*/
$args = array(
'taxonomy' => 'marker'
);
$makers = get_categories( $args );
echo '<ul>';
foreach ( $makers as $marker ) :
echo '<li>';
echo __('Marker', 'textdomain') . ': ' . $marker->name . '<br />';
echo __('Color', 'textdomain') . ': ' . $marker->description . '<br />';
echo '</li>';
endforeach;
echo '</ul>';
?>
thx for your answer, the first code is ok exept the color (near the mark (example: 7/10) i have #000000.
I try to change it and to adapt it for my manage template (custom) and my AZ index with manual mark: http://www.bandofmovies.fr/cinechezmoi/archives/
Thks, i begin in code (and english lol)
I install a wonderful foncion but the plugin “Mark post” fonctionning for Article, Page but not in WPMovieLibrary (new). Anyone possible to help me for finish my installation. Thx a lot
Very Sorry it’s ok i have the option
thanks
(no possible to edit post in this forum?)