Tweak shortcode content markup to match post markup
This commit is contained in:
@@ -15,9 +15,9 @@ if ( ! isset( $id ) )
|
|||||||
$post = get_post( $id );
|
$post = get_post( $id );
|
||||||
$content = $post->post_content;
|
$content = $post->post_content;
|
||||||
if ( $content ) {
|
if ( $content ) {
|
||||||
?>
|
?>
|
||||||
<div class="sp-template sp-section-staff-content sp-template-content">
|
<div class="sp-post-content">
|
||||||
<div class="sp-content"><?php echo apply_filters( 'the_content', $content ); ?></div>
|
<?php echo apply_filters( 'the_content', $content ); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@@ -15,9 +15,9 @@ if ( ! isset( $id ) )
|
|||||||
$post = get_post( $id );
|
$post = get_post( $id );
|
||||||
$excerpt = $post->post_excerpt;
|
$excerpt = $post->post_excerpt;
|
||||||
if ( $excerpt ) {
|
if ( $excerpt ) {
|
||||||
?>
|
?>
|
||||||
<div class="sp-template sp-section-staff-excerpt sp-template-excerpt">
|
<p class="sp-excerpt">
|
||||||
<p class="sp-excerpt"><?php echo $excerpt; ?></p>
|
<?php echo $excerpt; ?>
|
||||||
</div>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@@ -9,20 +9,16 @@
|
|||||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||||
|
|
||||||
if ( ! isset( $id ) )
|
if ( ! isset( $id ) )
|
||||||
$id = get_the_ID();
|
$id = get_the_ID();
|
||||||
|
|
||||||
$post = get_post( $id );
|
$post = get_post( $id );
|
||||||
$title = $post->post_title;
|
$title = $post->post_title;
|
||||||
if ( $title ) {
|
if ( $title ) {
|
||||||
|
$staff = new SP_Staff( $id );
|
||||||
$staff = new SP_Staff( $id );
|
$role = $staff->role();
|
||||||
$role = $staff->role();
|
if ( $role )
|
||||||
if ( $role )
|
$title = '<strong class="sp-staff-role">' . $role->name . '</strong> ' . $title;
|
||||||
$title = '<strong class="sp-staff-role">' . $role->name . '</strong> ' . $title;
|
?>
|
||||||
|
<h3 class="sp-staff-name"><?php echo $title ?></h3>
|
||||||
?>
|
<?php
|
||||||
<div class="sp-template sp-template-staff-header sp-template-header">
|
|
||||||
<h3 class="sp-item-title"><?php echo $title ?></h3>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user