• When setting up the Jumbotron of Zeal, it allows to configure two buttons. You can set title, post/page and custom link.
    The drop down list labeled “Link to Post/Page” only shows posts but not pages. That should be fixed.

Viewing 1 replies (of 1 total)
  • Thread Starter George Lewe

    (@glewe)

    Until this is fixed, here is a workaround that I use until then. You need to change the function zeal_all_posts_array() in the Customizer.php file. It is not perfect but it does the job.

    function zeal_all_posts_array() {
        
       $posts = get_posts( array(
          'post_type'        => 'post',
          'posts_per_page'   => -1,
          'post_status'      => 'publish',
          'orderby'          => 'title',
          'order'            => 'ASC',
       ));
    
       $pages = get_pages( array(
          'post_type'        => 'page',
          'posts_per_page'   => -1,
          'post_status'      => 'publish',
          'orderby'          => 'title',
          'order'            => 'ASC',
       ));
       
       $posts_array = array();
    
       $posts_array[ 'posts' ] = '[Posts]';
       foreach ( $posts as $post ) :
            
          if ( ! empty( $post->ID ) ) :
             $posts_array[ $post->ID ] = $post->post_title;
          endif;
            
       endforeach;
        
       $posts_array[ 'pages' ] = '[Pages]';
       foreach ( $pages as $page ) :
            
          if ( ! empty( $page->ID ) ) :
             $posts_array[ $page->ID ] = $page->post_title;
          endif;
            
       endforeach;
        
       return $posts_array;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Jumbotron button links don’t show pages’ is closed to new replies.