I’m super happy with new overrides functionality for patterns, this is what client asked me. I start setup it and get an issue that list and buttons doesn’t have ability to set overrides for them. Is there any way to setup it or I missed something? All settings were done in admin block.
Thanks!
]]>I’m trying to modify from code the compression level only for a certain folder in my setup. I suppose that this can be easily done in functions.php, but I don’t know what hook and functions to use. What I’m trying to do is, for example, if I’ve a 80 value for JPG level on EWWW settings, I want to apply a value of 70 (or other formats like PNG) but only for images into a custom folder that I’ve added into the aditional folders list.
Can this be done with some custom code?
]]>The issue I’m having is I have a plugin which refers to some custom template files for said plugin in a folder in the current theme i.e. the parent theme, but as I am working on a child theme I want the plugin to reference the templates from a folder within the child theme. Obviously I don’t want to modify any of the plugin files or have to put the custom template folder in the parent theme as they will get overwritten on updates.
In the plugin there is the below function:
/**
* Load view
*
* A simple hook of wp_plugin_hook to accept custom view in
* the current theme folder
*
* @return string
*/
public function load_view($file, array $view_datas = array(), $return = true) {
$custom_view_path = WP_CURRENT_THEME_PATH . 'custom-template-folder/' . $file . '.php';
$view_datas = array_merge($view_datas, $GLOBALS['wp_views_datas']);
if(file_exists($custom_view_path)) {
$view = wp_plugin_hook($file, $view_datas, $return, WP_CURRENT_THEME_PATH . 'custom-template-folder');
}
else {
$view = wp_plugin_hook($file, $view_datas, $return, WP_PLUGIN_PATH . 'views/template/');
}
return $view;
}
Then the constant in the plugin is as follows:
// Path directory current theme
define('WP_CURRENT_THEME_PATH', get_template_directory() . '/');
I basically either need to change the WP_CURRENT_THEME_PATH
constant so it uses get_stylesheet_directory()
as opposed to get_template_directory()
.
OR
overwrite the whole load_view
function and replace within it the WP_CURRENT_THEME_PATH
with a hard coded URL i.e. so it points to the folder in the child theme directory.
Is any of the above possible via overrides in the child theme’s functions.php?
Thanks in advance for anyone who can help!
Chris
]]>Please note I do not wish to change the language. I just wish to amend this message in English as we have many users who are trying to purchase another one for a friend or family member which is totally fine so I just want to advise them that they need to log out and create a new account for that person. I hope that makes sense.
Does this plugin have any hooks or support overrides in the theme files or something like that to allow customization of this message?
Thanks very much,
Nicole
[pj-news-ticker post_type=”memberposts” label_text=”Member News”]
do I have a syntax problem or something?
]]>If anyone has encountered and fixed this issue please let me know.
Thanks!
[wpdm_category]
shortcodeSo for example on Monday at 01:00 I could run a cron job to delete all of the schedule overrides for the previous week. Leaving the upcoming ones intact.
What do you think? Could it be possible?
]]>