Link to products with the same image title (woocommerce)
Link to products with the same image title (woocommerce)
Link to products with the same image title (woocommerce)
Ok, I found a solution. I’ve found the filter excerpt_more that is used to show the string shown within the more link (if theme use standard WP functions). So, to achieve this, we need to hook the excerpt_more and use a lower priority of the one used by the theme. In my example, this add_filter(‘the_title’, … Read more
add_filter( ‘the_title’ gets through this if statement twice
Hook into the post status transitions and copy the post title to your secondary field. See documentation: https://codex.wordpress.org/Post_Status_Transitions#transition_post_status_Hook
Here’s an untested edit of your code to use the post’s first category in the count: add_action(‘the_title’, ‘dk_auto_numbering’); function dk_auto_numbering($title) { $post_ID = get_the_ID(); $the_post = get_post($post_ID); $date = $the_post->post_date; $maintitle = $the_post->post_title; if ($maintitle == $title && $the_post->post_status == ‘publish’ && $the_post->post_type == ‘post’ && in_the_loop()) { $categories = get_the_category($post_ID); if (is_array($categories) && count($categories) … Read more
How about extending the if statement to include the pages you require? Your code would look something like this: <?php if( is_front_page() ) { ?> <div class=”bloc-header-home”> <span class=”decouvrez”>Découvrez</span> <h1>La chasse en licence</h1> <span class=”avantages”>La chasse est partie prenante de la gestion durable des forêts, car elle contribue à la conservation des écosystèmes forestiers et … Read more
You should create a child theme and then edit the file where you want the dynamic text to appear. So if you want to show the text on single blog pages, you’ll simply use the single.php file in your child theme. More on WordPress child themes here: https://developer.wordpress.org/themes/advanced-topics/child-themes/
If your template is using the_title you can override it by adding this filter to your function add_filter( ‘the_title’, ‘change_my_property_title’ );
how to replace h1 entry title with h2 in category pages only
You can use the get_the_archive_title filter, such as: add_filter(‘get_the_archive_title’, function($title) { if(is_tag()) { /* logic to set $title to what you want */ } return $title; }); Take a look at get_the_archive_title() reference for more information on how to use this filter.