snippets to use for wordpress

Fix Thumbnails on oceanwp

 

.post img {
max-width: 300px;
height: auto;
}
.single .thumbnail { text-align: center; }
.single .thumbnail img { width: 408px !important; }

 

Yoast SEO how to fix the text link counter disabled error message

CREATE TABLE `wp_yoast_seo_links` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`post_id` bigint(20) unsigned NOT NULL,
`target_post_id` bigint(20) unsigned NOT NULL,
`type` varchar(8) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`), KEY `link_direction` (`post_id`,`type`) )
DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `wp_yoast_seo_meta` (
`object_id` bigint(20) unsigned NOT NULL,
`internal_link_count` int(10) unsigned NOT NULL DEFAULT ‘0’,
`incoming_link_count` int(10) unsigned DEFAULT NULL,
UNIQUE KEY `object_id` (`object_id`) ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

fix image size for featured images

.post img {
max-width: 300px;
height: auto;
}
.single .thumbnail { text-align: center; }
.single .thumbnail img { width: 408px !important; }
@media only screen and (max-width: 959px) {
.alignleft, .alignright, .single-post.content-max-width .wp-block-image.alignleft, .single-post.content-max-width .wp-block-image.alignright {
   display: block;