Include/Exclude Context toggle button in "Archive Title" module don't work as expected in search templates
Hi! The toggle button for include/exclude "context" in the archive title module when using a condition for search templates in Theme Builder seems to be unset.
The problem seems to be inside the class Utils in file elementor-pro/classes/utils.php The if statement for is_search() inside the method: public static function get_page_title( $include_context = true ) missing an if statement for: if ( $include_context ){....}
having the issue even on Page, Post, Archives, or WooCommerce Product. The checkbox doesn't hide the context
having the issue even on Page, Post, Archives, or WooCommerce Product. The checkbox doesn't hide the context
Also having this issue on Elementor v3.0.16 and Elementor Pro v3.0.9
Still having this issue, Elementor v3.1.1 and Elementor Pro v3.0.9
Toggling "Include Context" to "Off" has no effect, full archive and search context is displayed.
Still existing bug
Come one Elementor! FIX THESE TINY ISSUES WHICH MAKE YOUR CUSTOMERS LIVES A PAIN IN THE ASS!!!!!
Still a bug in April 2021!
No doubt we'll get gradient buttons before this is fixed 👎
Still having this issue, Elementor v3.2.1 and Elementor Pro v3.2.1 Toggling "Include Context" to "Off" has no effect, full archive and search context is displayed.
My temporary solution, use a custom shortcode in the title.
/**
* Custom title for Archives without prefix.
*/
add_shortcode('cm_single_term_title', 'fn_cm_single_term_title');
function fn_cm_single_term_title()
{
if (is_category()) {
$title = single_cat_title('', false);
} elseif (is_tag()) {
$title = single_tag_title('', false);
} elseif (is_author()) {
$title = '<span class="vcard">' . get_the_author() . '</span>';
} elseif (is_year()) {
$title = get_the_date(_x('Y', 'yearly archives date format'));
} elseif (is_month()) {
$title = get_the_date(_x('F Y', 'monthly archives date format'));
} elseif (is_day()) {
$title = get_the_date(_x('F j, Y', 'daily archives date format'));
} elseif (is_tax()) { //for custom post types
$title = sprintf(__('%1$s'), single_term_title('', false));
} elseif (is_post_type_archive()) {
$title = post_type_archive_title('', false);
} else {
$title = get_the_archive_title();
}
return $title;
}
Aug 2021, Elementor Pro Versión 3.3.5, The same problem!
Hilarious.
It's September 2021 and still not fixed...
+1 - Will this take as long as clickable columns ?
Still a problem in 3.5.0. Please fix! I now use this quick fix to change/remove the text:
add_filter( 'elementor/utils/get_the_archive_title','archive_callback' );
function archive_callback( $title ) {
if ( is_search() ) {
return '' . get_search_query() ;
}
return $title;
}
My temporary solution, use a custom shortcode in the title.
/** * Custom title for Archives without prefix. */ add_shortcode('cm_single_term_title', 'fn_cm_single_term_title'); function fn_cm_single_term_title() { if (is_category()) { $title = single_cat_title('', false); } elseif (is_tag()) { $title = single_tag_title('', false); } elseif (is_author()) { $title = '<span class="vcard">' . get_the_author() . '</span>'; } elseif (is_year()) { $title = get_the_date(_x('Y', 'yearly archives date format')); } elseif (is_month()) { $title = get_the_date(_x('F Y', 'monthly archives date format')); } elseif (is_day()) { $title = get_the_date(_x('F j, Y', 'daily archives date format')); } elseif (is_tax()) { //for custom post types $title = sprintf(__('%1$s'), single_term_title('', false)); } elseif (is_post_type_archive()) { $title = post_type_archive_title('', false); } else { $title = get_the_archive_title(); } return $title; }
Thanks!!! It works for me!
Hello
Still having issues Elementor pro 3.7.2
/**
* Custom title for Archives without prefix.
*/
add_shortcode('cm_single_term_title', 'fn_cm_single_term_title');
function fn_cm_single_term_title()
{
if (is_category()) {
$title = single_cat_title('', false);
} elseif (is_tag()) {
$title = single_tag_title('', false);
} elseif (is_author()) {
$title = '<span class="vcard">' . get_the_author() . '</span>';
} elseif (is_year()) {
$title = get_the_date(_x('Y', 'yearly archives date format'));
} elseif (is_month()) {
$title = get_the_date(_x('F Y', 'monthly archives date format'));
} elseif (is_day()) {
$title = get_the_date(_x('F j, Y', 'daily archives date format'));
} elseif (is_tax()) { //for custom post types
$title = sprintf(__('%1$s'), single_term_title('', false));
} elseif (is_post_type_archive()) {
$title = post_type_archive_title('', false);
} else {
$title = get_the_archive_title();
}
return $title;
}
I copy paste this code in function.php`and then added a new shortcode widget called [cm_single_term_title] in my search result template page but it only display the word "Archive" on the reslut page.
Maybe i missed something ?
Hello
Still having issues Elementor pro 3.7.2
/** * Custom title for Archives without prefix. */ add_shortcode('cm_single_term_title', 'fn_cm_single_term_title'); function fn_cm_single_term_title() { if (is_category()) { $title = single_cat_title('', false); } elseif (is_tag()) { $title = single_tag_title('', false); } elseif (is_author()) { $title = '<span class="vcard">' . get_the_author() . '</span>'; } elseif (is_year()) { $title = get_the_date(_x('Y', 'yearly archives date format')); } elseif (is_month()) { $title = get_the_date(_x('F Y', 'monthly archives date format')); } elseif (is_day()) { $title = get_the_date(_x('F j, Y', 'daily archives date format')); } elseif (is_tax()) { //for custom post types $title = sprintf(__('%1$s'), single_term_title('', false)); } elseif (is_post_type_archive()) { $title = post_type_archive_title('', false); } else { $title = get_the_archive_title(); } return $title; }I copy paste this code in function.php`and then added a new shortcode widget called [cm_single_term_title] in my search result template page but it only display the word "Archive" on the reslut page.
Maybe i missed something ?
Hello,
This code was made for use in archives only.
Same problem here too, this worked for me.
Still a problem in 3.5.0. Please fix! I now use this quick fix to change/remove the text:
add_filter( 'elementor/utils/get_the_archive_title','archive_callback' ); function archive_callback( $title ) { if ( is_search() ) { return '' . get_search_query() ; } return $title; }
Still a problem in 3.9.1.
Almost THREE !! years after the initial bug report.
@nicholaszein

The issue still occurred in 3.12.2
of course it is still a bug, it's only 3 years old.
🎂🎂🎂
Some things deserve to be celebrated :p
Still... not... working...