This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( have_posts() ): | |
while ( have_posts() ): the_post(); | |
//Cargamos una plantilla u otra en función del formato de post | |
//El primer parámetro que recibe es el nombre del directorio que contiene las plantillas | |
get_template_part('template-parts', get_post_format()); | |
endwhile; | |
endif; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( have_posts() ): | |
while ( have_posts() ): the_post(); | |
//Mostramos el "slug" del formato de post | |
echo get_post_format(); | |
endwhile; | |
endif; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Damos soporte a los Post Formats: Aside, Link, Image, Video y Quote | |
add_theme_support( 'post-formats', array( 'aside', 'link', 'image', 'video' , 'quote' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Lesson Reply Notification | |
Description: Send and email to the student, when he receives a response | |
Author: David Perálvarez | |
Version: 1.0 | |
Author URI: https://silicodevalley.com | |
*/ | |
add_action( 'wp_insert_comment', 'scv_comment_notification', 99, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Front End Posting | |
Description: Create posts from the front end | |
Author: David Perálvarez | |
Version: 1.0 | |
Author URI: https://silicodevalley.com | |
*/ | |
// Front end submission form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Facebook Thumb Fixer | |
*/ | |
add_action('wp_head','fbfixthumbnail'); | |
function fbfixthumbnail(){ | |
global $post; | |
//If there is a post image | |
if (has_post_thumbnail()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="main"> | |
<header></header> | |
<ul> | |
<li class="item1"></li> | |
<li class="item2"></li> | |
<li class="item3"></li> | |
</ul> | |
<footer></footer> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
background-color: #f2f2f2; | |
width: 960px; | |
margin: 0 auto; | |
} | |
.post{ | |
background-color: white; | |
padding: 20px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" type="text/css" href="styles.css"> | |
<title>Selectores descendientes en CSS</title> | |
</head> | |
<body> | |
<header id="main-header"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
header{ | |
text-align: center; | |
} | |
#big-title{ | |
font-size: 60px; | |
margin: 30px 0 0 0; | |
} | |
#subtitle{ | |
font-style: italic; |