Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
There are 2 ways:
1. Create a separate template for a specific post. If this post is in posts, then connect the template via single.php and set exactly the same style for it (call it differently), but with display:none;.
2. Create the same style, name mystyle2 differently (again with display:none;). Next, paste the php code into the template. The principle is as follows: if a post with an id such and such, then display the style mystyle2 , otherwise mystyle1 .
Here's how I rendered another contact form 7 plugin form for a specific post:
<?php
if (is_single(3549) ) {
echo do_shortcode('[contact-form-7 id="3579" title="Заказать звонок"]'); // вместо do_shortcode('[contact-form-7 id="3579" title="Заказать звонок"]'); вставляете мойстиль2 в одинарных кавычках ''
} else {
echo do_shortcode('[contact-form-7 id="220" title="Заказать звонок"]'); // вместо do_shortcode('[contact-form-7 id="220" title="Заказать звонок"]'); вставляете мойстиль1 в одинарных кавычках ''
}?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question