I'm building a traveling-page and i need to add the description of a train or a ship into the description of a trip. My code looks like this:
<?php if (!empty(rwmb_meta("train_ship"))) { ?>
<div class="maxtext_detail">
<?php $get_train = get_post( get_post_meta( $post->ID, "train_ship", true) );
setup_postdata( $get_train ); ?>
<h3><?php the_title(); ?></h3>
<p><?php the_content(); ?><a href="#" data-toggle="modal" data-target="#myModal">Read More</a></p>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel"><?php the_title(); ?></h4>
</div>
<div class="modal-body">
<?php the_content(); ?>
</div>
</div>
</div>
This is inside the Loop of a single.php. My problem is that the content only displays the text before the "read more" tag that I added to the post of the train. This is actually what i want to do with the first the_content, but the second should display the full content. Does anyone know why only the parts before the read more are displayed?
Thanks for your help