yoru
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Weird Plugin Problem – “Call to undefined function:”Seems like you haven’t activated the plugin yet…
Forum: Themes and Templates
In reply to: Breaking down xhtml into wordpress template helpHi sorry if I won’t be able to help you with much detail but I’m linking you to Small Potato’s series of tutorials on creating themes. https://www.wpdesigner.com/category/tutorials/
Forum: Themes and Templates
In reply to: theme editor won’t display uploaded theme!Are you sure you upload the theme folder under ..wp-content/themes/?
Forum: Plugins
In reply to: offset problem with query_poststhanks! i just checked 2.0.4 and found codes similar to that in the trac
(part of) classes.php in 2.0.3
if (($q['what_to_show'] == 'posts')) {
$pgstrt = '';
$pgstrt = (intval($page) -1) * $q['posts_per_page'] . ', ';
$limits = 'LIMIT '.$pgstrt.$q['posts_per_page'];
}
modified classes.php (based on trac)
if (($q['what_to_show'] == 'posts')) {
if ( empty($q['offset']) ) {
$pgstrt = '';
$pgstrt = (intval($page) -1) * $q['posts_per_page'] . ', ';
$limits = 'LIMIT '.$pgstrt.$q['posts_per_page'];
} else { // we're ignoring $page and using 'offset'
$pgstrt = intval($q['offset']) . ', ';
$limits = 'LIMIT ' . $pgstrt . $q['posts_per_page'];
}
}
2.0.4
if (($q['what_to_show'] == 'posts')) {
$q['offset'] = abs(intval($q['offset']));
if ( empty($q['offset']) ) {
$pgstrt = '';
$pgstrt = (intval($page) -1) * $q['posts_per_page'] . ', ';
$limits = 'LIMIT '.$pgstrt.$q['posts_per_page'];
} else { // we're ignoring $page and using 'offset'
$pgstrt = $q['offset'] . ', ';
$limits = 'LIMIT ' . $pgstrt . $q['posts_per_page'];
}
}
also added ‘offset’ as a query var in WP 2.0.3 from the trac:
var $private_query_vars = array('offset', 'posts_per_page', 'posts_per_archive_page', 'what_to_show', 'showposts', 'nopaging', 'show_post_type');
i don’t see same code in the WP 2.0.4 version of classes.php