Web Shakehands
Web Shakehands

Language


Set different main pictures for each page on WordPress



I have explained in the previous article that the critical point when the user hit to each page is the main picture, but I also told you that WordPress is slightly difficult to set the main picture for different pages.

Maybe it will be a little bit hard, but I will tell you how to set this.

I guess this will be fun if you challenge this to level up your skill.

You will use FTP so, please see this article as well.

http://global-s-h.com/wordpress/ftp.php



Open "themes" using the FTP.




Open "SEO PRESS".




Drag and drop "header.php" and "page.php" to your computer desktop to download.




Copy the downloaded files and change the name to "header-2.php" , "page-2.php".




Open the file "header-2.php" with the notepad application.




Go back to WordPress and upload two main pictures from the menu "header".




Select the main picture other than the top page from the "media library".




Copy the URL of the main picture.




<?php get_template_part( 'template-parts/header', 'header' ); ?> Change this code to below.

(Paste the part under /wp-content.)




Open "page-2.php" with the notepad.

Insert the below code on the first line.

Insert ["2"] on the second line.




Upload the changed files.




This time we will change the main picture of the sample page.




From the "page attributes", click "template" and choose "page-2".

Click "update".




This picture will appear on the top page.




You can upload the different picture on the sample page.



Like this, if you want to set the different pictures on the various pages, make "page-3.php" , "page-4.php".

このエントリーをはてなブックマークに追加


Newest WordPress Article !

2017-06-22 Use "BackWPup" plugin for WordPress to backup your data NEW!


2017 3/2 Make "Child Theme" for WordPress


2017 2/17 Change the main pictures of "Home, blog, sample, and the other" pages for WordPress


2017 2/02 Use PHP to change different main pictures on different pages for WordPress


2017 1/20 Set different main pictures for each page on WordPress


2017 1/5 The importance of the main picture for WordPress


2016 12/15 Use "WPTouch Mobile Plugin" to change the design of the smartphone site


2016 11/17 Install "JETPACK" plugin to your WordPress


2016 10/6 Put "Eye Catch Picture" in the blog articles


2016 09/23 Install "Smart Slider 3" plugin into WordPress"


2016 08/11 Use plugin "Contact Form 7"


2016 07/14 Use plugin "All in One SEO Pack"


Just enter your E-mail and you will receive free
mail magazine about how to make your website etc.
E-mail:
  

Go to top