Add metabox "featured" content and show checked content in theme files
-
Hi there people!
Last week I’ve had some great help from Chip Bennett and alchymyth on this post what helped allot. Now I was wondering if I (again) could get some php wizardry from you people. I tried to explain and express myself as clear as possible.
Where I am so far, what is working. (see code), and a little grid sketch.
At the moment I’ve accomplished with the help from above… a page with 3 loops.Loop / Query 1
The 1th loop pulls some posts out of a category, nothing to it…. works. Functionality here is unclear and still in debate.Loop / Query 2
The second loop gets post from the category “news”, puts the newest in the left column with thumbnail, title and excerpt. A few in the middle column, only title and excerpt and in the last and third column a list with titles. Also working like it should.Loop / Query 3 (this is what this thread is about)
At the moment this gets a few posts out of a category.What it needs to do is the following:
- client must be able to check a checkbox on a page or post when that post is featured content or not.
- in the html it will be a list with items, every item containing the featured image, the title and the excerpt.
So I’m guessing there will be some PHP in functions.php, like the example above. When a post or page will be checked with a checkbox that it is featured content it will shop up. If there is no featured content, nothing will show.
I know this has to be done with “Add Meta Box” and that this Example gets me a long way… but my PHP just ain’t good enough.
Well, thanks in advance, I’m almost thinking I’m asking to much here.
It’s much appreciated…
Paul
- The topic ‘Add metabox "featured" content and show checked content in theme files’ is closed to new replies.