Tag Info

New answers tagged

0

@WisdmLabs is right. For old images you will have to use that plugin to regenerate thumbnails. For new images which you will upload it will respect the 600 height mentioned in child theme's functions.php file.


1

I am guessing a lot about how your themes work but, the child theme's functions.php runs before the parent theme's functions.php, so anything loaded by the parent's functions isn't going to be present for you to remove. You need to hook your function so that it runs later. add_action('after_setup_theme', 'remove_custom'); Though you would need to mess ...


1

If you look at how the code works, you should notice that theme mods are saved in the *_options table under theme_mods_{theme_slug} with the theme slug being, as near as I can tell, the directory name containing the theme stylesheet, so: $ptheme = get_template_directory(); $theme_slug = basename($ptheme); $mods = get_option( "theme_mods_$theme_slug"); As ...


0

Where are you using the jQuery code we see in question? If you are using it in header (head), I would recommend using: jQuery(document).ready(function(){ jQuery('.homepage_buttons_text a[href^="http://danrobertsgroup.com/?attachment_id=1037"]').each(function(){ jQuery(this).html("<h1 ...


1

I try this code and it solve my problem if ( is_child_theme() === false ) { // files moved } else { // do nothing } Thankx to @birgire


0

You could try the following: add_action( 'switch_theme', function( $new_name, $new_theme ) { if( is_a( $new_theme->parent(), '\WP_Theme' ) ) { // Child theme was activated } else { // Parent theme was activated } }, 10, 2 ); to see if the theme you just activated is a child theme or not.


0

For removing an action hook you should use the same action name, callback name and the priority that was used to add a action in parent theme. And register it on init add_action( 'init', 'remove_action'); function remove_action() { remove_action( 'woocommerce_before_shop_loop','storefront_sorting_wrapper',9 ); } Read about remove_action


0

I would get a copy of the files and then work locally using VVV, MAMP or whatever your tool of choice is. WP_Engine allows for git deploys so you could work locally and use git for version control and back up as well as deploy the changes as needed.


1

The problem is not there in your @font-face it's actually in the functions.php where you enqueued the stylesheets. What I assume your parent theme is enqueuing stylesheets like below: <link rel='stylesheet' id='bootstrap-css' href='http://example.com/wp-content/themes/parenttheme/bootstrap.min.css' type='text/css' media='all' /> <link ...


2

There is a filter called wp_prepare_themes_for_js in wp-admin/includes/theme.php in the wp_prepare_themes_for_js() function, which is called by wp-admin/themes.php to populate the theme set. That filter will allow you to remove themes from the list. Of course, you have to know the theme name. function kill_theme_wpse_188906($themes) { ...


0

I think I found a solution, but before a little Premise load_theme_textdomain() and load_child_theme_textdomain() are basically equal, the only difference is the default path they use: they get the current language (using get_locale()) and add the relative .mo file to the path passed as argument; then they call load_textdomain() passing as argument both ...


0

I think the problem is with your choice of hook and conditional statement. Try init and remove the !. function themeblvd_disable_admin_bar() { if( current_user_can('edit_posts') ) add_filter('show_admin_bar', '__return_false'); } add_action( 'init', 'themeblvd_disable_admin_bar' ); Looks like your conditional is also wrong for the redirect ...


2

It's not showing because the .insertAfter() and .show() functions are called on resize events only, while mobile devices do not resize. They already load the page with their mobile sized. Just make sure you also run the code on the ready event: <script type="text/javascript"> /* to show back the left side bar back when the LEFT side bar is moved ...


0

You can use language files that are in your child theme folder. First you have to know which text domain the parent theme is using. Then create the .po and .mo files with only your language as the file name (e.g. de_DE.po/de_DE.mo or nl_NL.po/nl_NL.mo) and put them into a folder within your child theme directory, "languages" for example. You can then ...


0

You can use get_stylesheet_directory_uri(); while enqueuing the scripts and styles. It returns the directory path in which your child stylesheet is stored.


0

The theme changes in customizer are applied inline or before the </head> to your WordPress site. Technically speaking there are three hooks: $wp_customize customize_register wp_head which are used by theme developers to include the changes directly to theme without using the default style.css


2

If you mean the WordPress Customizer: These changes are not saved to the style.css, but they come most likely to be found shortly before </head>. Probably you will find there something like <style> //definitions via Customizer </style>



Top 50 recent answers are included