Advertisement
Marcos_Alexandre

Página colaboradoras

Jul 14th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.74 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Template Name: Página de Colaboradoras
  4.  */
  5. ?>
  6.    
  7. <?php get_header(); ?>
  8.  
  9. <div class="page-content">
  10.     <div class="container w-clearfix">
  11.       <div class="box-main-title">
  12.         <h1 class="titulo">Conheça <?php the_title(); ?></h1>
  13.       </div>
  14.       <div class="txt-centro"><?php the_content(); ?></div>
  15.  
  16.       <div class="columns w-clearfix" id="columns">
  17.  
  18.         <?php
  19.           $args = array( 'orderby' => 'display_name', 'order' => 'ASC', 'role' => 'Contributor' );
  20.           $autores = get_users( $args );
  21.         ?>
  22.         <?php foreach ( $autores as $autor ): ?>
  23.      
  24.         <div class="wrapper-colaboradora">
  25.           <div class="box-colaboradora">
  26.             <div class="perfil-autora-post">
  27.               <span class="avatar">
  28.                 <?php
  29.                 echo get_avatar( $autor->ID, 150 );
  30.                 ?>
  31.               </span>
  32.             </div>
  33.             <div class="box-nome-autora">
  34.               <h3 class="centro nome-autora"><a id="nome" class="link-autora" href="<?php site_url(); ?>/author/<?php echo $autor->user_nicename ?>"><?php echo $autor->display_name; ?></a></h3>
  35.               <div class="centro info-autora">COLABORADORA</div>
  36.             </div>
  37.             <p><?php echo $autor->description; ?></p>
  38.             <div class="icon-redes-post">            
  39.               <div class="icon-rede-colaboradora w-embed">
  40.               <?php if ( get_the_author_meta( 'facebookuser' ) !='' ) { ?>
  41.                     <a href="<?php the_author_meta( 'facebookuser' ); ?>" class="icon-social" target="_blank">
  42.                         <svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewbox="0 0 auto auto">
  43.                           <path d="M21.2 14.9c0-1.3 1.1-1.1 1.1-1.1h3.6V9.7h-5.4c-4.1 0-4.2 4.5-4.2 4.5v3.1 0l-2.3 0v3.7h2.3v11.2h4.9V21h4.1l0.6-3.7 -4.7 0v0C21.2 17.2 21.2 16.2 21.2 14.9z" fill="currentColor"></path>
  44.                         </svg>                
  45.                     </a>
  46.                 <?php } ?>
  47.               </div>
  48.               <div class="icon-rede-colaboradora w-embed">
  49.               <?php $twitter = get_the_author_meta( 'twitteruser' ); ?>
  50.               <?php if ( $twitter !='' ) { ?>
  51.                     <a href="<?php the_author_meta( 'twitteruser' ); ?>" class="icon-social" target="_blank">
  52.                         <svg xmlns="http://www.w3.org/2000/svg" width="auto" height="auto" viewbox="0 0 auto auto">
  53.                           <path d="M28.3 15c0 0 1.6-1.3 1.8-2.4 0 0-1.1 0.8-2.8 1.1 0 0-1.5-1.9-4.4-1.2 -2.8 0.7-3.4 3.8-3.1 5.1 0 0-4.9 0.1-9-4.5 0 0-2 3.3 1.4 5.8 0 0-1.6-0.1-2-0.5 0 0-0.2 3.4 3.5 4.3 0 0-0.9 0.3-2 0.2 0 0 1 2.8 4.1 2.9 0 0-2.8 2.4-6.5 1.8 0 0 3.9 2.8 9.1 1.7 0.3-0.1 0.5-0.1 0.8-0.2 3.3-1 6.2-3.2 7.8-6.3 0.1-0.2 0.2-0.4 0.3-0.6 0.7-1.5 1.2-3.4 1.1-5.6 0 0 1.7-1.2 2.2-2.2C30.7 14.4 29.6 14.9 28.3 15z" fill="currentColor"></path>
  54.                         </svg>
  55.                     </a>
  56.                 <?php } ?>
  57.               </div>
  58.               <div class="icon-rede-colaboradora w-embed">
  59.                <?php if ( get_the_author_meta( 'instagramuser' ) !='' ) { ?>
  60.                     <a href="<?php the_author_meta( 'instagramuser' ); ?>" class="icon-social" target="_blank">
  61.                         <svg xmlns="http://www.w3.org/2000/svg" width="auto" height="auto" viewbox="0 0 auto auto">
  62.                           <style>
  63.                             .a{fill:currentColor;}
  64.                           </style>
  65.                           <path d="M25.5 29.7H14.5c-2.3 0-4.1-1.8-4.1-4.1V14.3c0-2.2 1.9-4.1 4.1-4.1h11c2.3 0 4.1 1.8 4.1 4.1V25.7C29.6 27.9 27.8 29.7 25.5 29.7zM14.5 11.9c-1.4 0-2.5 1.1-2.5 2.4V25.7c0 1.3 1.1 2.4 2.5 2.4h11c1.4 0 2.5-1.1 2.5-2.4V14.3c0-1.3-1.1-2.4-2.5-2.4H14.5z" class="a"></path>
  66.                           <path d="M20 25.1c-2.8 0-5-2.3-5-5.1 0-2.8 2.3-5.1 5-5.1 2.8 0 5 2.3 5 5.1C25 22.8 22.8 25.1 20 25.1zM20 16.6c-1.9 0-3.4 1.5-3.4 3.4 0 1.9 1.5 3.4 3.4 3.4 1.9 0 3.4-1.5 3.4-3.4C23.4 18.1 21.9 16.6 20 16.6z" class="a"></path>
  67.                           <ellipse cx="25.41" cy="14.686" rx="1.178" ry="1.184" class="a"></ellipse>
  68.                         </svg>                
  69.                     </a>
  70.                 <?php } ?>
  71.  
  72.               </div>
  73.             </div>
  74.             <div class="wrapper-btn"><a class="btn btn-autor" href="<?php site_url(); ?>/author/<?php echo $autor->user_nicename ?>">Confira os posts</a>
  75.             </div>
  76.           </div><!--fim .box-colaboradora -->
  77.         </div><!--fim .wrapper-colaboradora -->
  78.  
  79.         <?php endforeach; ?>
  80.  
  81.       </div> <!--fim .columns -->
  82.     </div> <!--fim .container -->
  83.  
  84.      
  85.     <!-- ***PAGINAÇÃO ***
  86.       <div class="wrapper-pages">
  87.         <div class="div-block-5 w-clearfix">
  88.          <div class="box-pages">
  89.           <div class="pages w-clearfix">
  90.  
  91.           </div>
  92.          </div>
  93.         </div>
  94.       </div> ***FIM PAGINAÇÃO ***-->      
  95.    
  96.     <div class="maps">
  97.       <h2 class="custom-pg title-page">De onde vem a nossa fala</h2>
  98.       <div class="map" >
  99.         <span class="map">
  100.             <?php
  101.               if ( function_exists( 'the_field' ) ) {
  102.                 the_field ( 'mapa_colaboradoras' );
  103.               }
  104.             ?>
  105.         </span>
  106.       </div>
  107.       <div class="wrapper-btn"><a class="btn" href="<?php echo get_permalink(); ?>">Faça parte!</a>
  108.         <?php wp_reset_postdata(); ?>
  109.       <div class="title-page">Somos <a href="#" class="number-somos">
  110.         <?php
  111.  
  112.           $autoras = count( get_users( array( 'role' => 'Editor' ) ) );
  113.           $colaboradoras = count( get_users( array( 'role' => 'Contributor' ) ) );
  114.           $resultado = $autoras + $colaboradoras;
  115.  
  116.           echo $resultado;
  117.  
  118.         ?>
  119.       </a> usuários!</div>
  120.     </div>
  121.     </div> <!--fim .maps -->
  122. </div> <!--fim .page-content-->
  123.        
  124. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement