Answer the question
In order to leave comments, you need to log in
How to split this page?
Hello! I am learning wordpress how to assemble this page correctly (in attack)
There is a title, a block with info, working conditions + gallery, requirements with a questionnaire, and some text, we do not consider reviews.
Those. it turns out at least 4 blocks, which with text + something additional (gallery, file).
How can this be done in a post? Do a bunch of ACFs and output from them? What if I want to group by blocks?
Answer the question
In order to leave comments, you need to log in
ACF in hand and do it.
We divide into 4 blocks - in ACF we make 4 tabs.
In each tab, we make those additional fields that relate to it.
If some block is repeated on all pages, but we take it out to the template, for example. Or on the options page in ACF Pro.
In general, there are a lot of options, in ACF you can do almost anything.
>> How to implement it in a post?
there are several options:
- if this is a landing page, then you make a regular page and a custom template for it
- if it is a job directory, then post + a bunch of additional fields and output from them
- write your own "job directory" in a separate section in WP with your tables and routes , where it will be convenient to manage the necessary sections
>> Make a bunch of ACFs and output from them?
Yes, you can, but it will be difficult for the job editor to manage
>> What if I want to group by blocks?
Alternatively, specify the block-id in the post, for example <!--block_id_1--> and in the template, look for this text and replace it with your block, like this:
<?php
$postText = get_the_content();
if (strpos($postText, '<!--block_id_1>')) {
ob_start();
include "block-id-1.php";
$block = ob_get_clean();
$postText = str_replace('<!--block_id_1>', $block, $postText);
}
echo $postText;
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question