EduardET

module-posts with link in header

Jan 29th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. <?php $id_attr = '' !== $module_id ? sprintf( ' id="%1$s"', esc_attr( $module_id ) ) : ''; ?>
  2. <div <?php echo $id_attr ?> class="module post-module et_pb_extra_module <?php echo esc_attr( $module_class ); ?>" style="border-top-color:<?php echo esc_attr( $border_top_color ); ?>">
  3.     <div class="module-head">
  4.         <?php
  5.             $idObj = get_category_by_slug($title);
  6.             $id = $idObj->term_id;
  7.             $link = get_category_link( $id );
  8.         ?>
  9.         <h1 style="color:<?php echo esc_attr( $module_title_color ); ?>"><a href="<?php echo $link; ?>"><?php echo esc_html( $title ); ?></a></h1>
  10.         <span class="module-filter"><?php echo esc_html( $sub_title ); ?></span>
  11.     </div>
  12.     <?php require locate_template( 'module-posts-content.php' ); ?>
  13. </div>
Advertisement
Add Comment
Please, Sign In to add comment