• Hey Folks,

    I’ve posted a few times before but I need some help. Right now I am in the midst of designing a portfolio site for an interior designer. The design is not the problem, but the systems behind it are a little hard for me to wrap my head around, so I was hoping someone could help me hash out the best way of doing what I want to do.

    In the main navigation, there will be three links that deal with post display: Residential, Commercial, and Rooms.

    What I’ve been thinking I’d do is create a custom post type called Jobs, and then a taxonomy of either Commercial or Residential. So far, so good, right?

    Well Rooms has me totally buggered. If Jobs is a post of photos, is it possible to tag individual photos as, say, Kitchen, or Bath?

    Basically what I’m after is a vague form of cross-referencing…I want visitors to be able to scan over a whole job and see how the rooms work together, but then I also want to be able to display individual rooms from all jobs.

    Is that possible??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ethanbeyer

    (@ethanbeyer)

    This isn’t a bump, but a progress report…

    I have figured out how to add metadata to an attachment, even so far as how to save that metadata and so forth! I’m pumped.

    But I’ve hit a new wall.

    I’m creating pages called “Bedrooms”, “Kitchens”, etc.

    What I need to do is first save the slug of the current page. I did that using this code:

    <?php
    	global $post;
    	$slug = get_post( $post )->post_name;
    ?>

    Then I need to check $slug against the meta_key _room‘s value to see if they match, because I only want Bedrooms on the Bedroom page. If they DO match, I need to display that image’s “Large List” size. I know how to do that. Really the only thing that’s out of my league is taking $slug and making sure it matches _room, and then link that image to its parent post.

    I know that is a lot. But I would appreciate it IMMENSELY if anyone could help shed some light on it for me!

    Thread Starter ethanbeyer

    (@ethanbeyer)

    Still hammering away at this…with no luck.

    Here’s my code, which I’m afraid is dreadfully wrong.

    Help?

    Thread Starter ethanbeyer

    (@ethanbeyer)

    ALMOST THERE!


    http://pastebin.com/Cf92dehH

    Does anyone know what needs to go in those PHP tags on line 33??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘An Organization/Taxonomy/Custom-Post-Type Question’ is closed to new replies.