Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #185956

    Daniel S
    Participant

    Hi,

    I’m getting a fatal error on my photo gallery page. The error is the following:

    Fatal error: Call to undefined function x_page_item_featured_content() in /home/observ15/public_html/wp-content/themes/x-child-integrity-light/framework/views/integrity/content-page.php on line 15

    The code on the “content-page.php” file is the following:

    $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-featured">
      <?php  if(x_page_item_featured_content()){
           x_page_item_featured_content();
           }else{
             x_featured_image();
            };?>
      </div>
      <div class="entry-wrap">
        <?php if ( is_singular() ) : ?>
          <?php if ( $disable_page_title != 'on' ) : ?>
          <header class="entry-header">
            <h1 class="entry-title"><?php the_title(); ?></h1>
          </header>
          <?php endif; ?>
        <?php else : ?>
        <header class="entry-header">
          <h2 class="entry-title">
            <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a>
          </h2>
        </header>
        <?php endif; ?>
        <?php x_get_view( 'global', '_content' ); ?>
      </div>
    </article>

    Line 15 that the error is referring to is the following:

    <?php if(x_page_item_featured_content()){

    If someone could help me fix this ASAP I would greatly appreciate it.

    Dan

    #185964

    Daniel S
    Participant

    I need to add that the issue happened after I upgraded the theme to version 3.1.1 (from version 3.0.1).

    #185967

    Daniel S
    Participant
    This reply has been marked as private.
    #186060

    mariusvetrici
    Participant

    Replace:

    <div class=”entry-featured”>
    <?php if(x_page_item_featured_content()){
    x_page_item_featured_content();
    }else{
    x_featured_image();
    };?>
    </div>

    WITH:

    <div class=”entry-featured”>
    <?php x_featured_image(); ?>
    </div>

    #186088

    Daniel S
    Participant

    Issue has been sorted out. No need to offer support. 🙂

    #186090

    Daniel S
    Participant

    Thank you so much Marius! 🙂

    #186265

    Christopher
    Moderator

    Thanks for sharing Mariusvetrici.

    #186507

    Daniel S
    Participant

    Um…. I’ve just realized that the new code that has fixed the issue has unfortunately removed the gallery (which automatically scrolls through multiple images via the flex slider (not rev slider)) from the following pages:

    • http://www.observatory.net.au/location/
    • http://www.observatory.net.au/about-us/community-activity/
    • http://www.observatory.net.au/facilities-services/

    Can you please have a look at the code and see where it has stopped the slider from working and have it reinstated? This is very important.

    Thank you.

    Dan

    #186819

    Paul R
    Moderator

    Hi Dan,

    Please replace the entire code in content-page.php with this.

    
    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/CONTENT-PAGE.PHP
    // -----------------------------------------------------------------------------
    // Standard page output for Integrity.
    // =============================================================================
    
    $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-featured">
        <?php x_featured_image(); ?>
      </div>
      <div class="entry-wrap">
        <?php if ( is_singular() ) : ?>
          <?php if ( $disable_page_title != 'on' ) : ?>
          <header class="entry-header">
            <h1 class="entry-title"><?php the_title(); ?></h1>
          </header>
          <?php endif; ?>
        <?php else : ?>
        <header class="entry-header">
          <h2 class="entry-title">
            <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a>
          </h2>
        </header>
        <?php endif; ?>
        <?php x_get_view( 'global', '_content' ); ?>
      </div>
    </article>
    

    Thanks

    #186839

    Daniel S
    Participant

    I tried it, but it didn’t work.

    The code you supplied was exactly the same as what I already had.

    Any other ideas?

    #187042

    Zeshan
    Member

    Hi Daniel,

    Can you try disabling your child theme and reactivating your parent theme and seeing if you face the same issue?

    Let us know how it goes.

    Thanks!