-
Author
-
February 12, 2018 at 19:52 #188452HDcmsParticipant
Hello,
I want
a) hide the text before the category at the top of the pageb) only display the next / previous links in the same category
I found codes on the internet but these do not work is it to your theme?
a) https://wordpress.stackexchange.com/questions/175884/how-to-customize-the-archive-title
‘add_filter(‘get_the_archive_title’, function ($title) {
return preg_replace(‘/^\w+: /’, ”, $title);
});’b) https://digwp.com/2016/10/wordpress-post-navigation-redux/
‘$args = array(
‘prev_text’ => ‘Previous post: %title’,
‘next_text’ => ‘Next post: %title’,
‘in_same_term’ => true,
‘taxonomy’ => ‘category’,
‘screen_reader_text’ => ‘Post navigation’
);
the_post_navigation($args);’Regards
February 13, 2018 at 20:53 #188568LauraModeratorHello, do you mean the “Archive for” ? You can change it using loco translate:
Theme strings and plugins strings can easily be changed by using Loco Translate plugin https://wordpress.org/plugins/loco-translate/
<h3>A small introduction on how translations work</h3>
Translatable strings can come from the theme or from the installed plugins. You need to translate the theme or the plugin depending on what section of the site your string is found.For example if your string is on your BuddyPress profile then most probably you will need to translate BuddyPress plugin. If you are on the Forums section of your site then bbPress plugin should be the one that needs to be translated. Another example is the rtMedia plugin that adds the Media links to BuddyPress and if you want to translate it then this plugin will contain the string.
<h3>Follow these steps to get you started:</h3>- Install Loco Translate plugin
- Go to the plugin dashboard: WP Admin – Tools – Manage translations
- Find the theme or plugin in the list.
- If the language isn’t already in the list then click Add new language, choose your language and if you are asked where you want to save the language files choose global language directory ( wp-content/languages/ ).
- Press SYNC button to synchronise your translation with the provided .pot file
- Search for the string you want to translate and add your translated string.
- Press Save when you finished your translation.
Note: You will have to set the language for your blog from WP-admin – Settings – General – Site Language – Choose your language
For b) i do not understand what do you mean
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 13, 2018 at 21:03 #188571HDcmsParticipantHello,
yes indeed I had not thought to change the translation (although I would prefer a generic function that does not seem to work!)
But the problem is that I will have to change every wordpress translation update
I would have a way to overload the chain (I do it with joomla)b) link at the bottom of an article showing a link to the previous article and the next article
The problem is that it takes into account all the articles of the site.
I will only want to see links in the same category.
The solution found does not seem to workRegards
February 14, 2018 at 19:36 #188691LauraModeratorHello, no you wont need to do that, when doing a translation, add the language and choose to use CUSTOM or SYSTEM file path so the translation its saved at the system and not at the theme/plugin files ( which could be replace with an update)
b) i see, i will assign this to @radu to see if he has a solution
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 15, 2018 at 16:39 #188777RaduModeratorHi,
a. You will need to use this code in your chidl theme functions.php to can overwritte the titles : https://pastebin.com/raw/V25agnBf
Delete or change the marked words
TO can have prev next in the same category as displayed post please copy this file : wp-content/themes/kleo/single.php
to : wp-content/themes/kleo-child/single.phparound line you will see kleo_post_nav(); change it with kleo_post_nav(‘true’);
That’s it
You will have to install and activate kleo child theme.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 16, 2018 at 10:34 #188851HDcmsParticipantHi,
I would have preferred an independent solution of the theme (by function) but change the page single.php must work
Thank you and goo dayFebruary 16, 2018 at 15:59 #188873RaduModeratorHi,
That’s the recommended way
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.