BEST DEALS Section Empty

Direct Webstore

Well-Known Member
How is the BEST DEALS section on the home page populated? It's empty.

I noticed in the home.php file this ...

<?php get_template_part( 'products/main', 'bestdials' ) ?>

"bestdeals" is mispelt as "bestdials" ... I changed it and uploaded the file, but it makes no difference.

What's up??
 

Direct Webstore

Well-Known Member
200.gif
 

Derice

New Member
Just figure out if you added more than 4 products, the fifth products will appear in the Best Deals section. Seem like there is no control on how we can set which products go into BEST DEALS section.
 

Direct Webstore

Well-Known Member
if you added more than 4 products, the fifth products will appear in the Best Deals section.

Doesn't seem to be much of a criteria to be be "Best"... LOL. I just removed it from the template and used the extra space for a slider showing all the categories.
 

Direct Webstore

Well-Known Member
How can I remove the BEST DEALS section? I am using WPCloudSite hosting

Only by deleting this from the home.php file. (Appearance/Edit) But it will come back with each theme update ... unless you are using a "child theme"

<!-- BEST DEALS -->
<div class="content-from-cat">
<div class="container">
<h3 class="title-cat text-uppercase"><?php _e( 'Best Deals', 'ami3' ); ?></h3>
<?php get_template_part( 'products/main', 'bestdials' ) ?>
</div>
</div>
 

Derice

New Member
I go to appearance > customize > additional css > type "div.list-product.best-deals { display:none; }"
Seem working fine but not sure if it will affect other area
 

Direct Webstore

Well-Known Member
I go to appearance > customize > additional css > type "div.list-product.best-deals { display:none; }"
Seem working fine but not sure if it will affect other area

Yeah...that's another way. I just deleted the section because I replaced it with a slider. And I use a child theme, so template edits are not a problem.
 

artmelkon

Member
Yeah...that's another way. I just deleted the section because I replaced it with a slider. And I use a child theme, so template edits are not a problem.
Did you moved all the files into child theme?
I have created one to manipulate the css file, but it's it useless because to load css it's semi hard coded.
 

Real Residual

Active Member
Best deals are based on the discount. You set discount from original price of the product versus the current price. If you set a product price at $100 and you are selling it at $50, then the discount is 50%, and if it is in the top 8 high discounted products among all your product, it will show up in that section.

As far as misspelled "bestdials", this is the file name is the product/ directory, so if you change it, it won't work! It corresponds to main-bestdials.php. I did a post on how to add sections on the front page.

https://forum.alidropship.com/threads/new-block.2857/page-2
 

Direct Webstore

Well-Known Member
Did you moved all the files into child theme?
I have created one to manipulate the css file, but it's it useless because to load css it's semi hard coded.

My Child theme has a new functions.php with the following code
Code:
<?php
function theme_enqueue_styles() {
    $parent_style = 'parent-style';
    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style )
    );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );

add_theme_support( 'post-thumbnails' );

The style.css file begins with ...

Code:
/*
Theme Name: Davinci Child
Description: A simple child theme.
Author: xxxxx
Version: 0.1
Template: davinci
*/
body {
background: #ffffff; }
etc etc ....

The only other files in it are ones I have modified ... i.e...
b-social.php
footer.php
front-page.php
header.php

and because I have also modified the blog page I have the folders tpl/blog/tpl with the files...
_bar.php
_item.php
_single.php
 

artmelkon

Member
My Child theme has a new functions.php with the following code
Code:
<?php
function theme_enqueue_styles() {
    $parent_style = 'parent-style';
    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style )
    );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );

add_theme_support( 'post-thumbnails' );

The style.css file begins with ...
I have tried that exact code and it doesn't work properly with Rembrandt Theme. I have created the child theme but couldn't find a spear time to fix the page yet. Thanks
 

Direct Webstore

Well-Known Member
I have tried that exact code and it doesn't work properly with Rembrandt Theme.
Don't copy exactly what I posted. That's for the Davinci theme. You need to edit the head section of the style.css and possibly the functions.php. I don't have a copy of Rembrant ... so I can't tell you exactly what to do. :)
 

artmelkon

Member
Don't copy exactly what I posted. That's for the Davinci theme. You need to edit the head section of the style.css and possibly the functions.php. I don't have a copy of Rembrant ... so I can't tell you exactly what to do. :)
I know what you mean, what I was trying to say was the code you have is same as in WP page how to create child theme and for style.css is very simple.
This is the generic code for css file. :)

This css code coudl be used for any child them
****************************************
/*
Theme Name: Rembrandt-child
Theme URI: http://example.com/rembrandt-child/ /* http://yourdomain.com/whatevertheme-child/ */
Description: Twenty Fifteen Child Theme /* Rembrandt child theme */
Author: John Doe
Author URI: http://example.com
Template: twentyfifteen /* Rembrandt*/
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fifteen-child /* rembrandt-child */
*/
 
Top