I have created a function called ”Delete Post Link”. If you are logged in you will see a link which allows you to delete the current page or post, even without visiting admin.
Normally the get_the_content() tag returns the content WITHOUT formatting. I found out a solution in Wordpress core to make get_the_content() tag return the same content as the_content().
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.
I want to use SQL-querys within the Wordpress loop and still be able to use the template tags. Here is the solution.
What I don’t like with wp_list_pages is that you can’t exclude or include pages by NAME. Only by ID is available. Here is the solution.