Cannot get it to work!
-
Hello! I really like the look of your plugin and I’ve been trying to implement it to my site but I cannot get it to work since I’m not too familiar with coding.
I want to enable it only on my front home page where it is set to show the latest posts.
Could you please assist me?Here’s the front-page.php of my theme (Arcade Theme):
<?php /** * The front page template. * * This is the template that displays all pages by default. * Please note that this is the WordPress construct of pages * and that other 'pages' on your WordPress site will use a * different template. * * @since 1.0.0 */ get_header(); global $paged; $bavotasan_theme_options = bavotasan_theme_options(); if ( 2 > $paged ) { // Display jumbo headline is the option is set if ( is_active_sidebar( 'jumbo-headline' ) || ! empty( $bavotasan_theme_options['jumbo_headline_title'] ) ) { ?> <div class="home-top"> <div class="container"> <div class="row"> <div class="col-md-12"> <?php if ( is_active_sidebar( 'jumbo-headline' ) ) { dynamic_sidebar( 'jumbo-headline' ); } else { ?> <div class="home-jumbotron jumbotron"> <h2><?php echo apply_filters( 'the_title', html_entity_decode( $bavotasan_theme_options['jumbo_headline_title'] ) ); ?></h2> <p><?php echo wp_kses_post( html_entity_decode( $bavotasan_theme_options['jumbo_headline_text'] ) ); ?></p> <?php if ( ! empty( $bavotasan_theme_options['jumbo_headline_button_text'] ) ) { ?> <a class="btn btn-lg btn-<?php echo esc_attr( $bavotasan_theme_options['jumbo_headline_button_color'] ); ?>" href="<?php echo esc_url( $bavotasan_theme_options['jumbo_headline_button_link'] ); ?>"><?php echo strip_tags( html_entity_decode( $bavotasan_theme_options['jumbo_headline_button_text'] ) ); ?></a> <?php } ?> </div> <?php } ?> </div> </div> </div> </div> <?php } // Display home page top widgetized area if ( is_active_sidebar( 'home-page-top-area' ) ) { ?> <div id="home-page-widgets"> <div class="container"> <div class="row"> <?php dynamic_sidebar( 'home-page-top-area' ); ?> </div> </div> </div> <?php } } if ( 'page' == get_option('show_on_front') ) { include( get_page_template() ); } else { ?> <div class="container"> <div class="row"> <div id="primary" <?php bavotasan_primary_attr(); ?>> <?php if ( have_posts() ) { while ( have_posts() ) : the_post(); get_template_part( 'content', get_post_format() ); endwhile; bavotasan_pagination(); } else { if ( current_user_can( 'edit_posts' ) ) { // Show a different message to a logged-in user who can add posts. ?> <article id="post-0" class="post no-results not-found"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'arcade' ); ?></h1> <div class="entry-content description clearfix"> <p><?php printf( __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'arcade' ), admin_url( 'post-new.php' ) ); ?></p> </div><!-- .entry-content --> </article> <?php } else { get_template_part( 'content', 'none' ); } // end current_user_can() check } ?> </div><!-- #primary.c8 --> <?php get_sidebar(); ?> </div> </div> <?php } get_footer(); ?>Thank you!
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
The topic ‘Cannot get it to work!’ is closed to new replies.