{"id":169852,"date":"2023-12-15T15:14:55","date_gmt":"2023-12-15T09:44:55","guid":{"rendered":"https:\/\/git-staging.wpastra.com\/?post_type=docs&#038;p=169852"},"modified":"2023-12-15T15:16:10","modified_gmt":"2023-12-15T09:46:10","slug":"limit-woocommerce-product-titles","status":"publish","type":"docs","link":"https:\/\/git-staging.wpastra.com\/es\/docs\/limit-woocommerce-product-titles\/","title":{"rendered":"C\u00f3mo limitar los t\u00edtulos de productos de WooCommerce"},"content":{"rendered":"<p>Si los t\u00edtulos de tus productos son demasiado largos y desordenados en tu sitio web, puedes acortarlos con un simple fragmento de c\u00f3digo. Esto puede ser especialmente \u00fatil para mantener un dise\u00f1o de cuadr\u00edcula de productos limpio y conciso.<\/p>\n\n\n\n<p>En este documento, le guiaremos a trav\u00e9s del proceso de c\u00f3mo limitar los t\u00edtulos de los productos de WooCommerce.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-169852-_nvj9gpepkcme\"><\/a><strong>C\u00f3mo limitar los t\u00edtulos de productos de WooCommerce<\/strong><\/h3>\n\n\n\n<p>Antes de empezar, aseg\u00farate de que tienes acceso al panel de administraci\u00f3n de WordPress. A continuaci\u00f3n, puedes seguir la gu\u00eda paso a paso adjunta para limitar los t\u00edtulos de productos de WooCommerce.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Inicie sesi\u00f3n en el panel de administraci\u00f3n de WordPress.<\/li>\n\n\n\n<li>Vaya a \"Apariencia\" y haga clic en \"Editor de temas\".<\/li>\n\n\n\n<li>En la parte derecha, ver\u00e1s una lista de archivos del tema. Busca el archivo functions.php de tu Astra Child Theme. Deber\u00eda estar ubicado en el directorio del tema.<\/li>\n\n\n\n<li>Haga clic en el archivo \"functions.php\" para abrirlo y editarlo.<\/li>\n\n\n\n<li>Una vez que tenga abierto el archivo functions.php, puede a\u00f1adir el siguiente fragmento de c\u00f3digo al final del archivo.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\" data-no-auto-translation=\"\"><code>\/\/ Limit WooCommerce product titles\u200b\u200b\r\nfunction astra_limit_woocommerce_product_title($title, $id = null) {\r\n    $limit = 40; \/\/ Set the character limit you prefer\r\n    if (strlen($title) > $limit) {\r\n        $title = substr($title, 0, $limit) . '...';\r\n    }\r\n    return $title;\r\n}\r\nadd_filter('the_title', 'astra_limit_woocommerce_product_title', 10, 2);\r<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Despu\u00e9s de a\u00f1adir el fragmento de c\u00f3digo, aseg\u00farese de guardar los cambios. Para ello, haga clic en el bot\u00f3n \"Actualizar archivo\" situado en la parte inferior de la ventana de edici\u00f3n.<\/li>\n<\/ul>\n\n\n\n<p>Puede personalizar el l\u00edmite de caracteres modificando la variable `$limit` dentro del c\u00f3digo. Simplemente cambia el n\u00famero en la l\u00ednea `$limit = 40;` por el n\u00famero de caracteres que prefieras.<\/p>\n\n\n\n<p>Despu\u00e9s de a\u00f1adir el fragmento de c\u00f3digo, visite las p\u00e1ginas de producto de WooCommerce para ver los t\u00edtulos de producto modificados con el l\u00edmite de caracteres en vigor.<\/p>\n\n\n\n<p>Espero que este documento te haya ayudado a entender c\u00f3mo limitar los T\u00edtulos de Producto de WooCommerce. Si necesitas ayuda, estamos a un mensaje de distancia.<\/p>","protected":false},"excerpt":{"rendered":"<p>Si los t\u00edtulos de los productos de tu sitio web son demasiado largos y desordenados, puedes acortarlos con un simple fragmento de c\u00f3digo. Esto puede ser particularmente \u00fatil para mantener un dise\u00f1o de cuadr\u00edcula de producto limpio y conciso. En este documento, te guiaremos a trav\u00e9s del proceso de c\u00f3mo limitar los t\u00edtulos de los productos de WooCommerce. C\u00f3mo [...]<\/p>","protected":false},"author":89,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"docs_category":[2112],"docs_tag":[],"class_list":{"0":"post-169852","1":"docs","2":"type-docs","3":"status-publish","5":"docs_category-woocommerce-filters"},"spectra_custom_meta":{"_edit_lock":["1702640330:89"],"rank_math_internal_links_processed":["1"],"rank_math_primary_docs_category":["2112"],"rank_math_seo_score":["10"],"_uag_custom_page_level_css":[""],"ast-site-content-layout":["default"],"theme-transparent-header-meta":[""],"adv-header-id-meta":[""],"stick-header-meta":[""],"astra-migrate-meta-layouts":["set"],"_edit_last":["89"],"tap_disable_autolinker":["no"],"tap_autolink_inside_heading":["global"],"tap_autolink_random_placement":["global"],"tap_post_autolinker_limit":["0"],"_wp_old_slug":["169852"],"pfd_related_docs":[""],"views":["9127"],"helpful":["4"],"unhelpful":["4"],"redirects":["3"],"_trp_automatically_translated_slug_es_ES":["limitar-los-titulos-de-los-productos-woocommerce"],"_uag_page_assets":["a:9:{s:3:\"css\";s:2495:\".wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape-top svg{width: calc( 100% + 1.3px );}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape.uagb-container__shape-top .uagb-container__shape-fill{fill: rgba(51,51,51,1);}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape-bottom svg{width: calc( 100% + 1.3px );}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape.uagb-container__shape-bottom .uagb-container__shape-fill{fill: rgba(51,51,51,1);}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__video-wrap video{opacity: 1;}.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{max-width: 100%;width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 1200px);max-width: var(--inner-content-custom-width);width: 100%;flex-direction: column;align-items: center;justify-content: center;flex-wrap: nowrap;row-gap: 0px;column-gap: 0px;}.wp-block-uagb-container.uagb-block-debf2792{box-shadow: 0px 0px   #00000070 ;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;overflow: visible;border-color: inherit;row-gap: 0px;column-gap: 0px;}@media only screen and (max-width: 976px) {.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 1024px);max-width: var(--inner-content-custom-width);width: 100%;}.wp-block-uagb-container.uagb-block-debf2792{padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;}}@media only screen and (max-width: 767px) {.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{max-width: 100%;width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 767px);max-width: var(--inner-content-custom-width);width: 100%;flex-wrap: wrap;}.wp-block-uagb-container.uagb-block-debf2792{padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;}}\";s:2:\"js\";s:0:\"\";s:18:\"current_block_list\";a:7:{i:0;s:14:\"core\/paragraph\";i:1;s:12:\"core\/heading\";i:2;s:9:\"core\/list\";i:3;s:14:\"core\/list-item\";i:4;s:9:\"core\/code\";i:5;s:14:\"uagb\/container\";i:6;s:14:\"core\/shortcode\";}s:8:\"uag_flag\";b:1;s:11:\"uag_version\";s:10:\"1776572732\";s:6:\"gfonts\";a:0:{}s:10:\"gfonts_url\";s:0:\"\";s:12:\"gfonts_files\";a:0:{}s:14:\"uag_faq_layout\";b:0;}"]},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false},"uagb_author_info":{"display_name":"mounikak","author_link":"https:\/\/git-staging.wpastra.com\/es\/author\/mounikak\/"},"uagb_comment_info":0,"uagb_excerpt":"If your product titles are getting too long and messy on your website, you can make them shorter with a simple snippet of code. This can be particularly useful for maintaining a clean and concise product grid layout. In this document, we\u2019ll guide you through the process of how to limit WooCommerce product titles. How&hellip;","_links":{"self":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/169852"}],"collection":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/users\/89"}],"replies":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/comments?post=169852"}],"version-history":[{"count":0,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/169852\/revisions"}],"wp:attachment":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/media?parent=169852"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_category?post=169852"},{"taxonomy":"docs_tag","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_tag?post=169852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}