Tag Info

New answers tagged

0

The php extension PHP GD was not installed on my dev machine. Installing php5-gd resolved this - sudo apt-get install php5-gd Stepping through using xdebug revealed that the theme's aq_resize function was failing at the following code: else { $editor = wp_get_image_editor($img_path); if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( ...


0

Is the html output to the page? If not, then the issue is almost certainly with your if statement. Should it be: if ( ( $show_thumb || $show_thumb !== '' ) && has_post_thumbnail() ) instead of: if ( ( $show_thumb || $show_thumb == '' ) && has_post_thumbnail() )


4

I think you misunderstood the codex here. You cannot re-declare the same function, except when, and only when, the parent theme has wrapped a function in that conditional statement if ( ! function_exists( 'theme_special_nav' ) ) { function theme_special_nav() { // Do something. } } What this means is, you can copy the theme_special_nav() ...


2

The correct function to use here is get_stylesheet_directory_uri(). Please feel free to read this useful post by @ChipBennet regarding this issue Your use of syntax is also wrong in your return statement as already pointed out. A variable is php, not html, therefore you don't need the single quotes which are used to wrap html in a mixed string. You can ...


0

Oops there was a PHP error, I just did not see it for some reason: "PHP Parse error: syntax error, unexpected T_STRING in /home/www-data/blah/wp-content/themes/Curated-child/footer.php on line 83" while reading upstream I decided to not use "@import" and use "include" instead. More info here: ...


1

QUESTION 1 Is it safe to include the assumption that parent themes properly enqueue the child theme styles, from the standpoint of child theme standards? General rule of thumb, yes. But, you should never assume. Most disasters and failures in live are due to assumptions or facts based on an assumption FACTS WITHOUT ASSUMPTIONS A child theme's ...


0

Try this in your child themes functions file: add_action( 'wp_enqueue_scripts', 'my_enqueue_styles' ); function my_enqueue_styles() { wp_enqueue_style( 'parent-style', trailingslashit( get_template_directory_uri() ) . 'style.css' ); } Edit: If you also load the active themes style sheet using the following code, you'll find the child themes ...


7

This post is linked from this post which I have now updated with the changes in this post Thank you for bringing up this issue. I have quickly tested the scenario and the child style is actually loaded twice. When I updated the codex a while ago I made sure that the child style would be loaded after the parent style, never actually taking into account that ...


0

Okay so i did manage to add some custom css selectively on pages that load the medialement player by adding this to my functions.php file: function custom_player() { wp_enqueue_style( 'custom-player', get_stylesheet_directory_uri() . '/wp-mediaelement.css' ); $custom_css = " /*here goes the css*/ ...


1

The WP_DEFAULT_THEME constant actually just overrides what WordPress sets as default theme (which per default is the latest of the bundled themes). It does not really help you to define your parent theme. In fact you just have to "Network enable" your parent and child themes and then set the parent theme in the child themes header. No need to do more than ...


0

The configuration of what is the father theme on WordPress lies on the Child Theme you just need to setup WP_DEFAULT_THEME to be your child theme. Now if you want to update all the sites to a theme programmatically you can do the following: add_action( 'wpmu_upgrade_site', 'p167109_switch_theme' ); function p167109_switch_theme( $blog_id ){ ...


0

If you want to execute a shortcode from within a child-theme instead of within the content of a page, you can invoke it with a special function: <?php echo do_shortcode("[shortcode]"); ?> The code should be pasted in the active child-theme's functions.php


0

Apparently you can with the Genesis Framework by setting the width #wrap {width:960px;} and remove all viewport css. Note: Do this on child theme. I read this on a developer's forum.


1

There are several scenarios: If you had authored your child theme from scratch, using only your custom code then it is clearly your product. If you had used code from parent theme in your child theme then it's your derivative of it, it's still yours but you also need to credit code used in line with its licensing requirements. If you had taken third party ...


0

You should not have duplicate copies of your functions.php file. After copying it to your child theme, the original functions.php (the one in the parent theme) should be left blank so functions are not duplicated. This is probably why the notice occurs twice on your website, but the notice is likely unrelated to this problem.


1

I had exactly the same problem. In the base TwentyTwelve theme there has been a code change so that the site navigation changed from h3 to button. You need to update header.php file in the child theme to use <button class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></button> See WordPress TRAC #28824 comment 13 The problem ...


0

wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' , 'container' =>FALSE ) ) Try this , just add 'container' =>FALSE to your nav menu array



Top 50 recent answers are included