T
T
Tantbpv2015-12-29 11:45:04
WordPress
Tantbpv, 2015-12-29 11:45:04

Best practices for wordpess + how to style this interface element?

Hello!
I'm pulling the layout on WP, I need a hint on how best to design the interface element.
There is such a block:
56e09cb2955542ed932660258795c3eb.jpg
It is found in several places on the site with minimal differences (the color of the background and buttons), it is on almost all pages at least 1 time.
How can this element be integrated with WP? So far, I have 3 options:
1. The form is laid out "tightly" and the php handler is written separately, and the administrator's e-mail is taken from the WP settings; (little flexibility)
2. I install the contact form 7 plugin and insert its shortcode directly into the layout using do_shortcode(); (shitcode)
3. In all places where the output of the block is needed, I register the widget zone and insert the shortcode into the text widget; (a crutch and there is a big chance that the customer will screw up later)
I don’t have much experience with WP and I suspect that somewhere I have a global miscalculation due to ignorance of the system’s capabilities.
I would like to hear how you would solve a similar problem.
In general, it will be great if you tell me where to read about various best practices and the best solutions when creating themes for WP. Especially about the possibilities of WP for displaying various content.
Thank you all and Happy New Year!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mr Crabbz, 2015-12-29
@Tantbpv

2. I install the contact form 7 plugin and insert its shortcode directly into the layout using do_shortcode(); (shitcode)

- why is this suddenly shitty code? This way you will have a minimum amount of extra code - it's already implemented in the shortcode. And if you change the color on certain pages - so in css based on the page id, change the style of the form:
body.page-10 .contact-form {
   ...
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question