Advertisement
xladomaz

Untitled

May 26th, 2019
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. function echo_links($post_id, $array) {
  2. $posts = $array;
  3. foreach( $posts as $key => $post ){
  4. setup_postdata($post);
  5. if(in_category($post_id, $post)) {
  6. echo '<li id="ember1434" class="course-pack-list__item course-promo-widget ember-view">
  7. <a href="'. get_the_title() .'" id="ember2654" class="course-promo-widget__cover ember-link ember-view"> <img src="'. get_the_post_thumbnail_url( 'thumbnail', '') .'" alt="Логотип курса" class="course-promo-widget__cover">
  8. </a>
  9. <ol class="course-promo-widget__owners">
  10. <li class="course-promo-widget__owners-item">
  11. <a title="'. get_post_meta(get_the_ID(), 'whomade', 1) .'" href="#" id="ember2694" class="course-promo-widget__owner ember-link ember-view">'. get_post_meta(get_the_ID(), 'whomade', 1) .'</a></li>
  12. </ol>
  13. <a href="'. get_the_permalink() .'" id="ember2656" class="course-promo-widget__title ember-link ember-view">'. get_the_title() .'
  14. </a>
  15. <ul class="course-promo-widget__stats">
  16. <li class="course-promo-widget__stats-item">
  17. <span aria-label="Количество записавшихся на курс" title="Количество записавшихся на курс" id="ember2657" class="course-promo-widget__stats-icon svg-icon st-user_icon ember-view">👤&nbsp;</span>'. get_post_meta(get_the_ID(), 'countpeoples', 1) .' </li>
  18. <li class="course-promo-widget__stats-item">
  19. <span title="Средняя оценка:">
  20. <span class="course-promo-widget__stats-icon">★</span> &nbsp;'.get_post_meta(get_the_ID(), 'mark', 1) .'</span>
  21. </li>
  22. </ul>
  23.  
  24. <!---->
  25. <!---->
  26. <!---->
  27. </li>';
  28. }
  29. }
  30. wp_reset_postdata();
  31. return true;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement