Two php questions
-
Hi there,
I’ve decided to bite the bullet & learn PHP! To do this I’m following a set of tutorials to create new page useing ACF and I’m getting a blank screen (code below)!
Firstly: In the tutorial there is a line:
add_theme_support( 'genesis-structural-wraps', array( 'header', 'footer-widgets', 'footer', 'nav', 'subnav', ) );
I haven’t got clue what this is or how to point it at Harmonic – Help please!Secondly: When I try to look at the page I get a blank screen, F12 also shows no style sheets – again, help please!!
Many thanksCode (in it’s own file):
<?php /** * Template Name: HomePageNewPaul1 */ add_action('full_width_content','do_full_width_content'); add_filter('body_class', 'add_full_width_body_class' ); function add_full_width_body_class($classes){ $classes[] = 'full-width-template'; return $classes; } function do_full_width_content() { ?> <main> <?php // check if the flexible content field has rows of data if( have_rows('flexible_content') ): // loop through the rows of data while ( have_rows('flexible_content') ) : the_row(); // check current row layout if( get_row_layout() == 'hero' ):?> <section> <div class='hero' style="background-image:url(<?php the_sub_field('flexible_image')?>)"></div> </section> endif; endwhile; else: //do something endif; ?> </main> <?php get_header(); do_action('full_width_content'); get_footer();
Added to style.css:
#full_width_template .site_inner{ max-width:100%; padding: 0; } /* Section 1 -- Hero Section */ .hero { background-size: cover; background-position: center; } .cta_container { text-align: center; vertical-align: middle; background-color: rgba(0, 0, 0, 0.52); background: rgba(0, 0, 0, 0.52); color:rgba(0, 0, 0, 0.52); } .cta_content { padding: 100px 10px; color: white; }
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Two php questions’ is closed to new replies.