Grow your CSS skills. Land your dream job.

Client wants to add custom content to sidebar/other column

  • # November 28, 2012 at 9:02 am

    No, I understand what you mean, they have been appended and prepended with jQuery. He likes it like that and prefers if they’re there, so I am just letting him do what he wants with it. I told him that navigation should really be at the top of the page but he prefers it where it is.

    # November 28, 2012 at 9:04 am

    I suppose I’ve gotta’ do what makes the client happy…

    # November 28, 2012 at 9:05 am

    Sounds like he has no idea about UX.

    So all you need for the main column (left) is the main editor. Nothing special.

    For the right (sidebar), you might want to look at custom meta boxes to have input fields to post youtube videos (if needed), images (Attachments plugin) and a description textarea field.

    # November 28, 2012 at 9:07 am

    I knew that one day I would have to come across setting up meta boxes, I’ve never looked into them really, the same with custom post types, never used them either :/

    I will look into it now.

    So, once it is done, when I am in the backend of wordpress editing the ‘About’ page, will i see the main large text editor and also 3 boxes to the right of it?

    # November 28, 2012 at 9:18 am

    Here you can see how mine is setup. If you scroll down, look for ‘My Custom Meta Box’, that content displays in my sidebar as a description. You would add that under the input field for your YT videos if he requires that to be a feature.

    # November 28, 2012 at 9:29 am

    Ahhh, that’s exactly what I’m after, @chrisburton. I have just been looking at this;

    http://www.farinspace.com/wordpress-meta-box-next-level

    Is this kind of thing I should be doing?

    # November 28, 2012 at 9:38 am

    I use WPAlchemy but it’s not easy to implement. http://wordpress.org/extend/plugins/advanced-custom-fields might be something you’d like.

    # November 28, 2012 at 10:11 am

    What a cool plugin!!! It’s pretty much perfect, thanks so much for you help! Take a look now, @chrisburton.

    How do you get the attachments plugin to work btw? I have used the image function built in with the custom fields plugin and it just comes out as text
    >
    58, , book, , , http://communicatingisimportant.com/wp-content/uploads/2012/11/book.png, Array

    http://communicatingisimportant.com/about

    # November 28, 2012 at 10:19 am

    @Watson90 Throw your PHP up in codepen

    # November 28, 2012 at 10:29 am

    http://codepen.io/Watson90/pen/rpaIB

    In the code on my website I have removed the p tags surrounding the picture_box shortcode.

    # November 28, 2012 at 10:37 am

    @Watson90 Hover over ACF plugin and go to Settings. Click on your fields and get the PHP for them. See if that works? @TheDoc is more familiar with this particular plugin than I am.

    # November 28, 2012 at 10:49 am

    @chrisburton, Since adding the PHP code to my functions.php file I seem to have two of the meta boxes on my about page in ‘edit’ mode :S

    # November 28, 2012 at 12:57 pm

    @Watson90 Is it supposed to go in functions.php or your template? I can’t remember. Also, please take a screenshot.

    # November 28, 2012 at 2:44 pm

    The whole of the PHP code is meant to go into my sidebar.php file? When I did that I got a load of errors. And if I put the code in my functions.php file how does it know to output to the sidebar.php file? It’s confusing, haha.

    # November 28, 2012 at 3:58 pm

    @watson90 Well go back to whatever you did before where it outputs normally. Then, in your theme file, try the following code instead of the one you showed me in codepen.

    Viewing 15 posts - 16 through 30 (of 39 total)

    You must be logged in to reply to this topic.

Projects

Colophon

CSS-Tricks* is created, written by, and maintained by Chris Coyier. It is built on WordPress, hosted by MediaTemple, and the assets are served by MaxCDN. The fonts are Source Sans and Source Code Pro. It is made possible by viewers like you who subscribe to The Lodge and through advertising for products and services I like.

*May or may not contain any actual "CSS" or "Tricks".