Animated Labels Styling
.animated-label.active .animated-label-input input[data-input], .animated-label.active .animated-label-input input[data-input]:empty { color: initial; } .animated-label-input input[data-input], .animated-label-input input[data-input]:empty { color: transparent; }
Limit User Role to their own posts in WordPress Admin
function posts_for_current_author($query) { global $pagenow; if( 'edit.php' != $pagenow || !$query->is_admin ) return $query; if( !current_user_can( 'edit_others_posts' ) ) { global $user_ID; $query->set('author', $user_ID ); } return $query; } add_filter('pre_get_posts', 'posts_for_current_author');
The post title says it all…
Note: If you cut down admin privileges for user roles as well you can use the admin section for front end posting. Just remember you need to include admin styles differently when its for the admin section. You need a script for the functions.php file.
WordPress Child Theme Code
- Create these files first
- functions.php
- style.css
- style-mobile.css
- script.js
for functions.php
<?php function my_theme_enqueue_styles() { $parent_style = '../Divi'; wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-styles', get_stylesheet_directory_uri() . '/style.css'); wp_enqueue_style( 'child-style-mobile', get_stylesheet_directory_uri() . '/style-mobile.css'); wp_enqueue_script('child-scripts', get_template_directory_uri() . '/script.js' ); } add_action("wp_enqueue_scripts","my_theme_enqueue_styles"); ?>
for script.js
jQuery(document).ready(function( $ ) { console.log('Ready!'); }
for style.css
/* Theme Name: Divi Child Description: A dev site Author: Garth Baker Template: Divi */
for style-mobile.css
@media only screen and (max-width:600px) { /*--------------------------------*/ }
© Garth Baker 2025 All rights reserved.