WordPress

How to create page breadcrumbs in WordPress

Someone at the WordPress StackExchange site was wondering how you could display a list of a page’s ancestors. Pretty much that is the idea of breadcrumbs, so I answered his question using the handy get_ancestors() function.

Be Sociable, Share!

    WordPress: How to display posts within a page

    We have all been there: for some reason, you really need to display a list of posts within a page in WordPress (and the list needs to be paginated, of course). Fortunately, there’s an easy way to do it.

    Be Sociable, Share!

      WordPress: how to automatically convert custom fields to post tags

      Convert your post’s custom fields into tags automatically in WordPress with this nifty script!!!

      Be Sociable, Share!

        Extend RSS2: a plugin to enhance your WordPress default RSS2 feed

        Add thumbnails and custom-field data to your RSS2 feed!

        Be Sociable, Share!

          How to add the excerpt box for pages in WordPress

          Here’s how to enable the “excerpt” box for your WordPress pages.

          Be Sociable, Share!

            WordPress: How to display all posts in one page

            Although displaying all your latest posts in Wordpress may seem like a no-brainer (after all, the default home page already displays your “Latest Posts”), doing so is kind of tricky if you are trying to do it in on a custom page.

            Here’s a little code that can help you accomplish that.

            Be Sociable, Share!

              Sample content for WordPress theme development

              A big part of the Wordpress theme development process is to asses what each possible HTML element will look like (images, tables, lists, paragraphs, etc). WPCandy.com has the right sample content for that.

              Be Sociable, Share!

                How to automatically add tags to WordPress posts

                In WordPress, if you need to automatically add tags to a post via a PHP script, the best way to do it is via the wp_set_object_terms() function. There is no handy “wp_insert_tag()” function, or something like that, so look no further.

                Be Sociable, Share!

                  How to get the ID of the last insert post in WordPress

                  When programming for WordPress, sometimes you may need to get the ID of the last post that was inserted to the database (à la MySQL’s ‘LAST_INSERT_ID’). Here’s the thing: the wp_insert_post() function returns the newly inserted post’s ID, so you can use it to perform more stuff on the post right away, without having to mess around with any SQL commands to retrieve it. Clever, huh?

                  Be Sociable, Share!