rcriche
Respostas criadas no fórum
A visualizar 2 respostas - de 1 a 2 (de um total de 2)
-
Fórum: Questões avançadas
Em resposta a: Alternar cores do título de cada postacabei de conseguir fazer…
<?php $oddpost = 'alt_post'; if(have_posts()): while(have_posts()): the_post(); ?> <h2><?php the_title(); ?></h2> <?php the_content(); endwhile; endif; ?> <?php $newsArgs = array( 'post_type' => array('negócio'), 'showposts' => -1, 'order' => 'ASC'); query_posts( $newsArgs ); if ( have_posts() ) : while (have_posts()) : the_post(); ?> <div class="col-lg-4 pad25"> <h3 class="<?php echo $oddpost; ?>"><?php the_title(); ?></h3> <?php echo the_content(); ?> </div> <?php if ('alt_post' == $oddpost) $oddpost = ''; else $oddpost = 'alt_post'; endwhile; else: ?> <h4>Em breve...</h4> <?php endif; ?>
e o CSS
.chamadas h3 {color: #8fbe7a; border-top: 4px solid #8FBE7A; padding-top:10px} .alt_post {color: #02568a!important; border-top: 4px solid #02568a!important}
Fórum: Questões avançadas
Em resposta a: Custom Post Type + Taxonomy + Mapa de ImagensObrigado Ricardo… eu tinha colocado no pastebin mas parece que ele está com algum problema.
O código, agora, está assim:
<div class="row"> <div class="small-6 columns"> <figure> <ul id="map"> <li id="cac" estado="acre"><a href="#" id="acre" title="acre" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="AC" /></a></li> <li id="cal" estado="alagoas"><a href="#" id="alagoas" title="alagoas" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="AL" /></a></li> <li id="cam" estado="amazonas"><a href="#" id="amazonas" title="amazonas" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="AM" /></a></li> <li id="cap" estado="amapa"><a href="#" id="amapa" title="amapa" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="AP" /></a></li> <li id="cba" estado="bahia"><a href="#" id="bahia" title="bahia" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="BA" /></a></li> <li id="cce" estado="ceara"><a href="#" id="ceara" title="ceara" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="CE" /></a></li> <li id="cdf" estado="distritofederal"><a href="#" id="distritofederal" title="distritofederal" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="DF" /></a></li> <li id="ces" estado="espiritosanto"><a href="#" id="espiritosanto" title="espiritosanto" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="ES" /></a></li> <li id="cgo" estado="goias"><a href="#" id="goias" title="goias" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="GO" /></a></li> <li id="cma" estado="maranhao"><a href="#" id="maranhao" title="maranhao" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="MA" /></a></li> <li id="cmg" estado="minasgerais"><a href="#" id="minasgerais" title="minasgerais" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="MG" /></a></li> <li id="cms" estado="matogrossosul"><a href="#" id="matogrossosul" title="matogrossosul" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="MS" /></a></li> <li id="cmt" estado="matogrosso"><a href="#" id="matogrosso" title="matogrosso" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="MT" /></a></li> <li id="cpa" estado="para"><a href="#" id="para" title="para" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="PA" /></a></li> <li id="cpb" estado="paraiba"><a href="#" id="paraiba" title="paraiba" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="PB" /></a></li> <li id="cpe" estado="pernambuco"><a href="#" id="pernambuco" title="pernambuco" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="PE" /></a></li> <li id="cpi" estado="piaui"><a href="#" id="piaui" title="piaui" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="PI" /></a></li> <li id="cpr" estado="parana"><a href="#" id="parana" title="parana" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="PR" /></a></li> <li id="crj" estado="riodejaneiro"><a href="#" id="riodejaneiro" title="riodejaneiro" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="RJ" /></a></li> <li id="crn" estado="riograndedonorte"><a href="#" id="riograndedonorte" title="riograndedonorte" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="RN" /></a></li> <li id="cro" estado="rondonia"><a href="#" id="rondonia" title="rondonia" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="RO" /></a></li> <li id="crr" estado="roraima"><a href="#" id="roraima" title="roraima" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="RR" /></a></li> <li id="crs" estado="riograndedosul"><a href="#" id="riograndedosul" title="riograndedosul" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="RS" /></a></li> <li id="csc" estado="santacatarina"><a href="#" id="santacatarina" title="santacatarina" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="SC" /></a></li> <li id="cse" estado="sergipe"><a href="#" id="sergipe" title="sergipe" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="SE" /></a></li> <li id="csp" estado="saopaulo"><a href="#" id="saopaulo" title="saopaulo" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="SP" /></a></li> <li id="cto" estado="tocantins"><a href="#" id="tocantins" title="tocantins" target="#real"><img src="<?php bloginfo('template_directory') ?>/img/null.gif" alt="TO" /></a></li> </ul> </figure> </div> <div class="small-6 columns" id="real"> <?php global $post; $args = array( 'numberposts' => -1, //Todos os posts 'post_type' => 'realizacoes', //do Custom Post Type - realizações 'local' => 'parana' ); //do local São Paulo $myposts = get_posts( $args ); ?> <h3>Programas realizados no estado de: <?php single_cat_title(); ?></h3><br /> <?php //Cria uma listagem dos posts foreach( $myposts as $post ) : setup_postdata($post); ?> <div id="post-<?php the_ID(); ?>" class="blogpost"> <h4><?php the_title(); ?></h4> <?php the_content(); ?> </div> <?php endforeach; ?> </div> </div>
O que você me mandou está correto, ele chama e mostra as informações do local designado no array $args. Mas, agora, como chamar isso dinamicamente quando o usuário clicar em algum estado no mapa?
A visualizar 2 respostas - de 1 a 2 (de um total de 2)