- This topic has 30 replies, 6 voices, and was last updated 4 years, 10 months ago by
Tom.
-
AuthorPosts
-
September 12, 2016 at 6:24 am #225783
celito
Hi, I’m sorry to bother you again. I had Word Press re-installed and re-installed the GP theme, GP premium and all other plugins. I again retraced the steps in this previous thread to change the Archives title. While I got it in the first attempt the last time, I can’t get it to work this time. When I update the plugin created with Pluginception attaching the php script from github, this error message pops up:
Oops! That page canβt be found.
It looks like nothing was found at this location. Maybe try searching?The script can’t be saved. I tried Simple PHP but same result. What am I doing wrong? Thanks.
Celito
September 12, 2016 at 7:26 am #225809Lyle
Thought that I would jump in to say that another way to change any string in a theme, plugin or even WordPress core is to use the Loco Translate plugin. If you save the generated .po, .mo and .pot files to the /languages folder and not the /loco folder, you can deactivate and delete the plugin when you are finished and your changes will remain intact. I have used this on a couple sites and it is really quite slick and does not require getting one’s “hands dirty” with PHP π
https://wordpress.org/plugins/loco-translate/
Cheers!
Lylehttp://snifflevalve.com
Tutorials and tips for GeneratePress, WP Show Posts, WordPress and ElementorSeptember 12, 2016 at 8:54 am #225843Tom
Lead DeveloperLead DeveloperAnother option is this plugin: https://en-ca.wordpress.org/plugins/say-what/
It sounds like you have something weird going on with your installation, as saving a file shouldn’t cause a 404 error. Have you checked with your hosting support?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 12, 2016 at 9:44 am #225855celito
Thanks. I’ll check out this plugin and also refer this issue to the hosting site.
Celito
September 12, 2016 at 9:46 am #225857celito
Thanks Lyle. I’ll also try this out.
September 13, 2016 at 3:27 am #226030n52
Hi
Tom, may you write what I have to do step by step to change Title?. please…You need to alter the function to include the conditional for your custom post type and your custom title.
September 14, 2016 at 1:55 pm #226468n52
Hurah… I solved it π
page-header and page-title are different things πSeptember 14, 2016 at 1:57 pm #226473Tom
Lead DeveloperLead DeveloperAwesome! Great job π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMarch 12, 2017 at 8:26 am #290385njwrigley
This served me well. For the case above you can use this:
elseif ( is_post_type_archive( 'your_custom_post_type_slug' ) ) : _e( 'your_new_archive_title', 'generatepress' );
March 12, 2017 at 9:12 am #290397Tom
Lead DeveloperLead DeveloperThanks for sharing! π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 5, 2018 at 8:19 am #542044Thierry
Hello,
And for displaying only the title fron a CPT, no change “archives” but without “archives” ?
Thx
April 5, 2018 at 10:05 pm #542610Tom
Lead DeveloperLead DeveloperI’m not too sure what you mean? You don’t want “Archives” to show in the title while viewing CPT archives? Can you link me to the page?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 6, 2018 at 1:17 am #542707Thierry
That’s right : hide “archives”, i haven’t a link, its just on local
April 6, 2018 at 9:38 am #543101Tom
Lead DeveloperLead DeveloperYou could try this:
add_filter( 'get_the_archive_title', 'tu_adjust_cpt_archives_title' ); function tu_adjust_cpt_archives_title( $title ) { if ( is_post_type_archive() ) { $title = post_type_archive_title( '', false ); } return $title; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 7, 2018 at 12:17 am #543519Thierry
Great Tom, thx
-
AuthorPosts
- You must be logged in to reply to this topic.