Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How do I get custom fields matching the current post title? Re: How do I get custom fields matching the current post title?

#53493

Hi.
I did actually watch that video really carefully in the hope of finding a way to do what I am trying to do. But, the way Chris does it with his recommended products would in my case result in a single.php that is about a mile long and it would require a lot of additional custom fields.
The thing is that I simply want single.php to recognize what the current title of the page is and match that against a custom field ‘Author’ which is not in this post but a different category of posts, so that I can pull out some custom field data from those posts. I would really rather not add a bunch of custom fields to the posts for this.
The title of the current page is an exact match to the content of the custom field ‘Author’ on all the relevant post so there is no chance that I would get anything that I donĀ“t need.
I am currently looking at a way of doing this with tags which seem to work, but it would be much more elegant if it could be done using the current page title, since that would mean that I would not need to add any additional data.

I have a feeling that this would be rather simple if I only knew enough php, but like I mentioned in my first post I am a total newbie when it comes to php. My description of the problem might even be more complicated than the solution.