For your first question wp grabs the title of the home page based on query_posts() this is what makes wordpress so dynamic, you can actually check a page or category id and then select with query posts what to show on it. Since you do not have a query_posts in your code wp defaults to the current post id which is your home page.
For your second, I had a code snippet, but it is at home, you can look it up here
https://developer.wordpress.org/reference/functions/query_posts/
Ok, so here is the snippet. Sorry for the delay, I have been on vacation.
First you have to determine the ID of your home page, or you can use the is home page function. If you go the former route you simply go to the back end to your home page and hover over it with your mouse. the home page should show up in a link tooltip at the bottom of your page. It will be something like post=5 the number is what you need.
Next I would create a category for the post you want to display on the front page and get that ID from the category page in the back end. Again it will be something like tag_id=12
<?php
$currpage = $post -> ID;
if($currpage == 5) {
query_posts('showposts=1&cat=12');
}
while (have_posts()): the_post();
You can have multiple posts on one page this way, infact you can have your whole loop on that page then under it dynamically populate other posts under it like in this example:
http://testex-ndt.com/products/ect-products/ The top part is the page that is working a loop and the bottom (testimonials) are posts that are assigned to a specific category, the showposts here are set to 3 and will display excerpts of the latest three posts. This is one website I did in the past.
One other thing you may want to keep in mind is page templates, if you want one page to work one way and you want another type of page to work another you will have to look into templating.
here is the entire code for that page.
<?php
/*
Template Name:Main Product
*/
?>
<?php get_header(); ?><!-- BANNER is part of main homepage only -->
<?php if (have_posts()) : ?>
<?php while (have_posts()): the_post(); ?>
<?php $postName = get_the_title($post); ?>
<!-- title link dynamic -->
<?php edit_post_link('Edit this item','',' | '); ?>
<?php the_content('Continue Reading'); ?>
<?php posts_nav_link(); ?>
<?php endwhile; ?>
<?php else : ?>
<div class="w3-col text">
<h2>Not Found</h2>
<p><?php _e("Sorry, no posts or pages could be found. Why not search for what you were trying to find?"); ?></p>
<?php get_search_form(); ?>
</div>
<?php endif; ?>
<!-- insert testimonial here -->
<section class="w3-row cl testimonials">
<!-- make code for query based on the page, then get the top three testimonials in excerpt form This is commented out because I did it with a function I attached to the header I will show below
$currpage = $post -> ID;
if($currpage == xx){
$cat = x;
}
-->
<h2>Testimonials for <?php echo $postName; ?></h2>
<?php
$currpage = $post -> ID;
$cat = testimonial($currpage); //here is the function
query_posts('showposts=3&cat=' .$cat ); ?>
<?php while (have_posts()): the_post(); ?>
<div class="w3-col excerpt" style="width:30%;">
<?php the_excerpt(''); ?>
</div>
<?php endwhile;
wp_reset_query(); // DO THIS EVERYTIME YOU ALTER QUERY_POSTS
?>
</section>
<!-- /content float -->
</div>
<!-- /content -->
</div>
So the Function was set up like as a seperate php file so I could alter it modularly. I called the file category_help.php
<?php
/*This particular block of code is only for determining what category of testimonial is allowed in a post. */
function testimonial($myPageID){
//services (all cats)
$id = "-15,-14,-13";
//Products
//lfet
if($myPageID == 18) $id = 2;
//bfet
if($myPageID == 22) $id = 4;
//rfet
if($myPageID == 20) $id = 3;
//ect
if($myPageID == 24) $id = 5;
//ultrasound
if($myPageID == 26) $id = 8;
return $id;
}
?>
Then I called this in the top of header.php
<?php require 'category_help.php'; ?>