Link featured image to post

Theme customisation is off topic however the default themes are exempt so lets look at an example of how its done in Twenty Fifteen. if ( ! function_exists( ‘twentyfifteen_post_thumbnail’ ) ) : function twentyfifteen_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?> <div class=”post-thumbnail”> … Read more

Override post-formats in child theme

It’s import to set the priority for your after_setup_theme higher than your parent theme. The default priority is 10. Using the twentysixteen as example, use priority 11 on child themes’ ‘after_setup_theme’ action. Exemple below: function twentysixteen_child_setup() { add_theme_support( ‘post-formats’, array( ‘video’, ) ); } add_action( ‘after_setup_theme’, ‘twentysixteen_child_setup’, 11 );

javascript not being enqueued correctly

I think you have typo in your code: ors_enqueue_scripts should be wp_enqueue_scripts add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_theme_style’ ); function enqueue_parent_theme_style() { wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ ); wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri().’/style.css’ ); wp_enqueue_script(‘ors-animations’, get_stylesheet_directory_uri().’/javascripts/animations.js’, array( ‘jquery’ )); }

Best method to add style sheets into child theme?

Firstly, never add the stylesheet on header.php unless you have to. It is not the WordPress convention. Secondly, adding stylesheet to header.php will cause certain problem like dependency hierarchy. Cause when you install any plugin and if it has its stylesheet then the dependency hierarchy is automatically managed by WordPress system by wp_enqueue_scripts hook. Thirdly, … Read more

Using filter to override “get_parent_theme_file_path” in child-theme

WordPress applies ltrim on the $file — ltrim( $file, “https://wordpress.stackexchange.com/” ), so it becomes inc/template-tags.php instead of /inc/template-tags.php. So within your filter callback, you should use: if ( $file !== ‘inc/template-tags.php’ ) UPDATE my child version has the adjustments I don’t know if you made adjustments to pluggable or non-pluggable function(s) in the template file, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)