-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathsettings.php
More file actions
42 lines (35 loc) · 713 Bytes
/
settings.php
File metadata and controls
42 lines (35 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Hide general options fields
*
* @link https://developer.wordpress.org/reference/hooks/admin_print_scripts-hook_suffix/
*
* Site icon - .site-icon-section
*/
add_action(
'admin_print_scripts-options-general.php',
function () {
echo '<style>
.site-icon-section
{
display: none;
}
</style>';
}
);
/**
* Hide other settings fields
* Replace "SLUG_OF_SETTINGS_PAGE" with options-writing, options-reading, options-permalink etc.
* Replace .field-class-name with whatever field you want to hide.
*/
add_action(
'admin_print_scripts-SLUG_OF_SETTINGS_PAGE.php',
function () {
echo '<style>
.field-class-name
{
display: none;
}
</style>';
}
);