Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter AchoronMH

    (@achoronmh)

    anyone know how to make featured image from
    <?php echo get_template_part('content'); ?>
    appear in thumbnail size?

    Thread Starter AchoronMH

    (@achoronmh)

    So I found something similar to that I needed to get, all I need to do is shrink the size of the featured image to a thumbnail size, Here is my page template.

    <?php get_header(); ?>
    <?php
    /**
     * Template Name: Testr
     *
     * A Page Template for displaying users/visitor's liked posts.
     *
     * @package deTube
     * @subpackage Page Template
     * @since deTube 1.1
     */
    ?>
    <section class="content">
    
    	<?php get_template_part('parts/page-title'); ?>
    
    	<div class="pad group">
    
    		<?php while ( have_posts() ): the_post(); ?>
    
    			<article <?php post_class('group'); ?>>
    
    				<?php get_template_part('parts/page-image'); ?>
    
    				<div class="entry themeform">
    <?php   $do_not_duplicate = array(); ?>
    <?php   $mosaics = new WP_Query('tag_id=1812&posts_per_page=4'); ?>
    <?php   while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
    <?php   $do_not_duplicate[] = $post->ID; ?>
    
    <?php echo get_template_part('content'); ?>
    <?php   endwhile; wp_reset_postdata(); ?>
    
    <br />
    
    <?php   $mosaics = new WP_Query( array( 'tag_id' => '2114', 'posts_per_page' => 4, 'post__not_in' => $do_not_duplicate ) ); ?>
    <?php   while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
    <?php   $do_not_duplicate[] = $post->ID; ?>
    <?php echo get_template_part('content'); ?>
    <?php   endwhile; wp_reset_postdata(); ?>
    
    <br />
    
    <?php   $mosaics = new WP_Query( array( 'tag_id' => '2112', 'posts_per_page' => 4, 'post__not_in' => $do_not_duplicate ) ); ?>
    <?php   while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
    <?php   $do_not_duplicate[] = $post->ID; ?>
    <?php echo get_template_part('content'); ?>
    <?php   endwhile; wp_reset_postdata(); ?>
    
    <br />
    
    <?php   $mosaics = new WP_Query( array( 'tag_id' => '2116', 'posts_per_page' => 4, 'post__not_in' => $do_not_duplicate ) ); ?>
    <?php   while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
    <?php   $do_not_duplicate[] = $post->ID; ?>
    <?php echo get_template_part('content'); ?>
    <?php   endwhile; wp_reset_postdata(); ?>
    <div class="clear"></div>
    				</div><!--/.entry-->
    
    			</article>
    
    			<?php if ( hu_is_checked('page-comments') ) { comments_template('/comments.php',true); } ?>
    
    		<?php endwhile; ?>
    
    	</div><!--/.pad-->
    
    </section><!--/.content-->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    What would I need to add to make it so that the 4 posts that are pulled from each category appear as thumbnail size?

    Thread Starter AchoronMH

    (@achoronmh)

    So try exactly what I tried in the first post but have absolutely no idea how?…

    What exactly are you using if I may ask?

    Thread Starter AchoronMH

    (@achoronmh)

    Ok I added this to the functions but it made it so that the latest posts was only filtered to tag id 1812. I need to have both an unfiltered latest posts and a filtered home page. How would it make it so that it only effects the front page rather than the front page and the latest posts?

    Thread Starter AchoronMH

    (@achoronmh)

    So all I’d need to do is add this to the functions.php?

    function my_home_category( $query ) {
        if ( $query->is_home() && $query->is_main_query() ) {
            $query->set( 'tag', '1812' );
        }
    }
    add_action( 'pre_get_posts', 'my_home_category' );

    1812 being the tag_id that I want to show?

    Thread Starter AchoronMH

    (@achoronmh)

    Yeah… I don’t think paying 3x the amount the theme cost for such a thing a smart business idea… I’ll have to figure it out using remnants of code and similar ideas in other themes available online. YOu may close this thread for it has provided me with absolutely no use. Thank you.

    Thread Starter AchoronMH

    (@achoronmh)

    And also, if you go here, https://themeforest.net/item/detube-professional-video-wordpress-theme/2664497/comments?filter=all&site=themeforest.net&term=random+related+post&utf8=%E2%9C%93 The second comment asks for help upon the topic, and the author replied with “you can edit the function “dp_related_posts()” in functions.php, but it’s a customize thing, you have to do it by yourself.” and I have absolutely no idea how to handle such thing.

    Thread Starter AchoronMH

    (@achoronmh)

    As I have stated in my original post, if you look through the comments of the theme, the author has left the theme to rot. He has not provided any support for it in over a year.

Viewing 8 replies - 1 through 8 (of 8 total)