Hidden Possibilities
Components
Use
<Wrapper value={my_value} />
fromsrc > front > js > components > Wrapper.jsx
for insert HTML returns when you can't usedangerouslySetInnerHTML
.
Scss/Sass/Css
You can use
Sass
instead ofScss
by turn your.scss
extension to.sass
and by removing brackets.Turn easly your pixel units to viewport units in your css by using:
vw|svw|lvw|dvw($value, $screen_dimension: 1920px)
vh|svh|lvh|dvh($value, $screen_dimension: 1080px)
PHP
Through your frontend or backend depending the case, you can use these custom PHP functions and hooks:
scg::field($field, $id = false, $format = true, $escape = false)
Call
get_field()
of ACF.It'll check first in
option
before the current page if you don't set an ID.
Replace your return with
str_replace()
when you use ACF PHP functions or ACF REST API:scg::cpt($post_type = 'post', $args = [])
Call new WP_Query().
You can pass the first parameter to
null
if you want passpost_type
in$args
Set default parameters:
scg::source($args = [])
Get URL or absolute path.
$args
parameters:base Default value is
/
, equal to theme root.path Path to your file
url Default value is
false
returning the absolute path.true
if you want the url.
Set default parameters:
From Admin Panel
You can clean Front End sources like wp_generator, WP Block Library, Classic Theme Styles, etc.
You can switch the appearance to have a panel containing only what you need.
You can activate/deactivate Gutenberg
You can activate/deactivate Editor for
post
andpage
post_type.You can remove default dashboard elements
You can manage theme locations
You can accept SVG
You can stop create multiple resizes of an image you upload
Last updated