Hello! Please tell me, now I have ads on my page in two columns, but how do I make them appear in three columns?
Hi,
Please check the solution in this topic Increase in the listing columns on the site
Your link to the screenshot does not open!
On the main page, I can edit the columns of categories and ads, and I need to change the number of columns from 2 to 3 on the page of the ads themselves.
Well, how about on the ads page (not on the usual main page where I have categories and ads, but on the page it is the ads that are changed) -do not make 2 columns of ads, but 3-4? Please tell me, I can’t find anywhere, I have all hope for you dear developer. Please tell me how to do it? I have been waiting for an answer from you for 2 days now.
I inserted this code
<?php
add_filter(
'hivepress/v1/templates/listings_view_page',
function( $template ) {
return hivepress()->helper->merge_trees(
$template,
[
'blocks' => [
'listings' => [
'columns' => 3,
],
],
]
);
}
);
Instead
<?php
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
// Include the theme framework.
require_once DIR . ‘/vendor/hivepress/hivetheme/hivetheme.php’;
And it didn’t work, broke the whole theme. I had to restore from backup. Please write me the correct code
Hi,
You can change the display of columns in several ways:
-
If this is the home page, then use this document: How to customize pages - HivePress Help Center
-
Overwrite the template or template part How to customize templates - HivePress Help Center, How to override template parts - HivePress Help Center
-
Create CSS or PHP snippets. If customizations are required for your site, please try customizing it using the collection of code snippets Search · user:hivepress · GitHub and other developer resources, or consider hiring someone for custom work https://fvrr.co/32e7LvY
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.