- This topic has 10 replies, 2 voices, and was last updated 4 years, 2 months ago by
Ying.
-
AuthorPosts
-
January 4, 2022 at 2:25 pm #2069307
johnaps
Hello!
i would like to position my page title on the start of the left sidebar and not on the start of the masonry-container.
this will give you a picture
https://ibb.co/2qVjZjgwhatever css i came up with was faulty…
Have you stumbled on this before? If so can you please help me out, with the correct way to do this?
If css isnt the best option, is there a way to output the
<header class="page-header" aria-label="Page">
outside and before the<div class="site-content" id="content">?January 4, 2022 at 2:36 pm #2069312Ying
StaffCustomer SupportHi John,
Try this PHP snippet:
add_action( 'after_setup_theme', function() { remove_action( 'generate_archive_title', 'generate_archive_title' ); } ); add_action ('generate_inside_site_container', 'generate_archive_title');January 5, 2022 at 3:42 am #2069733johnaps
Thank you very much!!!
January 5, 2022 at 5:53 pm #2070566Ying
StaffCustomer SupportNo problem 🙂
January 6, 2022 at 6:45 am #2071056johnaps
Hello again!
I think there are some further issues i need help with the above solution!
In my search results pages the page-header is added 2 times
https://thefinterest.kinsta.cloud/?s=jIn the new position set and in the old one.
Also the new header in search results page is showing “Archives” instead of “Search Results”.
And lastly in my homepage a new header appeared with the name “archives”, which wasnt there before and isnt necessary i believe.
https://thefinterest.kinsta.cloud/Can you help me fix this?
January 6, 2022 at 2:13 pm #2071682johnaps
Also in my posts the header appears a second time before content and i dont want it…
https://thefinterest.kinsta.cloud/p/uncategorized/asjalska/January 6, 2022 at 5:01 pm #2071823Ying
StaffCustomer SupportI see, try this one so that the archive title will only be removed and re-added to the archive pages:
add_action( 'after_setup_theme', function() { remove_action( 'generate_archive_title', 'generate_archive_title' ); } ); add_action ('wp', function() { if ( is_archive() ) { add_action ('generate_inside_site_container', 'generate_archive_title'); } } );January 7, 2022 at 4:26 am #2072216johnaps
it is almost perfect!
i want to apply that in search results pages also
example: https://thefinterest.kinsta.cloud/?s=dfi want the header above
site-contentin search results as wellJanuary 7, 2022 at 6:31 pm #2072939Ying
StaffCustomer SupportHmm give David’s solution here a shot:
https://generatepress.com/forums/topic/page-header-on-search-page/#post-1056795January 8, 2022 at 3:34 am #2073158johnaps
okay thank you, that worked, but i added it as a hook not a header!! 🙂
January 8, 2022 at 11:30 am #2073609Ying
StaffCustomer SupportGlad it worked 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.