• MisterH

    (@hmarksthespot)


    Hello, Currently OceanWP through the wordpress customizer offers you to remove the meta data from the single products archive, however if one wanted to keep the categories there and just hide the tags from the single products, this would not be possible.

    Is there a solution to this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Shahin

    (@skalanter)

    Hello @hmarksthespot,

    Please correct me if I am wrong; are you concerned about keeping the categories in archives but hiding tags/categories from a single product page? If I understand correctly, you can use the following code snippet in the child theme:

    
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_tags', 30 );
    

    Download the child theme and more details: https://docs.oceanwp.org/article/90-sample-child-theme.

    Otherwise, please explain your issue, including screenshots, other URLs, and any other document, so we can understand and check it better.

    I hope it helps.
    Best Regards

    Thread Starter MisterH

    (@hmarksthespot)

    Hello Shahin,

    That is almost correct, I want to keep the categories in the archives and single pages, But with the category on single pages, it shows the tags, I want only to remove Tags from the single product pages.

    That code goes in the functions.php correct?

    Thank you.

    Shahin

    (@skalanter)

    Hi @hmarksthespot,

    Thank you for reaching out,
    Yes, put the code in the function.php file of the child theme. Alternatively, you can use a snippet plugin and put the code in the function option.

    Best Regards

    Thread Starter MisterH

    (@hmarksthespot)

    Great, just to double check, this will hide the tags from single product pages, right?

    Another question, if tags are hidden will it affect SEO and such? And is there anyway to instead show product tags in a seperate tab or with a short code. Just curious on your thoughts.

    And thank you for maintaining a great support still.

    • This reply was modified 11 months ago by MisterH.
    Shahin

    (@skalanter)

    Hello @hmarksthespot,

    Thank you for reaching out,

    There is an option to remove the whole of the meta here: https://postimg.cc/0rDWMVv8 but not only for tags.

    * Depending on your adjustments, it could affect SEO. You can install an SEO plugin to help identify any errors or affected settings.

    To remove the tags, you have to modify the woocommerce/templates/single-product/meta.php file in the child theme.

    So, the solution to achieve it is customization, and it needs familiarity with PHP, if you are unfamiliar with PHP, you can contact a PHP expert. To do this, first, you need to use the child theme. You can copy the metafile from the partials folder in the child theme following the same path and then make the necessary changes.

    For more information about that, please follow the steps below:

    By using FTP or cPanel access (if didn’t use the localhost), Go to this directory:
    wp-content\themes\oceanwp\partials
    Find your template which you want to customize and copy that template file(in your case, for example, you need to change the date on the blog page, so you need to use the blog template(s): https://i.postimg.cc/brv9gn9s/image.png).

    Then head over to the same path on the child theme. There isn’t an entry folder as a default on your child theme, so you need to create a new one(one time).

    Example: If you want to change the HTML tags structure in the single blog post featured image for standard post format, all you need in this step is the following:

    1. Head over to your WP root > wp-content > themes > oceanwp > partials> single > media path.
    2. Then, find the “blog-single.php” file and copy this file.
    3. After that, go back to the themes folder (wp root > wp-content > themes) and go to the oceanwp-child-theme-master folder.
    4. Create a new folder with the “partials” name in the child theme.
    5. Go to the /partials/ folder and create a new folder with the “single” name.
    6. Go to the /single/ folder and create a new folder with the “media” name.
    7. Go to the /media/ folder and paste the “blog-single.php” file here.

    * Please check this screenshot: https://i.postimg.cc/sxjYTWyt/image.png.
    * Download child theme: https://docs.oceanwp.org/article/90-sample-child-theme.
    * Developer docs: https://docs.oceanwp.org/collection/19-developer-doc.

    Note: It’s working with the /woocommerce/ folder or root of the theme files.

    I hope it helps.
    Best Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Possible to display catagories only but no Tags’ is closed to new replies.