Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » WordPress »

[Ayuda]Como simplificar este codigo

Estas en el tema de [Ayuda]Como simplificar este codigo en el foro de WordPress en Foros del Web. Buenas hice un carousel en mi tema wordpress este es el codigo Código: <div class="container"> <div class="row"> <div id="myCarousel" class="carousel slide"> <div class="carousel-inner"> <div class="item ...
  #1 (permalink)  
Antiguo 21/03/2016, 16:21
 
Fecha de Ingreso: marzo-2016
Mensajes: 7
Antigüedad: 8 años, 9 meses
Puntos: 0
[Ayuda]Como simplificar este codigo

Buenas hice un carousel en mi tema wordpress este es el codigo

Código:
<div class="container">
    	<div class="row">    	
    		<div id="myCarousel" class="carousel slide">
    			<div class="carousel-inner">
                   	<div class="item active">
	                    <div class="row">
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/car_logo_PNG1649.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Logo-de-Puma.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/intel-logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Burger_King_Logo.svg_.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/car_logo_PNG1649.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Adidas-Logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Logo-de-Puma.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/intel-logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Burger_King_Logo.svg_.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/car_logo_PNG1649.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Adidas-Logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Logo-de-Puma.png" alt="Image" class="img-responsive"></a></div>	                           
	                    </div>
	                </div>
	                <div class="item">
	                   	<div class="row">
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/car_logo_PNG1649.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Logo-de-Puma.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/intel-logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Burger_King_Logo.svg_.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/car_logo_PNG1649.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Adidas-Logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Logo-de-Puma.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/intel-logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Burger_King_Logo.svg_.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/car_logo_PNG1649.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Adidas-Logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Logo-de-Puma.png" alt="Image" class="img-responsive"></a></div>
	                   	</div>
	                </div>
					<div class="item">
						<div class="row">
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/car_logo_PNG1649.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Logo-de-Puma.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/intel-logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Burger_King_Logo.svg_.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/car_logo_PNG1649.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Adidas-Logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Logo-de-Puma.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/intel-logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Burger_King_Logo.svg_.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/car_logo_PNG1649.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Adidas-Logo.png" alt="Image" class="img-responsive"></a></div>
<div class="col-xs-2 col-sm-2 col-md-1"><a href="#x"><img src="http://localhost/wp-content/uploads/2016/03/Logo-de-Puma.png" alt="Image" class="img-responsive"></a></div>
						</div>
					</div>
	            </div>
	            <a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
	            <a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
	        </div>
        </div>
   	</div>
Pero quisiera simplificarlo algun ayuda, lo tengo en index.php
  #2 (permalink)  
Antiguo 21/03/2016, 20:47
Avatar de siddartha23  
Fecha de Ingreso: septiembre-2013
Mensajes: 357
Antigüedad: 11 años, 3 meses
Puntos: 39
Respuesta: [Ayuda]Como simplificar este codigo

Crea un CPT Slider de Logos y añádele un metabox que permita la subida de varias imágenes , luego llamas a todas las imágenes en un array y con un loop te queda mas limpio...
__________________
velarde23.com - Soluciones Web

Etiquetas: php, simplificar, tema
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:27.