How to change category of a post automatically in WordPress?

How can one display the Dynamic Post category in a portfolio page of a WordPress website?

  • The post should display with title discription and featured image. <div class="wrapper about-bg"  style="margin-top:-3px">     <div class="main">Sortable Portfolio Four Columns       <div class="aboutright"><img src="<?php bloginfo('template_url');?>/images/aboright.jpg" alt="" align="absmiddle" />&nbsp;&nbsp;Home / portafolio / About Us</div>     </div>   </div>     <!----------------------About-content -start----------------------->   <div class="clr"></div>   <div class="content mainbg">     <div class="spacer35"></div>     <div class="fl"> <strong class="fl mr10">FILTER</strong>       <div class="tabmenu">         <ul>           <li><a href="#" class="act">All</a></li>           <li><a href="#">Web Design</a></li>           <li><a href="#">Branding</a></li>           <li><a href="#">Video</a></li>         </ul>       </div>     </div>     <div class="spacer10"></div>     <div class="content-third">     <?php $args = array( 'posts_per_page' => 3 ); $lastposts = get_posts( $args ); foreach ( $lastposts as $post ) :   setup_postdata( $post ); ?>       <div class="project1"> <a href="<?php the_permalink(); ?>"><img src="<?php echo $feat_image1; ?>" alt="" /></a>         <p> <strong><?php the_title(); ?></strong><br />         <?php the_content(); ?> </p>         <?php endforeach; wp_reset_postdata(); ?>       </div>       <div class="project1"> <img src="<?php bloginfo('template_url');?>/images/project-2.jpg" alt="" />         <p> <strong>Perspiciatis undo omnis.</strong><br />           Web Design </p>       </div>       <div class="project1"> <img src="<?php bloginfo('template_url');?>/images/project-3.jpg" alt="" />         <p> <strong>Perspiciatis undo omnis.</strong><br />           Web Design </p>       </div>       <div class="project1 marnone"> <img src="<?php bloginfo('template_url');?>/images/project-4.jpg" alt="" />         <p> <strong>Perspiciatis undo omnis.</strong><br />           Web Design </p>       </div>     </div>     <div class="spacer20"></div>     <div class="content-third">       <div class="project1"> <img src="<?php bloginfo('template_url');?>/images/portfol-image5.jpg" alt="" />         <p> <strong>Perspiciatis undo omnis.</strong><br />           Web Design </p>       </div>       <div class="project1"> <img src="<?php bloginfo('template_url');?>/images/portfol-image6.jpg" alt="" />         <p> <strong>Perspiciatis undo omnis.</strong><br />           Web Design </p>       </div>       <div class="project1"> <img src="<?php bloginfo('template_url');?>/images/portfol-image7.jpg" alt="" />         <p> <strong>Perspiciatis undo omnis.</strong><br />           Web Design </p>       </div>       <div class="project1 marnone"> <img src="<?php bloginfo('template_url');?>/images/portfol-image8.jpg" alt="" />         <p> <strong>Perspiciatis undo omnis.</strong><br />           Web Design </p>       </div>     </div>     <div class="spacer20"></div>     <div class="content-third">       <div class="project1"> <img src="<?php bloginfo('template_url');?>/images/portfol-image9.jpg" alt="" />         <p> <strong>Perspiciatis undo omnis.</strong><br />           Web Design </p>       </div>       <div class="project1"> <img src="<?php bloginfo('template_url');?>/images/portfol-image10.jpg" alt="" />         <p> <strong>Perspiciatis undo omnis.</strong><br />           Web Design </p>       </div>       <div class="project1"> <img src="<?php bloginfo('template_url');?>/images/portfol-image11.jpg" alt="" />         <p> <strong>Perspiciatis undo omnis.</strong><br />           Web Design </p>       </div>       <div class="project1 marnone"> <img src="<?php bloginfo('template_url');?>/images/portfol-image12.jpg" alt="" />         <p> <strong>Perspiciatis undo omnis.</strong><br />           Web Design </p>       </div>     </div>     <div class="fr mart20"> <a href="#"><img src="<?php bloginfo('template_url');?>/images/page123.jpg" width="165" height="31" alt="" /> </a> </div>         <!----------------------Client-logo----------------------->         <div class="content-five">       <div class="client"> <span>Our Clients</span></div>       <div class="marquee_box">                 <div align="center" class="marquee-inner">                     <div class="infiniteCarousel" id="basecontent_0_middlecontent_1_ctl00">                         <div style="overflow: hidden;" class="wrapper_slider" id="wrapper_slider">                             <ul style="width:9999px;">                                 <div class="clr">                                 </div>                                     <li class="cloned">                                     <img src="<?php bloginfo('template_url');?>/images/logo_1.png"></li>                                     <li class="cloned">                                     <img src="<?php bloginfo('template_url');?>/images/logo_2.png"></li>                                     <li class="cloned">                                     <img src="<?php bloginfo('template_url');?>/images/logo_3.png"></li>                                     <li class="cloned">                                     <img src="<?php bloginfo('template_url');?>/images/logo_4.png"></li>                                     <li class="cloned">                                     <img src="<?php bloginfo('template_url');?>/images/logo_5.png"></li>                                                                 <div class="cl">                                 </div>                             </ul>                         </div>                         <a class="arrow back" href="#">&lt;</a><a class="arrow forward" href="#">&gt;</a>                         <a href="#" class="arrow back">«</a><a href="#" class="arrow forward">»</a></div>                     <!--<a class="arrow back" href="#">«</a><a class="arrow forward" href="#">»</a></div>--> <script language="JavaScript" type="text/javascript" charset="utf-8">                         $(document).ready(function() {                             $('#basecontent_0_middlecontent_1_ctl00').infiniteCarousel(1000, 1, "easeInOutQuad");                             $("#basecontent_0_middlecontent_1_ctl00 .info h5 a").textTruncate(33);                         });</script>                                     </div>             </div>     </div>   </div>

  • Answer:

    I think that Quora is not the place to ask for help with your markup or code. Try stack exchange.

Keith Groben at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.