Support

Home Forums Event Espresso Premium Footer empty (get_footer()) in Event List & on Single Event page

Footer empty (get_footer()) in Event List & on Single Event page

Posted: March 27, 2017 at 5:02 am


XTRAS

March 27, 2017 at 5:02 am

Hi there. I’m new to EE but not that new to WP in general. One thing bothers me: why there’s footer missing on my page(s) when in EE context? I mean: for a single normal page, for a blog entry there a footer always “attached” but for EE there isn’t.
Is Visual Components Plugin to blame? I’m using a child template of a farmvilla organic theme and into this child directory I did copy some of the Arabica_2014 template files and modified them as well. So far it is working. But still, although in the archive-espresso_events.php file there’s get_footer() function present I can not see any content to be rmndered for/in the footer.
All other pages/blog pages are working fine… Help!


Tony

  • Support Staff

March 27, 2017 at 5:36 am

Hi there,

We don’t have enough information to know the cause.

I’m using a child template of a farmvilla organic theme and into this child directory I did copy some of the Arabica_2014 template files and modified them as well.

Which files did you copy over?

The Arabica_2014 template files are based on twenty fourteen and may not work correctly with your theme although it does depend on what templates your loading and what you have changed.

If you preview a default theme such as twentyfourteen can you see the footer on the EE pages?

But still, although in the archive-espresso_events.php file there’s get_footer() function present I can not see any content to be rmndered for/in the footer.

Have you tried enabled WP_DEBUG to confirm there are no fatal errors being thrown during the get_footer call on those pages?


XTRAS

March 27, 2017 at 6:00 am

Hi there!
I did copy over like all of the template files: archive*, content*, loop*, single* from the Espresso_Arabica_2014 into my child theme’s folder. Here’s a structure/content of the theme I’m using:
Child theme's directory structures
(functions.php is mine, I haven’t copied it from the Arabica)

I can not preview it in 2014 because 2014 is not there anymore and the 2017 seems to be somehow broken – maybe because of the VC integration farmvilla organic theme is based on. And all those Redux Framework, Revolutionary Slider etc. and other heavy stuff it contains?

Debugging helps not that much as well – in the debug.log besides some notices I didn’t really observe any error(s) or warning(s).


XTRAS

March 27, 2017 at 6:05 am

Sorry, it appeard DB does not really work img tags…
Here ...


http://i67.tinypic.com/i5aqyw.jpg


Tony

  • Support Staff

March 27, 2017 at 9:55 am

There’s really too many unknowns to be able to narrow this down.

By default the archive and single template files just call get_footer() which should be loading the footer.php file from within your child theme, is there content within that file?

Try comparing your archive-espresso_events.php and single-espresso_events.php files with your parent themes single.php and archive.php file to find what is different in how they are loading the footer.


XTRAS

March 28, 2017 at 12:23 am

<footer class="footer_xtrasTheme">  
    <?php
    echo "FOOTAH"; // added for test purposes right about now :)
    if ( !is_front_page() && is_home() ) {
    $id = get_option( 'page_for_posts' );
    }
    
    $footer_single_style = get_post_meta( $id, "_footer_style", true);
    if ( $footer_single_style != "no_footer" && $footer_single_style != "" ) {
      $the_query = new WP_Query( 'page_id='.$footer_single_style.'&post_type=footers' );
      while ( $the_query->have_posts() ) :
        $the_query->the_post();
      ?><div class="container"><div class="row"><div class="col-md-12">  
      <?php the_content(); ?>
      </div></div></div>
      <?php 
      endwhile;
      wp_reset_postdata();
    }
    ?>

So it turns out, the string “FOOTAH” shows up, the rest is messed up. Thanks for your help. I think I’ll handle it by myself from here :).


XTRAS

March 28, 2017 at 1:20 am

… additionaly, the problem is that I cannot assign a footer for an EE single/list page like I’d normally do for a post or any other CPT in/via the Visual Components thingie. It just doesn’t show the option to choose a footer.


Tony

  • Support Staff

March 28, 2017 at 3:46 am

That’s a feature of your theme, without viewing the code I don’t know why it does no support EE CPTs.

The problem with the footer is this:

$footer_single_style = get_post_meta( $id, "_footer_style", true);

Will return false, meaning this:

if ( $footer_single_style != "no_footer" && $footer_single_style != "" )

Will return false and no footer will be shown.

One option is to use a footer specifically for EE post types that includes posts without the conditional.


XTRAS

March 28, 2017 at 3:51 am

Right now, in case the ‘$footer_single_style’ is empty (for EE pages) I’m just checking “normal” blog posts for footer’s ID and “assign” it from there, so to speak. Works.
Thanks!


Tony

  • Support Staff

March 28, 2017 at 4:09 am

Yeah that works, I’m glad you have a solution.

The support post ‘Footer empty (get_footer()) in Event List & on Single Event page’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso