Answer the question
In order to leave comments, you need to log in
Editing the Wordpress template code. What and how to change?
The main page was created according to template No. 1. There is a large picture in the center of the default template. How to remove it on subsequent pages? There is only one template.
Answer the question
In order to leave comments, you need to log in
Paste the image output code only in the home.php file. If there is no such thing in your template, then through the conditions
<?php
if( is_front_page() )
{
echo "Картинка";
}
?>
<?php
if( is_front_page() ){
echo "This is the front page";
} else {
echo "this is not the main page";
}
?>
Use home.php
To avoid such questions in the future, read the WordPress codex about template hierarchy.
In
English: Template Hierarchy Two
more useful links in English: Creating a Static Front Page , an interactive template hierarchy map
Home Page display
Template file used to render the Blog Posts Index, whether on the site front page or on a static page. Note: on the Site Front Page, the Front Page template takes precedence over the Blog Posts Index (Home) template.
- home.php
- index.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question