Allowed memory size of (…) exhausted

Turns out this issue was caused by bad code (a missing assert) in my theme. More specifically the theme requires a custom navigation menu. As this menu hadn’t been created and assigned the site crashed. Why this caused an memory exhaustion error on my production server and not my development computer I unfortunately don’t know.

Problem dynamically generating an all purpose title tag

I wound up fixing it like this. All pages now work. But it looks …well …ugly. <?php if (function_exists(‘is_tag’) && is_tag()) { single_tag_title(‘Tag Archive for &quot;’); echo ‘&quot; | ‘; } elseif (is_archive()) { wp_title(”); echo ‘ Archive | ‘; } elseif (is_search()) { echo ‘Search for &quot;’.esc_html($s).’&quot; | ‘; } elseif (!(is_404()) && is_single() … Read more

How to output wp_enqueue_style() in HTML head instead of footer

hook into init action on your initial plugin function add_action(‘init’, array(__CLASS__, ‘your_function_within_class’)); and add the function public static function your_function_within_class() { wp_register_style(‘myfirstplugin-admin-css’, ‘/wp-content/plugins/myfirstplugin/assets/style.css’, false); wp_enqueue_style(‘myfirstplugin-admin-css’); } hope this help

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