Finding a post from it's title

How do I find a post from it's title?  This seems like it should be a simple task but I'm finding very little info on this in the documentation.  Perhaps I'm looking in the wrong places. 

  • 'Posts' are by GUID# -- needs a little extra code to fetch the 'Title' - via a JOIN  on the 'object' table.

  • Titles aren't unique, so it's not a regular task and not as simple as you might expect.  It is doable though as Dhrup said.

  • Thanks for the feedback.  Seems like this will be a bit messy.  Maybe I can create a unique tag for the post and search for that or some kind of custom annotation.  What I want is to display a particular group or blog post as a custom index.  I'd rather not rely on the GUID, although that is what I'm doing at present.  I'm a bit phobic about "magic numbers" in the code.

  • Well, if it's a static list that you want to show, or even just an individual post then the guid method is extremely reliable.  If it's the case where you'll be adding new posts on a regular basis and older posts will be dropped then you don't want to manually list them with "magic numbers" - a unique tag is the easiest way to go.

  • You can easily create a unique tag with metadata. Just extend the entity menu of the particular entity for a menu which lets you controll the metadata. It is more easier way than depending on guids.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking