0

Hello (sorry for my bad english).

I have searched but not found what I want. I would like to know if there is a possibility to incorporate an option for each page. Something like in the Customize. Each page has a different wallpaper and I want to modify the opacity of each wallpaper with an option in the Page.

I don't know if I'm clear, but with the customizer I change the option for all the pages. What I want is to have an option for each page and a different variable and modify ti in the page and not in the theme customizer. The same way I change the Page attribute or the author.

Thanks you very much for your help and have a good day !

1 Answer 1

1

It sounds like you need custom meta boxes. You could either create your own plugin to add them or use a plugin like Advanced Custom Fields. You would add two meta boxes to each post type where you want to be able to select these options, one to select the image, and another to set an opacity. For an overview of creating your own meta boxes - Add custom meta box on Post page

From there, you would need to output custom CSS using the selected image and opacity as the background for one of the elements on the page - perhaps <body> or <main> but it would depend on your theme. You could either create a child theme and output the <style> tags directly in header.php or you could add to your own plugin and have it output the <style> tags at the wp_head() hook.

From here I'd suggest working on adding the custom meta boxes first, and come back if you get stuck on a specific step.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.