Avisos
Vaciar todo

Quitar "comprar por categorias" de la página de inicio

8 Respuestas
4 Usuarios
0 Reactions
32 Visitas
Jose
 Jose
Respuestas: 145
Estimable Member
Topic starter
 

Hola,
en la página de inicio aparece:
comprar por categoria, Novedades, Favoritos de los fans, etc.
Me gustaría poder gestionar ésto, quitando lo que no me interesen, pero no consigo encontar desde dónde hacerlo.
Saludos

URL del sitio: Contenido solo visible a usuarios registrados


 
Respondido : 14/12/2019 10:51 am
Bulmaro
Respuestas: 4380
Soporte CMS Webempresa
 

Hola José,

Agrega lo siguiente al fichero functions.php:

add_action( 'init', 'galussothemes_remove_homepage_product_categories' );
function galussothemes_remove_homepage_product_categories() {

    remove_action( 'homepage', 'storefront_product_categories', 20 );
     // Descomentando la línea de código correspondiente puedes eliminar cualquier sección
    // remove_action( 'homepage', 'storefront_homepage_content', 10 );
    // remove_action( 'homepage', 'storefront_product_categories', 20 );
    // remove_action( 'homepage', 'storefront_recent_products', 30 );
    // remove_action( 'homepage', 'storefront_featured_products', 40 );
    // remove_action( 'homepage', 'storefront_popular_products', 50 );
    // remove_action( 'homepage', 'storefront_on_sale_products', 60 );
    // remove_action( 'homepage', 'storefront_best_selling_products', 70 );
}

Espero que esto sirva para lo que buscas, de no ser así por favor indícalo para que podamos seguir ayudándote.

Saludos 🙂


 
Respondido : 14/12/2019 2:11 pm
Jose
 Jose
Respuestas: 145
Estimable Member
Topic starter
 

Gracias, lo que ocurre es que me salen muchos ficheros "functions.php" y no sé en cuál añadir el código.
Saludos

/public_html/textilcreativo.com/wp-admin/admin-functions.php
/public_html/textilcreativo.com/wp-admin/upgrade-functions.php
/public_html/textilcreativo.com/wp-includes/registration-functions.php
/public_html/textilcreativo.com/wp-includes/rss-functions.php
/public_html/textilcreativo.com/wp-includes/ms-functions.php
/public_html/textilcreativo.com/wp-includes/functions.php
/public_html/textilcreativo.com/wp-content/themes/twentyseventeen/functions.php
/public_html/textilcreativo.com/wp-content/themes/twentyseventeen/inc/template-functions.php
/public_html/textilcreativo.com/wp-content/themes/twentyseventeen/inc/icon-functions.php
/public_html/textilcreativo.com/wp-content/themes/storefront/functions.php
/public_html/textilcreativo.com/wp-content/themes/storefront/inc/storefront-functions.php
/public_html/textilcreativo.com/wp-content/themes/storefront/inc/storefront-template-functions.php
/public_html/textilcreativo.com/wp-content/themes/storefront/inc/woocommerce/storefront-woocommerce-functions.php
/public_html/textilcreativo.com/wp-content/themes/storefront/inc/woocommerce/storefront-woocommerce-template-functions.php
/public_html/textilcreativo.com/wp-content/themes/twentynineteen/functions.php
/public_html/textilcreativo.com/wp-content/themes/twentynineteen/inc/template-functions.php
/public_html/textilcreativo.com/wp-content/themes/twentynineteen/inc/icon-functions.php
/public_html/textilcreativo.com/wp-content/themes/twentytwenty/functions.php
/public_html/textilcreativo.com/wp-content/plugins/contact-form-7/admin/includes/admin-functions.php
/public_html/textilcreativo.com/wp-content/plugins/contact-form-7/includes/contact-form-functions.php
/public_html/textilcreativo.com/wp-content/plugins/contact-form-7/includes/functions.php
/public_html/textilcreativo.com/wp-content/plugins/all-in-one-wp-migration/functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-term-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-account-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-stock-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-rest-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-core-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-user-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-notice-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-cart-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-webhook-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-coupon-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-product-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-template-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-update-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-deprecated-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-conditional-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-formatting-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-page-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-order-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-order-item-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/wc-widget-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/admin/wc-meta-box-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/admin/wc-admin-functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/functions.php
/public_html/textilcreativo.com/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/deprecated/functions.php
/public_html/textilcreativo.com/wp-content/plugins/yith-woocommerce-catalog-mode/plugin-fw/yit-functions.php


 
Respondido : 18/12/2019 4:47 pm
Pepe
 Pepe
Respuestas: 41101
Illustrious Member Admin
 

Hola josé.

Tienes que añadirlo al final del archivo functions.php que encuentras dentro de la carpeta de tu plantilla en la siguiente ruta:

Contenido solo visible a usuarios registrados

Puedes utilizar el administrador de archivos de tu cuenta de cPanel paar acceder al archivo:
-> https://www.webempresa.com/blog/administrador-de-archivos-de-cpanel-como-buscar-archivos.html

Una vez localizado el archivo lo seleccionas con el botón de la derecha del ratón y pulsa en " Edit "

Al final del archivo añade lo que te indico mi compañero Bulmaro

Un saludo


 
Respondido : 18/12/2019 5:00 pm
Jose
 Jose
Respuestas: 145
Estimable Member
Topic starter
 

Hola, CATEGORÍA DE PRODUCTOS ha desaparecido, pero no FAVORITOS DE LOS FANS y LOS MAS VENDIDOS que también quiero quitar.
Saludos


 
Respondido : 18/12/2019 7:50 pm
Jhon
 Jhon
Respuestas: 44989
Soporte CMS Webempresa
 

Hola

Del código anterior descompenta las líneas que no quieres, los nombres son intuitivos, por ejemplo descomentando storefront_best_selling_products y storefront_popular_products, quedaría:

add_action( 'init', 'galussothemes_remove_homepage_product_categories' );
function galussothemes_remove_homepage_product_categories() {
    remove_action( 'homepage', 'storefront_product_categories', 20 );
    // remove_action( 'homepage', 'storefront_homepage_content', 10 );
    // remove_action( 'homepage', 'storefront_product_categories', 20 );
    // remove_action( 'homepage', 'storefront_recent_products', 30 );
    // remove_action( 'homepage', 'storefront_featured_products', 40 );
    remove_action( 'homepage', 'storefront_popular_products', 50 );
    // remove_action( 'homepage', 'storefront_on_sale_products', 60 );
     remove_action( 'homepage', 'storefront_best_selling_products', 70 );
}

 
Respondido : 18/12/2019 8:22 pm
Jose
 Jose
Respuestas: 145
Estimable Member
Topic starter
 

Perfecto, ahora sí, muchas gracias:)
Sólo me queda una duda y es si volverá a estar como al principio cuando se actualice la web.
Saludos


 
Respondido : 13/01/2020 11:13 am
Pepe
 Pepe
Respuestas: 41101
Illustrious Member Admin
 

Hola José.

Si, el archivo se sobre escribe en las actualizaciones.
Puedes crear un tema hijo y añadir las modificaciones en el archivo functions.php del tema hijo:

Tienes documentacion en esta entrada del Blog:
https://www.webempresa.com/blog/crear-temas-hijo-child-themes-en-wordpress.html

Un saludo


 
Respondido : 13/01/2020 11:38 am