Home Forums WoodMart support forum Split: How to Disable Post Date on Featured Image AND Author

Split: How to Disable Post Date on Featured Image AND Author

Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #576494

    themassapothecary
    Participant

    Aizaz, I am having the same issue. I have disabled arthor bios in general and in Woodmart settings I have it disabled as well. The link is the problem. It is linking to an arthor bio that doesn’t exist. CSS doesn’t work as the link is still in the source code so Google is still seeing the link and trying to crawl it and getting 301 redirects.

    How can I completely disable this? On blog archives, I have disabled the meta details (arthor/social icons) in Woodmart settings but they still show there too. I disabled all plugins but woodmart, elementor, and woocommerce and the problem persists still.

    #576611

    Hello @themassapothecary,

    Sorry to hear about the inconvenience. Kindly, please share your Site WP-ADMIN Login details in the Private Content field so that we can check this concern on your Site and help you out accordingly.

    Best Regards.

    #576882

    themassapothecary
    Participant

    Thank you @Aizaz

    #576907

    themassapothecary
    Participant

    @Aizaz, also, while you have admin access, please check the frequently bought together widget on product pages why it doesn’t show the product brands or ratings for all frequently bought together products (except the main product that it is that product page). On the screenshot you can see the first red arrow to the left is the first product that shows ratings count and brand correctly, but the next 2 red arrows on 2nd and 3rd product there is no brand showing like it should and the product ratings arent showing even though both products have ratings. Url to check – https://m7nee5biau-staging.onrocket.site/barneys-botanicals-50mg-delta-8-gummies/

    Attachments:
    You must be logged in to view attached files.
    #576943

    Hello,

    01. Please add the following Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS:

    .blog-design-masonry.has-post-thumbnail .post-date, .wd-entry-meta, .wd-post-date.wd-style-with-bg {
        display: none !important;
    }

    02. Please deactivate all the 3rd party plugins and activate only theme-required plugins on the site and then check the issue. I am sure your issue will be solved. Then Activate the 3rd party plugins one by one and check which plugin is creating the issue for you.

    Otherwise, if the issue still exists then keep the 3rd party plugins deactivated and let me know I will check and give you a possible solution.

    Best Regards.

    #577028

    themassapothecary
    Participant

    1. Thank you, but like I said, css doesn’t fix the issue as the source code still has the link if you use css to hide the link. Google reads pages via source code and with cas the link is still there which is why I said originally css isn’t ab option.

    2. I have already deactivated all 3rd party pligins and this issue persists still.

    #577061

    Hello,

    01. If you want to completel remove it you need to edit the theme files for this. All the customizations made in the theme files are at your own risk.

    You can customize the blog in this file: woodmart\inc\template-tags.php

    02. confirm the permission for plugins deactivation, and switching to the parent/default theme. As soon as we complete the testing we will enable it all back.

    Best Regards.

    #577079

    themassapothecary
    Participant

    2. You can disable plugins to check that’s why I made a staging copy for you.

    #577242

    themassapothecary
    Participant

    Ok for the link to the arthor page I add the woodmart child theme and created a copy of
    inc/template-tags/template-tags.php in the same path in the child theme.

    On my staging site I edited the parent theme file commenting out –

    if ( ! function_exists( ‘woodmart_post_meta_author’ ) ) {
    function woodmart_post_meta_author( $avatar, $label = ‘short’ ) {
    ?>
    <!– Commented out the author label display –>
    <!–
    <?php if ( ‘short’ === $label ) : ?>
    <span><?php esc_html_e( ‘By’, ‘woodmart’ ); ?></span>
    <?php elseif ( ‘long’ === $label ) : ?>
    <span><?php esc_html_e( ‘Posted by’, ‘woodmart’ ); ?></span>
    <?php endif; ?>
    –>

    <!– Commented out the author avatar display –>
    <!–
    <?php if ( $avatar ) : ?>
    <?php echo get_avatar( get_the_author_meta( ‘ID’ ), 32, ”, ‘author-avatar’ ); ?>
    <?php endif; ?>
    –>

    <!– Commented out the author link display –>
    <!–
    ” rel=”author”>
    <span class=”vcard author author_name”>
    <span class=”fn”><?php echo get_the_author(); ?></span>
    </span>

    –>
    <?php
    }
    }

    This worked exactly as needed but I want to do it in the child theme so every update doesn’t erase the comment out. I copied that file to the child theme on my live site and commented out the same code but it is not overriding the parent theme. Am I missing a step?

    I was told I needed to dequeqe the file from the parent theme and in the child theme functions.php enqueue the child theme version but when I tried to use this code to do that –

    function override_woodmart_template_tags() {
    // Correct the path to the child theme’s template-tags.php
    $child_template_tags_path = get_stylesheet_directory() . ‘/inc/template-tags/template-tags.php’;

    if ( file_exists( $child_template_tags_path ) ) {
    require $child_template_tags_path;
    }
    }
    add_action( ‘after_setup_theme’, ‘override_woodmart_template_tags’, 11 );

    I got an error saying –

    Your PHP code changes were not applied due to an error on line 1761 of file wp-content/themes/woodmart-child/inc/template-tags/template-tags.php. Please fix and try saving again.

    Cannot declare class WOODMART_Custom_Walker_Category, because the name is already in use

    Any help is greatly appreciated

    #577386

    Hello,

    Such modification requires complicated code customization which is not covered by our support. All the customizations made in the theme files are at your own risk. Our support doesn’t cover any issues caused by changes in the theme code.

    Best Regards.

    #578274

    themassapothecary
    Participant

    1. Yes, I’m aware. I’m talking in general terms. I never had to override a template file with the child theme before. When overriding a template file is there anything I’m missing in general?

    2. What’s happening with the frequently bought together bugs?

    #581325

    Hello,

    01. In your child theme’s functions.php, you need to remove the parent theme’s woodmart_post_meta_author function.

    In your child theme’s functions.php, you should then define your custom woodmart_post_meta_author function.

    The remove_woodmart_author_meta function removes the woodmart_post_meta_author function from the parent theme.
    The custom woodmart_post_meta_author function in the child theme’s functions.php redefines it with your commented-out sections.

    02. To solve the Frequently Bought Together issue, add this below given code to the functions.php in the child theme to fix the issue:

    if ( ! function_exists( 'woodmart_get_star_rating_html' ) ) {
    	/**
    	 * Get HTML for star rating.
    	 *
    	 * @param string $rating Rating.
    	 * @return mixed|void
    	 */
    	function woodmart_get_star_rating_html( $rating ) {
    		global $product;
    
    		if ( 'variation' === $product->get_type() ) {
    			$rating = wc_get_product( $product->get_parent_id() )->get_average_rating();
    		}
    
    		ob_start();
    		?>
    		<span style="width:<?php echo esc_attr( ( (float) $rating / 5 ) * 100 ); ?>%">
    			<?php echo wp_kses( sprintf( esc_html__( 'Rated %s out of 5', 'woocommerce' ), '<strong class="rating">' . esc_html( $rating ) . '</strong>' ), true ); ?>
    		</span>
    		<?php
    
    		return apply_filters( 'woocommerce_get_star_rating_html', ob_get_clean(), $rating, 0 );
    	}
    }

    Best Regards.

    #581561

    themassapothecary
    Participant

    Thanks.

    On product archive pages, how can I make it so that all events line up correctly when in the sane row two products have different title lengths? See image attached. It goes-

    Product Title
    Product Brand
    Review Stars
    Price

    How can we make the brand and review stars vertically align at the bottom right above the product price?

    Attachments:
    You must be logged in to view attached files.
    #581661

    Hello,

    Navigate to Theme Settings > Product Archive > Product Styles > Product title lines limit. Set the number of product title lines if it does not fit on one line.
    https://ibb.co/2kztmN5

    2. Here is a custom code to fix his issue with brand spacing. Code needs to be added to the global custom css area:

    body .wd-products[class*="wd-stretch-cont"] .wd-product :is(.price,.wrap-price,.product-rating-price) {
    	margin-top: unset;
    }
    
    body .wd-products[class*="wd-stretch-cont"] .wd-product .wd-product-brands-links {
    	margin-top: auto;
    }

    Best Regards.

    #583174

    themassapothecary
    Participant

    Thank you.

    How come when using the default theme archive for blog there is no h1 heading with blog archive name?

    Ours is at massapothecary.com/cbd-articles

    #583186

    themassapothecary
    Participant

    Also, is there a way to make the compare icon show on mobile product cards on archive pages like wishlist and add to cart icons do?

    #583276

    Hello,

    Sorry to say that your given login details are not working, please share the correct login details of your site. So I will further check on your site and give you a possible solution about the compare feature.

    Best Regards.

    #583505

    themassapothecary
    Participant

    I didn’t add current login details because it shouldn’t be needed. By default Woodmart hides the compare icon on mobile. How can we change that? Applicable to any site with woodmart.

    #584082

    Hello,

    Paste the code into the “Mobile CSS” area in Theme Settings -> Custom CSS

    .product-grid-item .wd-buttons .quick-view,
    .product-grid-item .wd-buttons .wd-compare-btn {
        display: block;
    }

    Best Regards.

    #584108

    themassapothecary
    Participant

    That doesn’t work unfortunately. I added !important to the css just in case as well and still nothing. On mobile archive product cards is what I’m referring To. Screenshot example where add to cart and wishlist icon currently show.

    Attachments:
    You must be logged in to view attached files.
    #584203

    Hello,

    Sorry to say that your given login details are not working, please share the login details of your site. So I will further check on your site and give you a possible solution about the compare feature.

    Best Regards.

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