I have created four custom PHP file pages
page-about.php
page-services.php
page-portfolio.php
page-contact.php
I have entered custom php code for every page that will show up on the homepage as a one-page site that has sections (section 1, section 2, section 3, section 4, section 5).
When every you click on the top navigation links where the Home, About, Services, Portfolio, Contact going to scroll down to each section on the page rather than going to each individual pages.
Below is the code I entered for the front-page.php and I was attempting to try a code that I find on stackoverflow.com that might help me solve my problem. But when every try the code for first time nothing has changed on front-page also him still learning Wordpress and PHP.
Example what him trying to with my Wordpress Theme Site http://themeisle.com/demo/?theme=Parallax%20One
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
$args = array (
'post_type' => 'page',
'post_parent' => '29',
'orderby' => 'menu_order',
'order' => 'ASC',
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
$tn = get_page_template_slug( $post_id );
$word = array("page-", ".php",' ');
$template = str_replace($word,'',$tn);
get_template_part('page', $template);
}
} else {
}
wp_reset_postdata();
?>
</main><!-- #main -->
</div><!-- #primary -->
nothing happened on front-page
you mean that nothing has changed? You have a front-page set inSettings -> Reading
and are sure that it is attempting to pull this template? Have you verified that the children under Post Parent29
have the slugsabout
orservices
?