How do I point bloginfo(‘stylesheet_directory’) to my parent theme?

If the parent theme is properly coded, the following code in the child theme functions.php file should load the parent css. <?php add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ ); function my_theme_enqueue_styles() { wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ ); } ?> As for the javascript, I think that if the parent theme loads theme with wp_enqueue_scripts they should work … Read more

Metallex Theme modifies links after saving them

Just after posting the question I tried to remove the quotes from the href in the theme options and it worked. <a href=mailto:[email protected]>[email protected]</a> Another solution I considered was to use .htaccess redirects in a way such it redirects to whaterver the theme decided to point to a mailto: Redirect 301 /[path-to-wherever-metallex-points-to] mailto:[email protected] -solution 2 source- … Read more

Author Meta in Author URL Link

This is just an example / idea and I haven’t tested if this really works. But I think it could be something along these lines. function custom_author_base() { global $wp_rewrite; global $wp_query; // On author pages you get current author for example with $wp_query $curauth = $wp_query->get_queried_object(); // Get the required data $country = get_user_meta($curauth->ID, … Read more

Display child-page links in sidebar on both Parent Pages AND Child Pages

The following fixed the issue for me: <?php switch ($isBlogsPostPage){ case true: $parentID=get_correct_id($post, $isBlogsPostPage); break; default: $parentID=get_correct_id($post); } $args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => 10, ‘post_parent’ => $parentID, ‘orderby’ => ‘menu_order’ ); $parent = new WP_Query( $args ); if ( true ) : ?> <section class=”links border shadow”> <ul> <?php while ( $parent->have_posts() … Read more

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