New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme Options Page #31
Comments
Hi @levan1993, Yes. I will add a complete reply in next 10 hours. Thank you. |
Thank you for help. |
@levan1993 - thank you too! |
One more question... Is there any way to change width of an option? |
The width comes from this css, you can't modify it because it's in the framework, but you can overwrite it. Enqueue a style from your theme in the static.php file if (is_admin()) {
wp_enqueue_style(
'custom-admin-style',
get_template_directory_uri() . '/css/custom-admin-style.css',
array(),
fw()->theme->manifest->get_version()
);
} with the following contents .fw-backend-option-design-default > .fw-backend-option-input.width-type-fixed > .fw-inner,
.fw-backend-option-design-taxonomy > td > .fw-backend-option-input.width-type-fixed > .fw-inner,
.fw-backend-option-fixed-width {
width: ...px;
} |
Thank you. |
Would be great if you add width option... For example if width key exists in array params, than apply it, else use default. |
@levan1993 Why you want to change the option width? |
sometime I need to change option width, in case of wp-editor or other inputs. I can manually change the width in framework backend it's about 5 lines of code, but it will be overriden after update.so it's not a solution for me. |
We tried to make all options have the same width to look nice and clean. I don't think we will add a width parameter for options. I don't see this solution so complicated. In that css file you can add styles for concrete options by using their id, for e.g. #fw-backend-option-fw-option-demo_wp_editor > .fw-backend-option-input > .fw-inner {
width: ...px;
} |
Thank's, I will consider this solution. What about theme options page? |
You can find a parent element on the page that has unique id or class and use it to detect what page you are currently on. For e.g. to apply styles only on the theme options page #fw_form_fw_settings .my-class { ... } or body.appearance_page_fw-settings .my-class { ... } To apply styles on some post type pages (add new, edit) body.post-type-post .my-class { ... } |
You didn't understand me. I mean Theme Settings Page that is submenu of Appearence menu. I want to set it as menu page, but I saw that you register it as submenu in backend.php . is there any solution to register it as menu page? |
Ops, sorry. I thought you continue the css question. We will come back later with a response. |
Ok. Thank's |
At the moment it's not possible. We will add that feature in the next release. |
We added the possibility to move the settings page menu in the 1.4.0 release. You can use this action like that: // file: framework-customizations/theme/hooks.php
if (!function_exists('_action_theme_custom_framework_settings_menu')):
function _action_theme_custom_framework_settings_menu($data) {
add_menu_page(
__( 'Unyson', 'fw' ),
__( 'Unyson', 'fw' ),
$data['capability'],
$data['slug'],
$data['content_callback']
);
}
endif;
add_action('fw_backend_add_custom_settings_menu', '_action_theme_custom_framework_settings_menu'); |
Thank you. |
Hi,
Is there any way to move Theme Options submenu to top level menu?
The text was updated successfully, but these errors were encountered: