I have Custom Post Type "pjesma" (song), and the only way I managed to display the content is like
It works fine:
<?php get_header(); global $post; $args = array( 'post_type' => 'pjesma', 'posts_per_page' => 10 ); $lastposts = get_posts( $args ); foreach ( $lastposts as $post ) : setup_postdata( $post ); ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </h2> <?php //the_content(); ?> <?php endforeach; wp_reset_postdata(); get_footer(); ?>
single-pjesma.php I can only use
the_title() so I use this
echo $post->post_content;. Content of
<?php get_header(); ?> <?php echo "<h1>"; the_title(); echo "</h1>"; echo $post->post_content; ?> <?php get_footer(); ?>
Now, the problem is that I have installed plugin Chords and Lyrics so I can properly display chords above lyrics and that plugin does not affect the content. Content is displayed as it is stored in the database I guess.
Is there any other way to display lyrics and chords so they are affected by the plugin?