Post Type translation – an idea
-
Someone asked on this topic the same question before. However the answer is not so clear for who does not good knowledge like me. But I found a way.
1. As the plugin author @alexandret mention on that topic, I copied
template/opensearchserver_search.php
file to the root of my theme’s folder. I found facet post type value
<?php print opensearchserver_get_facet_value($facet, $value); ?>
and I deleted that.
Search result was like this before:
– page (2)
– blog (5)
– forum (1)And then changed to this:
– (2)
– (5)
– (1)2. Why I did this? Because I discovered that, on the search result page, each post type has different label tag. Like this:
<label for="type_page"> <label for="type_post">
so onNow I added some css code to my style.css file:
label[for="type_page"] a.oss-link:before { content: 'страница'; } label[for="type_post"] a.oss-link:before { content: 'Блог'; } label[for="type_forum"] a.oss-link:before { content: 'Форум'; }
And now it looks like this
– страница (2)
– Блог (5)
– Форум (1)This is the way that I found.
- This topic was modified 8 years, 4 months ago by .
- This topic was modified 8 years, 4 months ago by .
- This topic was modified 8 years, 4 months ago by .
- This topic was modified 8 years, 4 months ago by .
- The topic ‘Post Type translation – an idea’ is closed to new replies.