DR Enhance
Code snippets and style overrides for DR (Digitálny Radca).
by Aron Meszaros · github.com/aronmeszaros/dr-enhance-plugin
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/aronmeszaros/dr-enhance-plugin/archive/refs/heads/main.zipReadme
DR Enhance
Lightweight WordPress plugin for code snippets and style overrides for DR (Digitálny Radca).
Features
ACF Thumbnail Position (Single Posts)
- Reads the custom field
umiestnenie_obrazkaon single post pages - Adds one CSS class to
.post-thumbnailbased on the selected value - Supports exactly 3 values:
Hore->position-HoreStred->position-StredDole->position-Dole
- Uses CSS
object-positionto control the visible focal point of the featured image
This helps editors avoid awkward crops (for example, cut-off faces) without template changes.
Digi Posts Carousel Typography (Plugin-only)
- Styles carousel card titles and descriptions from the plugin CSS only (no direct theme file edits)
- Targets title links inside the carousel and limits them to 2 lines with ellipsis
- Targets description paragraphs inside the carousel and limits them to 3 lines with ellipsis
- Scope is limited to
.digi-posts-wrapper .slick-carouselto avoid affecting other components
ACF Setup
Install and activate Advanced Custom Fields (ACF), then create this field:
- Field Group:
Blog(or your existing post field group) - Field Label:
Umiestnenie obrázka - Field Name:
umiestnenie_obrazka - Field Type:
Radio Button - Choices:
HoreStredDole
Location rule: show this field group for post type post.
Installation
- Upload the
dr-enhancefolder to/wp-content/plugins/ - Activate the plugin in WordPress admin
How It Works
-
On single posts, the plugin reads
umiestnenie_obrazkafrom post meta. -
If the value is
Hore,Stred, orDole, it prints a small inline script in<head>. -
The script adds one class to
.post-thumbnailafter DOM load. -
assets/css/frontend.cssmaps that class toobject-position:.post-thumbnail.position-Hore img { object-position: top; }.post-thumbnail.position-Stred img { object-position: center; }.post-thumbnail.position-Dole img { object-position: bottom; }
-
For the Digi Posts carousel, plugin CSS applies text clamping rules:
.digi-posts-wrapper .slick-carousel .card .card-title a-> 2 lines.digi-posts-wrapper .slick-carousel .card .card-text-> 3 lines
No theme template edits are required.
Editor Workflow
- Open or create a post.
- Set a featured image.
- Choose
Hore,Stred, orDoleinUmiestnenie obrázka. - Publish or update the post.
The featured image crop focus is adjusted automatically on the frontend.
Author
Aron Meszaros
License
GPL-2.0-or-later