Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #3604854
Big banner home
Closed

Comments

  •  1
    marcos started the conversation

    Dear Developer, I need the option to show random posts here (home big banner - please see screenshot attached), but with a limit of a week or a bit more. My portal has posts from 2007 and I don't show such old posts there.

    There are options, most viewed from day, week, month, all time, random, post id, and post tittle, but I need to set it random with a limit of time.

    Can you please kindly give directions? Can you even say what is the file where i can set this query manually so i can do it myself.

    Thank you very much,

    Attached files:  Captura de tela 2024-03-12 142405.png

  •  1
    marcos replied

    I was using newsmag theme and your theme is better than newsmag, however, they have more options in this big banner which gives us more flexibility. Please take a look at the screenshot from newsmag big banner query options. Maybe you could have more options in future theme updates.


    5077062631.png

    Attached files:  Captura de tela 2024-03-12 155505.png

  •  2,610
    PenciDesign replied

    Hi,

    Please edit the homepage with the Elementor Page Builder → select the Penci Big Grid element: modify the query like the screenshot below:

    0xBLn4N.png

    Regards,
    PenciDesign.


  •  1
    marcos replied

    Hello, it seems you didn't read my entire text, or you don't know your theme very well. I'll repeat - your random selection brings very old posts as my portal has blog posts since 2007. I need random posts from the last week, or month and Soledad doesn't have such an option.

    Can you please kindly give directions on which file in your theme I can find this query so I can't adjust it directly in code to show only the last 30 days' random posts?

    Please look at the screenshot for the default random post (your direction), It brings a post from December 7th, 2016. A very old post. Does anyone want to visit a news portal and see 8 years old news?

    I appreciate your support.


    6849302046.png
  •  2,610
    PenciDesign replied

    Hi,

    The current version of Soledad doesn't include the option to help you query random posts within a custom date/time range. We'll consider adding this feature in a future theme update.

    Regards,
    PenciDesign.


  •  1
    marcos replied

    Hello my friend, I know Soledad doesn't have such an option, that's why I asked for support.

    While this update doesn't come, can you please kindly give directions on "which file in your theme" I can find this query so I can't adjust it directly in the code to show only the last 30 days' random posts?

    I appreciate your concern about my request.

    Thank you.

  •  2,610
    PenciDesign replied

    Hi,

    The Soledad theme contains many WP_Query function calls. Is that the area you need to modify?

    Regards,
    PenciDesign.


  •  1
    marcos replied

    Yes, please just inform where is the WP_Query for penci big grid (file and line) and I'll be good to go.

    Thank you very much.

  •  2,610
    PenciDesign replied

    Hi,

    Please open this file:

    wp-content/themes/soledad/inc/elementor/modules/query-control/module.php

    Find:

    $order_by = isset( $settings['orderby'] ) ? $settings['orderby'] : 'date';

    Add below this line:

    if ( 'rand' == $order_by ) {
    $query_args['date_query'] = => array(
        array(
            'after' => '30 days ago',
        ),
    );
    }

    Regards,
    PenciDesign.



  •  1
    marcos replied

    Thank you very much. That solved my problem.

    Best regards.