Archived topic
Site logo not loading on smaller screens
9 replies · Started by Althaf on April 25, 2021
Hi there!
I am using GP Premium 2.0.0-rc.3 on my website.
On my website site logo not loading on smaller screens while it works perfectly on bigger screen (desktop screen)
I tried to clearing the cache and deactivating the caching plugin but didn't solve the issue. But, when I I disabled the GP Premium plugin, the logo loaded perfectly. When I activated GP Premium again, logo is not loading on the smaller screens.
Hi there,
I've checked the site and the logo assigned to the mobile header doesn't seem to be valid. Did you move this installation? Or perhaps a copy? Or maybe it's using a plugin?
The working logo has this URL.
https://cdn-60581734c1ac180....... /xx.png
The one assigned for the mobile header has this.
https://app-60080014c1ac180....... /xx.png
Solved it.
There was no Logo assigned under Layout > Header in theme customizer.
Thank you!
Nice one. Glad you got it sorted. :D
I have one more question which is not related to this topic.
Is it possible to show only one category term for the 'List of terms dynamic text'?
What I mean is, when we use the 'List of terms' dynamic text, it displays all the categories or tags which is assigned to a post and it looks very bad when I try to build a content template.
Instead, is it possible to show only one category or tag for the 'List of terms' dynamic text?
It's possible but how would you like to determine which one to display?
Normally, users who previously asked for something similar had something to determine some sort of a primary category.
Example:
https://generatepress.com/forums/topic/showing-only-one-primary-category/
While the code provided here was for a shortcode, the same principle applies for filtering the current way GP lists its categories.
It should be primary category in my case as well.
I am using Yoast SEO plugin. So, what code I have to use?
Hi there,
not sure on this but try this PHP Snippet to generate the shortcode for the Yoast Primary Category:
add_shortcode( 'primary-category', function() {
$cat = false;
$primary_cat_id = get_post_meta( get_the_ID(), '_yoast_wpseo_primary_category', true );
if ( $primary_cat_id ) {
$cat = get_term( $primary_cat_id, 'category' );
$cat_link = get_term_link( $cat, 'category' );
}
if ( ! is_wp_error( $cat ) ) {
return '<span class="primary-category"><a href="' . $cat_link . '">' . $cat->name . '</a></span>';
}
} );
Worked it!
Thank you!
Glad to hear that!