Randomized featured image in homepage (Supreme Directory)

This topic contains 3 replies, has 2 voices, and was last updated by  Alex Rollin 5 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #465658

    Diogo Carneiro
    Free User
    Post count: 1

    Hi,

    I’ve been trying out Supreme Directory and I have been enjoying it so far. However, I’ve been trying to implement a randomized homepage image feature using the Dynamic Featured Image (https://github.com/ankitpokhrel/Dynamic-Featured-Image) plugin and thus far I haven’t succeeded. I assumed editing the index.php file would be the way to go, specifically the section below, but it doesn’t seem to have any effect.

    
    
     <div class="featured-area">
            <div class="featured-img" <?php
            $page_for_posts = get_option('page_for_posts');
            if (has_post_thumbnail($page_for_posts)) { // check if the post has a Post Thumbnail assigned to it.
                $full_image_url = wp_get_attachment_image_src(get_post_thumbnail_id($page_for_posts), 'full');
            }else{
                $full_image_url[0] = SD_DEFAULT_FEATURED_IMAGE;
            }
                ?> style="background-image: url('<?php echo esc_url($full_image_url[0]); ?>');" <?php
            ?>>
            </div>

    Can you point me towards the files to edit to make this change? Thanks in advance, Diogo Carneiro

    #465673

    Alex Rollin
    Moderator
    Post count: 27815

    Try

    inc/geodirectory-compatibility.php

    #465794

    Diogo Carneiro
    Free User
    Post count: 1

    Hi Alex, thanks for your answer. Unfortunately that file also seems to have no effect on the homepage (tried to delete the code for displaying the image, for instance, and there’s no change). Do I also need to edit other files besides this one?

    #465826

    Alex Rollin
    Moderator
    Post count: 27815

    Yes, you will need to edit several files if you want to completely change the theme, but we can’t provide support for customizations here in the forum.

    Try searching for the class of what you want to modify within the files.

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket