• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

LanceHillier

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 20 posts - 1 through 20 (of 30 total)
1 2 →
  • Author
    Posts
  • September 15, 2021 at 1:27 am in reply to: How to remove page animations without affecting CLS #504457
    LanceHillier
    Participant

    Hi Jack,

    I realise this post is a few months old but if you look for this code in the themes `style.css' file you can either delete or modify to something you like.

    /* Site Container
    --------------------------------------------- */
    
    .site-container {
    	animation: fadein .25s;
    	word-wrap: break-word;
    }
    
    @keyframes fadein {
    
    	from {
    		opacity: 0;
    	}
    
    	to {
    		opacity: 1;
    	}
    
    }

    This is taken from a theme I am working on so the values might be slightly different, I usually just delete the @keyframes fadein and set the animation: fadein .25s; to a value I like.

    Cheers,
    Lance.

    August 15, 2020 at 7:44 am in reply to: Issues with Custom Pagination #500582
    LanceHillier
    Participant

    Thanks Andy, I have this fixed now, it ended up being a permalink conflict because of the way I had the page set up, it was the same as the CPT which after changing it to something else everything was fine.

    Thank you!

    August 15, 2020 at 3:29 am in reply to: Issues with Custom Pagination #500581
    LanceHillier
    Participant

    Thanks for the reply Andy, missed that one!! but hasn't changed the outcome, unfortunately.

    July 1, 2020 at 9:55 pm in reply to: CPT archive with Multiple Loops #499824
    LanceHillier
    Participant

    Hi Brad, Just as a follow-up, I managed to get this working and turns out I was looking in completely the wrong place, the 'Videos' were coming from an ACF repeater field so wp_query wasn't working. I started then looking at how to limit ACF fields and priced together this:

    if( $videos ) {
    for( $i = 0; $i < $videos; $i++ ) {
    if($i==6){ break; }

    Which now limits the videos to 6.

    Happy days!! Thanks again for your help!!

    June 28, 2020 at 10:52 pm in reply to: CPT archive with Multiple Loops #499702
    LanceHillier
    Participant

    And would love to know how to do this in a single loop, do you have an example I could look at?

    June 28, 2020 at 10:41 pm in reply to: CPT archive with Multiple Loops #499701
    LanceHillier
    Participant

    ok, figured everything out except getting the $args to limit the number of posts in each loop.

    Could WordPress core be interfering with the $args somehow?

    June 28, 2020 at 8:30 pm in reply to: CPT archive with Multiple Loops #499700
    LanceHillier
    Participant

    Here is my current code:

    <?php
    
    //* Force full-width-content layout setting
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    
    add_action( 'genesis_loop', 'lh_ukevideos_loop' );
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    /**
     * Uke Charts Loop 
     *
     */
    function lh_ukevideos_loop() {?>
    
                <?php $args=array( //Loop 1
                    'post_type' => 'videos',
                    'taxonomy' => 'video-tags',
                    'term' => 'beginner-videos', 
                    'posts_per_page' => '3'            
                    );
                    $myloop = new WP_Query($args);?>
    
                <div class="beginner-videos"> 
                    <div class="wrap">
    
                    <?php if ( $myloop->have_posts() ):
                    $count = 2;
                    while ( $myloop->have_posts() ):
                    $myloop->the_post(); 
    
                $videos = get_post_meta( get_the_ID(), 'beginner_videos', true );
                if( $videos ) {
                  for( $i = 0; $i < $videos; $i++ ) {
                    $title = esc_html( get_post_meta( get_the_ID(), 'beginner_videos_' . $i . '_title', true ) );
                    $video = esc_url( get_post_meta( get_the_ID(), 'beginner_videos_' . $i . '_video', true ) );
                    $thumbnail = (int) get_post_meta( get_the_ID(), 'beginner_videos_' . $i . '_thumbnail', true );
                    
                    // Thumbnail field returns image ID, so grab image. If none provided, use default image
                    $thumbnail = $thumbnail ? wp_get_attachment_image( $thumbnail, 'be_video' ) : '<img src="' . get_stylesheet_directory_uri() . '/images/default-video.png" />';
                    
                    // Displayed in three columns, so using column classes
                    $class = 0 == $i || 0 == $i % 3 ? 'one-third first' : 'one-third'; 'clearfix';
               
                    // Build the video box
                    echo '<div class="' . $class . '"><a href="' . $video . '">' . $thumbnail . '</a>' . $title . '</div>';             
                  }
                }
                endwhile; endif; ?>
                    </div>
                </div>
       
            <?php wp_reset_query(); // end beginner videos loop ?>
    
                <?php $args2=array( //Loop 2
                    'post_type' => 'videos',
                    'taxonomy' => 'video-tags',
                    'term' => 'event-videos',
                    'posts_per_page' => '3'
                    );
                    $myloop2 = new WP_Query($args2);
                    if($myloop2->have_posts()) : while($myloop2->have_posts()) :
                    $myloop2->the_post();?>
    
                <div class="event-videos"> 
                     <div class="wrap">
    
                   <?php $videos = get_post_meta( get_the_ID(), 'event_videos', true );
                if( $videos ) {
                  for( $i = 0; $i < $videos; $i++ ) {
                    $title = esc_html( get_post_meta( get_the_ID(), 'event_videos_' . $i . '_title', true ) );
                    $video = esc_url( get_post_meta( get_the_ID(), 'event_videos_' . $i . '_video', true ) );
                    $thumbnail = (int) get_post_meta( get_the_ID(), 'event_videos_' . $i . '_thumbnail', true );
                    
                    // Thumbnail field returns image ID, so grab image. If none provided, use default image
                    $thumbnail = $thumbnail ? wp_get_attachment_image( $thumbnail, 'be_video' ) : '<img src="' . get_stylesheet_directory_uri() . '/images/default-video.png" />';
                    
                    // Displayed in three columns, so using column classes
                    $classs = 0 == $i || 0 == $i % 3 ? 'one-third first' : 'one-third'; 'clearfix';
                    
                    // Build the video box
                    echo '<div class="' . $classs . '"><a href="' . $video . '">' . $thumbnail . '</a>' . $title . '</div>';
                  }
                }
                ?>
    
                <?php endwhile; endif; ?>
    
                <?php wp_reset_query(); // end beginner videos loop ?>
    
            </div>
        </div>
       <?php           
    }
    ?>
    <?php
    
    genesis();
    June 28, 2020 at 8:27 pm in reply to: CPT archive with Multiple Loops #499699
    LanceHillier
    Participant

    When I use get_the_title() it echo's out the second loops title

    June 28, 2020 at 8:21 pm in reply to: CPT archive with Multiple Loops #499698
    LanceHillier
    Participant

    Everything is laid out how I want it too now, Just need to figure out how to call the taxonomy/term title for the two loops and get the $args working to limit posts.

    I've just sat down now to spend the day on it

    June 28, 2020 at 6:51 pm in reply to: CPT archive with Multiple Loops #499694
    LanceHillier
    Participant

    Ok, the wraps are just basic html structure that for some reason my brain didn't connect the dots...

    June 28, 2020 at 6:19 pm in reply to: CPT archive with Multiple Loops #499691
    LanceHillier
    Participant

    Hi Brad,

    Sorry for taking up your time mate.

    The problem I'm having with the styling is that their doesn't appear to be a HTML tag wrapping the containers for the loop. I can just put in a div around the loops but when I inspect element on the first loop for example the div is in the left hand corner but doesn't contain the videos in the loop.

    Does that make sense?

    I know this code...

    // Build the video box
                    echo '<div class="' . $classs . '"><a href="' . $p_video . '">' . $p_thumbnail . '</a>' . $p_title . '</div>';
                  }

    ...Is building the Video Box and it's putting them all in a column class of three which has been defined with the $class variable.

    Just not sure how to contain those video boxes in a wrapping element that actually contains them.

    June 27, 2020 at 8:18 pm in reply to: CPT archive with Multiple Loops #499620
    LanceHillier
    Participant

    Hi Brad,

    Is it still possible to have different number of posts in a single loop?

    Do you now how I can get the two loops in containers so I can put a titles and style? they seem to be in the Video Box and in columns but I don't seem to be able to style them as a whole

    Thanks again mate!!

    June 25, 2020 at 12:26 am in reply to: CPT archive with Multiple Loops #499545
    LanceHillier
    Participant

    Yeah thanks Brad, I love it but I am way over my head here I think.

    One of the problems I'm having with the arguments is that if I put the `if($myloop->have_posts()) : while($myloop->have_posts()) :
    $myloop->the_post();`

    back on the first loops $arg, it runs the code twice. I have it set up like two loops inside a main loop and I wonder if that's wrong.

    I'm looking for answers for the arguments in the ACF documentation right now as, are these fields even classified as posts?

    June 24, 2020 at 11:57 pm in reply to: CPT archive with Multiple Loops #499542
    LanceHillier
    Participant

    Thanks Brad, I'll look through that, just to clarify the two loops are coming from CPT's and a repeater field in each set up with a title, video and thumbnail.

    It's been about a week of getting this far, would be great to know if I'm on the right track with it all?

    March 23, 2020 at 8:32 pm in reply to: How to move blocks to different hooks #497480
    LanceHillier
    Participant

    Victor,

    This is perfect!! I'm learning a lot about ACF right now, and this just opens up to a whole new level.

    Thank you!

    Lance.

    November 17, 2019 at 5:19 pm in reply to: Unique Image in the Genesis Featured Post Widget? #494806
    LanceHillier
    Participant

    Oh Thanks Anita, I didn't even think of doing it the other way around, Excellent!!

    November 17, 2019 at 12:09 am in reply to: Unique Image in the Genesis Featured Post Widget? #494800
    LanceHillier
    Participant

    Thanks Brad, looking at this probably not as easy to do as I'd hoped!

    Thanks for the link will go through and see if I can figure it out.

    November 16, 2019 at 11:49 pm in reply to: Unique Image in the Genesis Featured Post Widget? #494798
    LanceHillier
    Participant

    Hi Anita,

    I have a featured post on the home page, but the post is also being featured on an archive page and I'm looking to use a different one on the front page. I know the Featured Post Widget doesn't have the capability so looking for another way, maybe through code, just can't figure it out and wondering if anyone had done this before.

    Thanks for getting back to me.

    April 26, 2018 at 7:59 pm in reply to: Customise content (featured posts) #219332
    LanceHillier
    Participant

    All good,

    thanks Brad! and for anyone else reading my 'thinking out loud' posts!!

    Will mark this as solved.

    Lance.

    April 26, 2018 at 6:41 pm in reply to: Customise content (featured posts) #219331
    LanceHillier
    Participant

    Ha,

    ok I have it working with code I used from this page..

    Thanks Brad, your post has helped me find the right solution, or a solution that works, really helps knowing what to look for.

    I wonder now if there is an easy way to omit words from being displayed in the featured post widget, from within the editor?? as that may be an easier solution for me to remove the Author name from the top of the post?

    Thanks again,
    Lance.

  • Author
    Posts
Viewing 20 posts - 1 through 20 (of 30 total)
1 2 →

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble