one time popup after theme activation

After delving into the codex and hacking around I figured out how to do this. Short answer – use thickbox (http://codex.wordpress.org/ThickBox). Longer answer…. Hooking into after_setup_theme isn’t ideal for inserting any content into the admin page, as it runs on each page load when that theme is active. As suggested by kaiser we can use … Read more

Wrong path for theme assets

Turns out the problem was with WP_CONTENT_URL, defined inside wp-config.php: define( ‘WP_CONTENT_URL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/lab/WordPress-Skeleton/content’ ); It seems that $_SERVER[‘HTTP_HOST’] is returning an incomplete path (only localhost without the folder). Since I’m using version control and using a local-config.php to define some local dev variables (like database credentials), I also placed this on … Read more

Change display of featured image for pages in twenty seventeen theme

You are struggling with wrong files. You can find post files in theme-folder/template-parts/post/content.php file. You’ll find this code you can add your classes or whatever in your child theme. <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> <?php if ( is_sticky() && is_home() ) : echo twentyseventeen_get_svg( array( ‘icon’ => ‘thumb-tack’ ) ); endif; ?> <header … Read more

Writing Clean WooCommerce Styles

What i do is, disable Woocommerce default styles depending on what i want to customize, instead of overwriting the css. Woocommerce loads 3 styles by default: woocommerce-general.css woocommerce-layout.css woocommerce-smallscreen.css If you want to fully customize you can disable all styles or, just the ones that you dont want by adding: // Remove each style one … Read more

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