A journal entry stamped: July 29th, 2010
This function is used to get the_permalink() of a certain page using it's ID (outside the loop). To use it within a theme, just:
function getPageLink($pageId){
if(!is_numeric($pageId)) {
return;
}
global $wpdb;
$sql_query = 'SELECT DISTINCT * FROM [...]
A journal entry stamped: July 29th, 2010
This function is used to get the title(); of a certain page using it's ID (outside the loop). To use it within a theme, just:
<?php getPageTitle(ID); ?>
function getPageTitle($pageId){
if(!is_numeric($pageId)) {
return;
}
global $wpdb;
$sql_query = 'SELECT DISTINCT * FROM ' . $wpdb->posts . ' WHERE ' . $wpdb->posts . '.ID=' . $pageId;
$posts = $wpdb->get_results($sql_query);
if(!empty($posts)) [...]
A journal entry stamped: September 1st, 2006
Un cambio de look ha tenido mi blog sobre estándares web: CSSLab. Pensaba cambiar el template cuando cambie de server (ya q el actual apesta, mejor ni lo menciono para no promocionarlo...), y junto con eso el upgrade a Wordpress 2, pero me adelanté a eso e inauguro [...]
0 Comments