Wordpress: get page link by ID

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 [...]

Wordpress: get page title by ID

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)) [...]

Wordpress: better breadcrumb function

A journal entry stamped: July 29th, 2010

This function is used to construct breadcrumbs of pages, posts and archives within Wordpress. Put this on functions.php inside yout theme and call anywhere you need (single.php, page.php) using: <?php the_breadcrumb(); ?> function the_breadcrumb() { $current = $post->ID; $parent = $post->post_parent; $grandparent_get = get_post($parent); [...]

Contact PHP Form

A journal entry stamped: August 4th, 2006

This is a very simple PHP Contact Form, that we usually use on some of our projects. It's very customizable, and easy to add fields (inputs, checkboxes, radio buttons.... anything). The most important, the form is tableless, I've used one DIV (container) and fieldset, legend and labels for the form [...]

What about this

In this blog, we at Be Studios want to show the best that we have: our knowledge. Hope it will be helpfull for at least one human being.

Categories

latest posts