Skip to content
Public Ticket #27923

Big banner home

Conversation thread

marcos replied

Customer Reply

Thank you very much. That solved my problem.

Best regards.

PenciDesign Supporter replied

Staff Reply

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.


marcos replied

Customer Reply

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.

PenciDesign Supporter replied

Staff Reply

Hi,

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

Regards,
PenciDesign.


marcos replied

Customer Reply

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.

PenciDesign Supporter replied

Staff Reply

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.


marcos replied

Customer Reply

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

PenciDesign Supporter replied

Staff Reply

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.


marcos replied

Customer Reply

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

marcos started the conversation

Conversation Start

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,

Want to join this conversation or access attachments? Sign in first.