Forum Replies Created

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter domesticgood

    (@domesticgood)

    Here’s what I have:
    <?php
    /* ————————————————————————- *
    * Custom functions
    /* ————————————————————————- */
    function alx_load() {
    // Load theme languages
    load_theme_textdomain( 'hueman', get_template_directory().'/languages' );

    // Load theme options and meta boxes
    load_template( get_template_directory() . '/functions/theme-options.php' );
    load_template( get_template_directory() . '/functions/meta-boxes.php' );

    // Load custom widgets
    load_template( get_template_directory() . '/functions/widgets/alx-tabs.php' );
    load_template( get_template_directory() . '/functions/widgets/alx-video.php' );
    load_template( get_stylesheet_directory() . '/functions/widgets/alx-posts.php' );

    // Load custom shortcodes
    load_template( get_template_directory() . '/functions/shortcodes.php' );

    // Load dynamic styles
    load_template( get_template_directory() . '/functions/dynamic-styles.php' );

    // Load TGM plugin activation
    load_template( get_template_directory() . '/functions/class-tgm-plugin-activation.php' );
    }

    Thread Starter domesticgood

    (@domesticgood)

    I added the code to child theme functions.php and got this error:
    Parse error: syntax error, unexpected ‘&’ in /home/blogdo7/public_html/wp-content/themes/hueman-child-master 2/functions.php on line 7

    Thread Starter domesticgood

    (@domesticgood)

    That’s great that it works! I updated the theme as you recommended and checked alx-posts.php again. But no luck on my end.

    Here’s what I have in alx-posts.php right now in that section (and the lines directly above and below it). Is it right? Did I post it in the right place:

    <ul class="alx-posts group <?php if($instance['posts_thumb']) { echo 'thumbs-enabled'; } ?>">
    		<?php while ($posts->have_posts()): $posts->the_post(); ?>
    		<li>
    
    			<?php if($instance['posts_thumb']) { // Thumbnails enabled? ?>
    
      <?php if ( has_post_format( 'video' ) ): ?>
        <?php get_template_part('inc/post-formats'); ?>
      <?php else : ?>
    
      <div class="post-item-thumbnail">
        <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
          <?php if ( has_post_thumbnail() ): ?>
            <?php the_post_thumbnail('thumb-medium'); ?>
          <?php elseif ( ot_get_option('placeholder') != 'off' ): ?>
            <img src="<?php echo get_template_directory_uri(); ?>/img/thumb-medium.png" alt="<?php the_title(); ?>" />
          <?php endif; ?>
          <?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon small"><i class="fa fa-play"></i></span>'; ?>
          <?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon small"><i class="fa fa-volume-up"></i></span>'; ?>
          <?php if ( is_sticky() ) echo'<span class="thumb-icon small"><i class="fa fa-star"></i></span>'; ?>
        </a>
      </div>
    
      <?php endif; ?>
    
    <?php } ?>
    
    			<div class="post-item-inner group">
    Thread Starter domesticgood

    (@domesticgood)

    Ha ha, sorry to cloud the issue. Thanks again for your help.

    Actually, I don’t really care whether the videos play where they are – that was just what I stumbled upon as a possible solution. What I was originally trying for was a way to automatically pull a thumbnail for the video without going through setting the featured image.

    Thread Starter domesticgood

    (@domesticgood)

    BTW, I also notice -as in the alx-posts widget – that the stock photo is also used in the recommended section at the bottom of the post page. That would be something we would want to have updated as well.

    Thread Starter domesticgood

    (@domesticgood)

    Here’s a video post that works on the home page and on the post page: https://blog.domesticgood.com/farming-in-the-fields-and-some-rachmaninoff/. I set it up using the Video post format using the video URL and no featured image.

    Thread Starter domesticgood

    (@domesticgood)

    bdbrown, thanks for the reply! I appreciate it.

    I replaced the code as you suggested and saved /functions/widgets/alx-posts.php to my child theme. Unfortunately, still no video for the post thumbnails inside the alx-posts widget – just the filler graphic.

    Any other thoughts?

Viewing 7 replies - 16 through 22 (of 22 total)