How to swap text in menu item back and forth?
How to swap text in menu item back and forth?
How to swap text in menu item back and forth?
Simply, echo get_the_title( $slide ); the_title(), or get_the_title() will not work here.
Try this it works for me. Place this code in your theme functions.php file. function dynamic_product_category_widget($title, $widet_instance, $widget_id) { if ( $widget_id !== ‘woocommerce_product_categories’ ) return $title; if ( is_product_category() ) { $cat_title = single_cat_title(‘<p class=”widget-title footer-widget”>’, ‘</p>’); return $cat_title; } elseif ( is_product() ) { $cat = get_the_terms( $product->ID, ‘product_cat’ ); foreach ($cat as … Read more
Widget title showing below widget
Include a page’s “category” in its URL
Want to add new label in new post
Turns out this was caused by the following custom theme filter in functions.php. Commenting out fixed the problem. function image_alt_tags($content) { global $post; preg_match_all(‘/<img (.*?)\/>/’, $content, $images); if (!is_null($images)) { foreach($images[1] as $index => $value) { if (!preg_match(‘/alt=/’, $value)) { $new_img = str_replace(‘<img’, ‘<img alt=”‘ . get_the_title() . ‘”‘, $images[0][$index]); $content = str_replace($images[0][$index], $new_img, $content); … Read more
For some reason this code has been added: <h1 class=”entry-title”><?php echo the_title(); ?></h1> the_title will display the current posts title, you should replace this with what you actually want. If you wanted to remove this completely with no replacement just delete this line. Also, this doesn’t appear to be a link at all, just a … Read more
Post title not displaying as recorded in the wp_posts table
You may use string comparison. I could illustrate a simple example code. It is assumed that the user with the following knowledge/experience PHP – understand what is variables, static value WordPress templates and how to modify them There are many ways to test string such as php string comparison strpos() (simple) php regular expression preg_match() … Read more