Is it ok to use post meta boxes in distributable themes?

(Naresh Devineni) #1

Hi everyone & @BinaryMoon ,

Is it ok to use post meta boxes added using add_meta_boxes in distributable themes?

Are they going to affect the theme quality??

(Leland Fiegel) #2

I wouldn’t. Users could get confused when their meta boxes disappeared after switching to another theme.

You could instruct users to use native custom fields. Not the best UI but at least it’s included in core and not something a theme or plugin would have to register separately.

What are you trying to do exactly? Maybe we could come up with a better alternative?

(Naresh Devineni) #3

Consider the two sections of the above image as two child pages of a parent page. For first child page, the image is on the left and on the right for the second child page.

I want the user to have control over the placement of featured image.

According to the discussion in previous topic, I can use customizer to let user to choose the position of the featured image, But I personally think I am throwing little too many settings in the customizer. Is that ok?

(Leland Fiegel) #4

I think it’s appropriate to choose in Customizer which side you want the featured image on. I actually think it’s a better experience to do so in Customizer, because users could see live what the section would look like with the featured image on either side. If in post meta, users would have to go to the separate Edit Post screen, then load Customizer.

See how I do it in the Belmont theme.

(Naresh Devineni) #5

There is a problem, as I mentioned, these are child pages ( because these are features of an App ) , not the parent page. So I want user to have a fine grain control over the placement of featured Image of each and every feature. Ok, may be I am complicating things :flushed:

(Naresh Devineni) #6

Problem is solved if I can compromise on control. I can provide options for featured image of child pages.

  1. Image on Left
  2. Image on Right
  3. Image on Top
  4. Image on Bottom
  5. Images on alternative sides ( Left and Right )

Any way, I am going to come up with another question.


I would probably create a new section in the Customizer for child pages. You could loop through the pages and have a sub section for each page with its own options.

I’ve done something similar for a portfolio theme I am working on. Each pages that uses the portfolio template has it’s own options panel in the Customizer where you can set custom color options and stuff for each portfolio page.

Sorry for the late reply, but hopefully that will help.

(Naresh Devineni) #8

Thank you for the input. I will look in to that :slight_smile: