i’m having trouble setting my taxonomy term as a variable and truncating it for use in autocomplete.php via any method. has anyone ever done this before ? i was able to output the taxonomy variable, just cant shorten it now
]]>Can someone tell me how to purge/truncate the contents of the iqblock_debug_logging table <span style=”text-decoration: underline;”>without corrupting the rest of the Database</span>??
This table currently has over 800,000 rows and is taking up 128MB of space.
If I am viewing the iqblock_debug_logging table via phpMyAdmin, and click on the ‘Operations’ tab (from the top menu area), there is an option at the bottom of the page to either ‘Empty the table (TRUNCATE)’ or ‘Delete the table (DROP)’. Are either of these options what I should be doing?
Alternately, the only other thing I can think of to do, is to backup the current settings, then uninstall the IQ Block Country WP Plugin, then reinstall, and then re-import the old settings.
Or is there some easier/better way to clear the space being used, so that my Database is not so big – without corrupting the Database!
AND – is there a way to turn off the debug logging so it doesn’t continue to grow?
Thanks,
SunnyOz
]]>function sku_product__title($title, $id) {
global $pagenow;
if ( $pagenow != 'edit.php' && get_post_type( $id ) == 'product' ) {
if(preg_match('/[^(C375|C377|C378|C379|C380|C381|C382|C383|C385|C386|C387|C388|C389|C390|C434|C435|C436|C437|C438|C439|C440|C441|C442|C443|C444|C445|C446|C447|C448|C449|C450|C451|C461|C462|C463|C464|C465|C466|C467|C468|C469|C470|C471|C472|C473|C474|C475|C476|C477|C478|C480|C481|C482|C483|C484|C485|C486|C487|C488|C489|C490|C491|C492|C493|C494|C495|C496|C497|C498|C500|C501|C502|C504|C505|C507|C509|C510|C511|C512|C513|C514|C515|C517|C518|C520|C521|C522|C525|C528|C529|C530|C531|C532|C533|C534|C535|C536|C538|C539|C540|C542|C543|C545|C546|and so on)]*/', $title, $matches)){
return trim($matches[0]);
}else{
return $title;
}
}
return $title;
}
add_filter('the_title', 'sku_product__title', 10, 2);
But it removes every word with matching letters that is not what I looking for. What to change in this code to remove only SKU as a whole and leave clean title?
]]>my Theme is automatically displaying all posts with a truncated (40 words) excerpt on the homepage. The Posts are all translated, but the excerpt is not.
How can i fix this?
A workaround i found is to manually translate the excerpt, but would love to have an automatic solution, because it’s very time intensive and error prone.
]]>add_filter( 'the_title', 'shorten_woo_product_title', 10, 2 );
function shorten_woo_product_title( $title, $id ) {
if ( get_post_type( $id ) === 'product' ) {
return wp_trim_words( $title, 4 ); // change last number to the number of WORDS you want
} else {
return $title;
}
}
How can I correct this?
Thank you
]]>https://www.bioenergetics.org.uk/course-reviews/
I need to truncate some of the text blocks but for some reason the Truncation/Read More tab doesn’t seem to work.
Can anyone help me?
]]>