WordPress Defined Memory Limit

Try one (or more) of the below methods to increase the memory allicated by PHP. First try increasing the limit to 64MB, and if that fails use 96M. You can define the WP_MEMORY_LIMIT constant in wp-config.php: Increase PHP Memory to 64MB define(‘WP_MEMORY_LIMIT’, ’64M’); Increase PHP Memory to 96MB define(‘WP_MEMORY_LIMIT’, ’96M’); You can also change the … Read more

limit characters when posting from form

To limit characters add this to your textarea: maxlength=”200″ changing “200” to whatever you want the character limit to be. <textarea id=”description” maxlength=”200″ tabindex=”3″ name=”description2″ cols=”50″ rows=”6″></textarea> For a character counter you will need some basic Javascript, something like this: counter = function() { var value = $(‘#description’).val(); if (value.length == 0) { $(‘#totalChars’).html(0); return; … Read more

How to limit WP_Query to one result on the loop?

pre_get_posts alters all queries, back end and front end regardless. There are two very important checks that a large amount of people misses, that is the !is_admin() check which only targets the front end, and then the most important check, is_main_query() which will only alter the main query and not custom queries. You statement should … Read more

Limit the number of pages created by the paging

This seem to work. Put in your functions.php: add_filter(‘pre_get_posts’, ‘limit_pages’); function limit_pages($query) { $query->max_num_pages = 5; if ($query->query_vars[‘paged’] > 5) { $query->query_vars[‘paged’] = 5; $query->query[‘paged’] = 5; } return $query; } But I guess you would still need some workaround for posts pagination and authors. Hope it helps you a little.

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