ba95472
Forum Replies Created
-
Figured it out. In functions.php add
// Include custom header functions require_once get_stylesheet_directory() . ‘/inc/header-functions.php’;in header-functions.php add
<?php
// Ensure this file is included only once
if ( ! function_exists( ‘spacious_header_title’ ) ) :
/**
* Show the title in the header
*/
function spacious_header_title() {
if ( is_archive() ) {
if ( is_category() ) :
$spacious_header_title = single_cat_title( ”, false );elseif ( is_tag() ) : $spacious_header_title = single_tag_title( '', false ); elseif ( is_author() ) : the_post(); $spacious_header_title = sprintf( __( 'Author: %s', 'spacious' ), '<span class="vcard">' . get_the_author() . '</span>' ); rewind_posts(); elseif ( is_day() ) : $spacious_header_title = sprintf( __( 'Day: %s', 'spacious' ), '<span>' . get_the_date() . '</span>' ); elseif ( is_month() ) : $spacious_header_title = sprintf( __( 'Month: %s', 'spacious' ), '<span>' . get_the_date( 'F Y' ) . '</span>' ); elseif ( is_year() ) : $spacious_header_title = sprintf( __( 'Year: %s', 'spacious' ), '<span>' . get_the_date( 'Y' ) . '</span>' ); elseif ( is_tax( 'post_format', 'post-format-aside' ) ) : $spacious_header_title = __( 'Asides', 'spacious' ); elseif ( is_tax( 'post_format', 'post-format-image' ) ) : $spacious_header_title = __( 'Images', 'spacious' ); elseif ( is_tax( 'post_format', 'post-format-video' ) ) : $spacious_header_title = __( 'Videos', 'spacious' ); elseif ( is_tax( 'post_format', 'post-format-quote' ) ) : $spacious_header_title = __( 'Quotes', 'spacious' ); elseif ( is_tax( 'post_format', 'post-format-link' ) ) : $spacious_header_title = __( 'Links', 'spacious' ); elseif ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) : $spacious_header_title = woocommerce_page_title( false ); else : $spacious_header_title = __( 'Events', 'spacious' ); // Changed 'Archives' to 'Events' endif; } elseif ( is_404() ) { $spacious_header_title = __( 'Page NOT Found', 'spacious' ); } elseif ( is_search() ) { $spacious_header_title = __( 'Search Results', 'spacious' ); } elseif ( is_page() ) { $spacious_header_title = get_the_title(); } elseif ( is_single() ) { $spacious_header_title = get_the_title(); } elseif ( is_home() ) { $queried_id = get_option( 'page_for_posts' ); $spacious_header_title = get_the_title( $queried_id ); } else { $spacious_header_title = ''; } return $spacious_header_title; }
endif;
Found it!
inc/header-functions.php
changeelse :
$spacious_header_title = __( ‘Archives’, ‘spacious’ );endif;
to
else :
$spacious_header_title = __( ‘Events’, ‘spacious’ );endif;
Can you please tell me how to modify the child-theme to do this?
- This reply was modified 3 days, 6 hours ago by ba95472.
Thanks Tristan, unfortunately this doesn’t work for the Spacious theme by ThemeGrill. I meant to post your link to say I’d already tried that and it has no effect, Archives still shows. Something else is going on.
Thanks so much Mihai for looking into this, much appreciated!
Hi Mihai!
I’m referring to the Download Files section (below Download Details) in a product. The File Name has the spaces removed, which I’d actually like to keep. The same File Name is used in Name for the post, so I’d like to do a MySQL update to SET File_Name = Name if possible. Thanks again!
Hi Mihai! Yes the original link works fine, that’s what’s odd since doing just a display mod of the actual URL *shouldn’t* affect how the link works, but unfortunately that’s what is happening. Thanks again!
- This reply was modified 1 year ago by ba95472.
This looks right in the Purchase Receipt email and almost works but for some reason returns “Error 102: You do not have permission to download this file” even though the real URL *supposedly* is not altered? I’m stumped.
function add_custom_edd_email_file_urls_tag() {
// Register a new tag for file URLs with a custom function
edd_add_email_tag(
‘custom_file_urls’,
‘Displays file download URLs with a randomized shortened link’,
‘custom_edd_email_file_urls’
);
}
add_action(‘edd_add_email_tags’, ‘add_custom_edd_email_file_urls_tag’);function custom_edd_email_file_urls($payment_id) {
$downloads = edd_get_payment_meta_downloads($payment_id);
if ($downloads) {
$file_urls = ”;
foreach ($downloads as $download) {
// Get the actual download URL using EDD’s default method
$payment_data = edd_get_payment_meta($payment_id);
$download_url = edd_get_download_file_url($payment_data[‘key’], $payment_data[’email’], $download[‘id’], 0);// Display the link with a visual representation of a shortened URL $random_string = substr(str_shuffle(md5(time())), 0, 6); $display_link_text = 'https://exam.pl/' . $random_string; $file_urls .= 'Download Link: <a href="' . $download_url . '">' . $display_link_text . '</a><br><br>'; } return $file_urls; } else { return 'No downloadable files found.'; }
}
Figured it out, thanks!
Thanks very much Mihai! I’m a little unclear how to implement this or what files I need to modify (where/how in the child theme do I invoke this or check that it’s installed? In the theme functions.php file or in the plugin folder? The docs say:
If you want to see if a tag exists then you can do something like this: if ( edd_email_tag_exists( ‘name’ ) ) { echo “Yep!”; }
edd_email_tag_exists() returns boolean.
Thanks again!
Forum: Themes and Templates
In reply to: [Spacious] Change \2261 in mobile to Font AwesomeThanks so much Frank, works!
https://prnt.sc/tHWIL4U3GJBNForum: Themes and Templates
In reply to: [Spacious] Change \2261 in mobile to Font AwesomeThanks Frank! Unfortunately, this seems to have no effect. I use the default version and not the “new responsive menu” because I like having the word Menu since the fa-bars are so small and since there are still people that don’t recognize the hamburger icon as the navigation.
Ideally I’d like the bars to be as large as the “M” in Menu
- This reply was modified 1 year, 1 month ago by ba95472.
- This reply was modified 1 year, 1 month ago by ba95472.
- This reply was modified 1 year, 1 month ago by ba95472.
- This reply was modified 1 year, 1 month ago by ba95472.
- This reply was modified 1 year, 1 month ago by ba95472.
- This reply was modified 1 year, 1 month ago by ba95472.
Forum: Themes and Templates
In reply to: [Spacious] Change \2261 in mobile to Font AwesomeHere’s a screenshot https://prnt.sc/5vK1ORVs9HmA
Forum: Themes and Templates
In reply to: [Spacious] Change \2261 in mobile to Font AwesomeThanks Barsha for the reply! I use the free version of Spacious and the hamburger icon is very small left of the word Menu in mobile, almost irrelevant, and does not look like the screenshot you posted. Your screenshot is the size I’d like to see! If it’s just a matter of changing the CSS, great! That’s all I need, please just let me know what to change. Thanks again Barsha!
- This reply was modified 1 year, 1 month ago by ba95472.
Forum: Plugins
In reply to: [The Events Calendar] Change Widget Link ColorLooks like I may have spoken too soon, sorry! On the events page, the button border and text still show purple. Other than that, works great.