- This topic has 30 replies, 6 voices, and was last updated 6 years ago by Tom.
-
AuthorPosts
-
April 7, 2016 at 12:41 am #184871celito
Hello, I am using GeneratePress Premium and have a page listing LearnDash courses. The list is automatically generated by LearnDash using WordPress archives template. I just need to change “Archives” to “Course List.” Is there a simple way to do this? I don’t know how I’d do this.I thought I could just open archives.php and edit the heading there directly. Please pardon this total newbie. Thanks.
April 7, 2016 at 10:30 am #185085TomLead DeveloperLead DeveloperHi there,
You can overwrite the archive title function with this PHP: https://gist.github.com/generatepress/b4b6642ac3b447c87a0440a59e1fdefb
You want to change the word on line 59.
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Let me know if you need more info π
April 7, 2016 at 6:13 pm #185165celitoThank you so much. This was very helpful and educational.
April 7, 2016 at 9:26 pm #185204TomLead DeveloperLead DeveloperYou’re very welcome π
September 5, 2016 at 9:29 am #224003n52Hi!
After installing Toolset plugin for custom taxonomies I see “Archive” title on my custom categories.
I ve created archive-My_Posttype by editing archive.php and cuting “<?php do_action( ‘generate_archive_title’ ); ?>”. As I understand it cuts not only H1 ARCHIVE π and for My_posttype it doesn’t matter.
BUT!
It s matter for MY_TAXONOMIES archives.
What I have done yet to change “Archive” title:
1. read plugin info “Two solutions are possible. One may be an admin theme option to turn off titles on these kind of pages. Second, would require editing the theme archive.php file and remove the code that prints that title.
Just be sure that you include your new title from Views inside an H1 tag, to get the best SEO results.”
but I have not found this “switcher”
than I have sought answer here to remove this part of code here.
2. https://generatepress.com/forums/topic/custom-page-titles-for-categories/
I ve installed Pluginception (https://generatepress.com/knowledgebase/adding-php-functions/) and puted Tom’s code to my new plugin. no changes.
than I ve pasted code from https://gist.github.com/generatepress/b4b6642ac3b447c87a0440a59e1fdefb – no changes. from https://gist.github.com/generatepress/fe5309693719d138dbcf84381eb9a6b3 – no changes.
3. Hide it in css by ((post-type-archive-testimonial page-header ( display: none;))) – no changes.
—-
I need to cut “Archive” h1 and replace it with my H1 from editor.
—-
As I understand… I may create taxonomy.php and rewrite code but i don’t know php π
What I need to do?September 5, 2016 at 10:34 pm #224127TomLead DeveloperLead DeveloperHi there,
So removing the generate_archive_title hook doesn’t remove the H1?
September 5, 2016 at 10:55 pm #224139n52It removes H1 and it removes all of the code from editor.
September 6, 2016 at 8:58 am #224276TomLead DeveloperLead DeveloperRemoves all of which code? It should only remove the H1, as that’s the only thing hooked into that hook.
September 6, 2016 at 9:36 am #224297n52I don’t know how to explain it.
All code from description.
http://dropmefiles.com/SEEcR
1. In my custom taxonomy it is “Archive”
2. The description code
There are no more changesSeptember 6, 2016 at 11:01 pm #224548TomLead DeveloperLead DeveloperYou’ll either have to:
a) Remove the hook from your specific custom post type archive.php file, and add your own title.
or
b) Overwrite the archive title function to include a conditional check for your custom post type: https://gist.github.com/generatepress/fe5309693719d138dbcf84381eb9a6b3
September 6, 2016 at 11:35 pm #224558n52As I wrote – No changes.
2. https://generatepress.com/forums/topic/custom-page-titles-for-categories/
I ve installed Pluginception (https://generatepress.com/knowledgebase/adding-php-functions/) and puted Tomβs code to my new plugin. no changes.
than I ve pasted code from https://gist.github.com/generatepress/b4b6642ac3b447c87a0440a59e1fdefb β no changes. from https://gist.github.com/generatepress/fe5309693719d138dbcf84381eb9a6b3 β no changes.September 7, 2016 at 9:22 am #224680TomLead DeveloperLead DeveloperAdding just this code won’t change anything: https://gist.github.com/generatepress/b4b6642ac3b447c87a0440a59e1fdefb
You need to alter the function to include the conditional for your custom post type and your custom title.
September 7, 2016 at 9:51 am #224701n52Please write how to do it. 😩
September 7, 2016 at 9:53 am #224705TomLead DeveloperLead DeveloperThat’s a bit out of the scope of support here, but if I find a minute today to do it I will π
September 7, 2016 at 10:11 am #224712n52Would be very nice of you. 😔
-
AuthorPosts
- You must be logged in to reply to this topic.