Skip to content

Instantly share code, notes, and snippets.

@timoleinio
timoleinio / footer.php
Created January 5, 2014 13:40
WordPress Twenty Fourteen modified footer
<?php
add_filter('upload_mimes', 'wpopas_remove_custom_upload_mimes');
function wpopas_remove_custom_upload_mimes( $mimes = array() ) {
//Poista tiedostotyyppi
unset( $mimes['png'] );
return $mimes;
}
<?php
add_filter('upload_mimes', 'wpopas_add_custom_upload_mimes');
function wpopas_add_custom_upload_mimes( $mimes = array() ) {
// Lisää tiedostotyyppi
$mimes['kmz'] = 'application/vnd.google-earth.kmz';
return $mimes;
}
@media screen and (min-width: 800px) and (max-width: 1200px) {
.leftSidebar{
width: 40%;
float: left;
}
}
img{
max-width: 100
}
img{
width: 100%
}
class GroupingSampleForm(forms.Form):
username = forms.CharField()
email = forms.EmailField()
real_name = forms.CharField()
favorite_color = forms.CharField()
favorite_animal = forms.ChoiceField(
choices=(('cat', 'Cat'), ('dog', 'Dog')
))
favorite_food = forms.CharField()
{% for field in form %}
{% include "field.html" %}
{% endfor %}
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}