How do I add a class the_content();
?
<div class="csoporszoveg">
<h3 class="csoporcim"><?php
if ($settings['enable_link']) {
echo '<a href="' . get_permalink($post) . '">';
}
the_title();
if ($settings['enable_link']) {
echo '</a>';
}
?>
</h3>
<?php } ?>
<?php
if ( $content_source == 'excerpt' ) {
the_excerpt();
} else {
the_content();
}
?>
</div>
How do I add a class the_content();
?
<div class="csoporszoveg">
<h3 class="csoporcim"><?php
if ($settings['enable_link']) {
echo '<a href="' . get_permalink($post) . '">';
}
the_title();
if ($settings['enable_link']) {
echo '</a>';
}
?>
</h3>
<?php } ?>
<?php
if ( $content_source == 'excerpt' ) {
the_excerpt();
} else {
the_content();
}
?>
</div>
You don't. You'll need to put an element around it:
<?php if ( $content_source == 'excerpt' ) { ?>
<div class="excerpt">
<?php the_excerpt(); ?>
</div>
<?php } else { ?>
<div class="content">
<?php the_content(); ?>
</div>
<?php } ?>
<?php
if ( $content_source == 'excerpt' ) {
the_excerpt();
} else {
?>
<div class="post_content"><?php the_content(); ?><div>
<?php
}
?>
Target p
inside div.post_content
Like this:
<p class="description"><?php echo get_the_content();?></p>