Answer the question
In order to leave comments, you need to log in
How to add different html markup for different pages using Pods?
With the help of WP, I created Pages for the menu (Home, About the site, Delivery, Contacts), translated these pages (so far there are only the page name and CNC) through Polylang. Each of the pages in the layout has a different visual content (html with text), only the header and footer do not change - of course. I need to leave the text for editing in the admin panel (I don’t know how to add fields or something else ...), but html, logically, should change in php along with variables for text output. I heard this can be done through pods.
How do professionals solve such a problem?
Thanks in advance for your reply!
Answer the question
In order to leave comments, you need to log in
Create, for example, main.php in the theme folder. In it write:
<?php
/*
Template Name: glavnaya
*/
?>
<?php get_header(); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()):the_post(); ?>
/*здесь контент страницы в нужной вам разметке */
<h1><?php the_title();?></h1>
<?php the_content();?>
<?php endwhile;?>
<?php else : ?>
<?php endif; ?>
<?php get_footer(); ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question