I created a function that returns the depth of a page or category. The depth is how many levels from the root the page or category in its hierarchy. The root level number is 0.
The function converts a post / page name to a post /page ID.
I created a function that returns an URL when sending a post / page name as an in parameter. Put the function into your functions.php in your theme folder.
I created a function that returns a value depending of the input type. Put the function into your functions.php in your theme folder.
Wordpress have a built in function called get_currentuserinfo. A global variable is set. It calls a function to get the user information. It then echos the username. The code is not as short and easy as it could be.
Wordpress have a ”bug”. It doesn’t add a current_cat_ancestor class to the wp_list_pages function. If you need it, you can use the code below.
Unlike many other page navigation plugins, this one is based on a core page number function called paginate_links. You can modify the paging styles in many ways.
I want to use SQL-querys within the Wordpress loop and still be able to use the template tags. Here is the solution.