Hide next previous from single product & Change number of products per row

edited March 2020 in WooCommerce
Hi,
How to hide next previous from single product.

And I need to show 2 columns for shop, but the betheme option have 3/4/masonry or list option only.



Added the following code in child theme's function.php, but nothing changed.

/**
 * Change number or products per row to 2
 */
if (!function_exists('loop_columns')) {
    function loop_columns() {
        return 2; // 2 products per row
    }
}
add_filter('loop_shop_columns', 'loop_columns');


There are 4 columns and I need 2.

Please guide. Sorry if isn't related to theme but the docs said if it doen't change contact theme support as it might be hard coded or something.

Comments

  • Hello,
    1) What do you mean by the 'next previous'?
    I do not see any navigation buttons on your single product page.

    2) Sadly, there is no option to change it to grid 2 on the theme options.
    It's only possible with the theme files customizations, it's hardcoded in the theme, but unfortunately, we do not provide help with.
    We only help with the understading the theme, fixing theme bugs and minor css tweaks.
    Thanks
  • Hi, Thanks for your reply.

    1) I didn't found any option so I hide it with css.
    2) That's fine, I changed the page width from 1040px to 1240 px wide and the content looks fine now.

    I've another minor issue, I just installed SSL on my website.
    And changed the URLs in database from http to https (wp_post & wp_postmeta)

    But the muffin builder's WRAP > Background | Image. The image urls show http, and I don't know how to change them in DB. If I remove and add again it does fix the issue but manually doing so is tiring. any help on this plz...

    plz see images for reference

  • 1) If you want to hide it with theme options, please remove the css and I'll help you.
    But if using CSS is not a problem, leave it as it is.

    About the new issue, do not replace anything in the database.
    We suggest to use this plugin to replace old http links to https:

    Thanks
  • edited March 2020
    Dear Pablo Sir, you are awesome help. Really appreciate. Thanks for the plugin, will try.

    1) I think hiding content with css is just a hack. And it uses many extra queries in backend impacting performance as well. I would really appreciate if you could help this in code side.

    This is the css I used
    .woocommerce-content .post-nav, .fixed-nav-prev, .fixed-nav-next {
       display: none;
    }

    Items which I need to remove.
    1) On Single-Product, The arrows and nex prev products are marked in red in THIS  pic
    2) In menu Cart Icon

    On my other site
    1) In menu search Icon
    2) The Fancy Heading having style set to arrow the text gets cut off. shouldn't it's size be responsive? Pic
  • 1) To disable this navigation through the theme, please go to the Theme Options > Blog, Portfolio & Shop > General and tick on these two checkbox.

    2) About the cart icon and search icon, please head to the Theme Options > Header & Subheader > Extras and change the "Search" field to "Hide"


    Thanks



  • edited March 2020
    Hi again.

    3) On home page, hare's the link https://agiledatatech.com/
  • You should change the h2 font size slightly, decrease it to 23px - text you provided there is just too big.
    I could change it to not wrap, but it will overlap behind the screen.

    Theme Options > Fonts > Size & Style
    Thanks
  • Hi, so the font heading size didn't have any effect, because the fancy heading had its own styling.
    I had to override the responsive css for that manually. Many thanks for your time. cheers
  • Yes, sorry about that mistake - there is a lot of elements which depends on the h2 in the theme options, but few of them are using separate, own styling.

    If you have some other questions, feel free to ask ;)
    Thanks


  • edited April 2020
    Hi Pablo, So in the shop options I set "Related Products | Count" to 0. but it still shows them on page.
    Strange, This works fine in my other website.



    Also I got error for the plugin you gave to migrate site https:

    Deprecated: strpos (): Non-string needles will be interpreted as
    strings in the future. Use an
    explicit chr () call to preserve the current behavior in agiledatatech.com/wp-content/plugins/mfn-migrate-cb/mfn-migrate-cb
    . php on line 39





    I've php 7.3 installed, nginx ubuntu 18.04

    EDIT: There was a type in fuction call line 39, fixed it.
    Most url seems to be working fine but Revolution slider images still shows incorrect url

    Also, I want to add google tag manager code right after body tag for all pages. is there any option for this in theme?
  • 1) Please paste that CSS code instead:
    .portfolio .section-post-related{
    display: none !important;
    }


    2) What do you mean by the "incorrect url' ?
    As Can I see, sliders are working fine on the sliders.

    3) Of course, check in the Theme Options > Global > Hooks
    Thanks
  • sorry for late reply & appreciate your work.

    2)  the plugin you gave me didn't update slider urls from http to https. I checked the code of plugin and its not coded to work with revolution slider. Also the slider urls have escaped // like /\/\

    I'll ask if anything else needed, Thanks
  • It should, it replace all of the urls on the website.
    So, if it's not working for your RevSlider, you have to do it by manually - sorry about that.
    Thanks
Sign In or Register to comment.