Home › Forums › Support › How to Customise archive.php file from inc/structure folder in parent theme?
- This topic has 7 replies, 3 voices, and was last updated 3 years, 4 months ago by
David.
-
AuthorPosts
-
September 19, 2019 at 6:00 am #1013456
Sandeep
Hello,
I want to customise archive.php file from inc/structure folder for that, I have created same sub folders in my child theme and added archive.php file from Generate Press Parent theme.
But, It is not working. Can you help me with this?
Thanks
September 19, 2019 at 9:29 am #1013753Leo
StaffCustomer SupportHi there,
I think you can just copy and paste that file in the child theme’s folder without creating the same sub folders.
Can you give that a shot?
If not are you getting any specific errors?
Let me know ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 19, 2019 at 1:31 pm #1013970Sandeep
Hi Leo,
I have added archives.php file from Generate Press parent theme to my generate-press child theme in that theme folder. But, Still changes make on archives.php is not overriding to archives.php in parent theme.
September 19, 2019 at 4:53 pm #1014038Leo
StaffCustomer SupportWhat changes are you making?
I can’t see the site without login and password but make sure to clear all caching plugins and server cache if you are using any.
Let me know ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 19, 2019 at 9:46 pm #1014138Sandeep
yes, you can see site by demo/demo123 user and password.
We want to change in archive title in Parent theme/inc/structure/archives.php
We have also tried by clear all cache.
Can you please check?
September 20, 2019 at 3:13 am #1014263David
StaffCustomer SupportHi there,
can you explain a little more of the changes you want to make, it may be possible without the need for a child theme template.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 22, 2019 at 12:32 am #1015684Sandeep
Hello,
1. I want to make changes inside the below file.
\themes\generatepress\inc\structure\archives.phpIn the above file, I want to remove do_action( ‘generate_before_archive_title’ ); hook to hide Archives of title from Arhives.php page.
2. Is there any way to change in layout of Generate press theme by adding those files in a generate-child theme?
Thanks
September 22, 2019 at 4:42 am #1015770David
StaffCustomer SupportYou can make a copy of the archives.php – starting from the
function_exists
condition and place it in you child theme directories.If you just want to remove the Archive Title then you can use this function:
add_action( 'after_setup_theme', function() { remove_action( 'generate_archive_title', 'generate_archive_title' ); } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.