Skip to content

Instantly share code, notes, and snippets.

@algaesolution
algaesolution / cf7.html
Created February 11, 2023 04:30
You can custom position of warning message in contact form 7 plugin of Wordpress
Trong trang admin của contact form 7, đây là ví dụ cho cách sử dụng
<div class="smf-data-field">
<div class="smf-field-row">
[text* your-family-name placeholder "family name"]
[text* your-first-name placeholder "first name"]
</div>
<span class="custom-error-message your-first-name"></span>
</div>
@algaesolution
algaesolution / index.html
Created February 4, 2023 04:14
Hover animation for link (underline animation left to right)
<a href="#" class="hover-underline active">Hover me</a>
<a href="#" class="hover-underline">Hover me</a>
@algaesolution
algaesolution / index.html
Last active February 4, 2023 03:29
Hover animation for link (underline animation)
<a href="#" class="hover-underline active">Hover me. I am actived</a>
<a href="#" class="hover-underline">Hover me</a>
@algaesolution
algaesolution / index.html
Created January 21, 2023 04:28
CSS text typing animation
<h1 class="typing-text">
Welcome to Algae
</h1>
@algaesolution
algaesolution / function.php
Last active January 10, 2023 13:16
Setup thumbnail size in function.php
/*
---------------------------------------------------------*/
function setup() {
add_theme_support( 'title-tag' );
add_theme_support( 'post-thumbnails' );
if ( function_exists( 'add_image_size' ) ) {
add_image_size('thumb-347x194', 347, 194, true);
}
}
@algaesolution
algaesolution / acf.php
Created January 10, 2023 13:01
Get image from ACF field and make custom size
?php
$image = get_field("list_img");
$size = "thumb-347x194"; // (thumbnail, medium, large, full or custom size)
if ($image) {
echo wp_get_attachment_image($image, $size, false, [
"class" => "card-img-top",
]);
} else {
?>
<img src="<?= esc_url(
@algaesolution
algaesolution / background.scss
Last active January 2, 2023 04:58
How to make grid background by CSS
body {
background-image: linear-gradient(
transparent 11px,
#fff 12px,
transparent 12px
),
linear-gradient(90deg, #c6d8bf 11px, #fff 12px, transparent 12px);
background-size: 100% 12px, 12px 100%;
}
@algaesolution
algaesolution / animate.scss
Created September 27, 2022 14:30
Animate CSS: Hoạt ảnh chữ Fade In đơn giản (Animat CSS Fade in text)
@keyframes text-animation {
0% {
opacity: 0;
transform: translateX(-50%);
}
100% {
opacity: 1;
transform: translateX(0);
}