New Front EN › Support Forums › Tokyo Theme Support › How To Edit Standard Pages?
- This topic has 13 replies, 2 voices, and was last updated 10 years, 6 months ago by noisesev.
-
AuthorPosts
-
May 1, 2014 at 8:49 pm #3185noisesevParticipant
Andrii,
Sorry for my relentless questions. I am wondering how to edit the content and layout of the 404, blog posts, archive and search results pages? Especially the 404 and search results content as the text is in English…
Cheers,
Chris
May 3, 2014 at 2:24 pm #3198satoriKeymasterHey Chris,
user questions is what helps improve the theme! It is I who should say “thank you” to you for pointing out the bugs ;)
Regarding your question: in case you need to edit the layout of the pages you mentioned, you will need to alter the theme files named “404.php” (for the 404 page) and “index.php” (for the archive-type pages, there are comments inside the file to mark where in the code each type of archive is processed. In case you just need to translate the text strings of the theme, I would recommend using the Localization admin section – input the old and new desired strings, as well as “satori” for the “Domain” field; you can create as many string translations as you need, just note that the strings are case-sensitive.
Sincerely,
Andrii / Satori StudioMay 3, 2014 at 4:26 pm #3207noisesevParticipantHi Andrii,
Cheers.
I’ll try one of the two options you outlined. It’s strange that those pages don’t appear under the WordPress pages tab…
Is there a way to have a custom background for the 404 page by the way?
Regards,
Chris
May 3, 2014 at 8:46 pm #3213noisesevParticipantAnd how can I delete the search form (in top section anyway) and the categories and archive widget? By the way: The search form in the top section is about three times higher than usual…
- This reply was modified 10 years, 6 months ago by noisesev.
May 6, 2014 at 3:42 pm #3228satoriKeymasterHey Chris,
both the 404 error page and the archive pages are usually not something that is created via the “Add Page” admin menu in WordPress – they appear automatically under certain conditions, e.g. an URL slug that does not refer to any existing page (in case of 404) or a query with certain parameters (in case of archive and search pages).
The 404 page does not have a custom background setting so far in Tokyo, I will consider adding this feature in the next version; meanwhile, you can alter its background via custom CSS, by setting a custom background image property for the “page-background” element e.g.
.error404 #page-background { background-image: url('images/yourimage.jpg'); }
You can read more on the “background-image” property e.g. here; the URL address I’ve used in the example tells the CSS to look in the /wp-content/themes/Tokyo/images/ folder.
In order to remove the search form from the header, please untick the “Display search box in the top section” option in the “Page Elements” tab of the Theme Options panel.
Sincerely,
Andrii / Satori StudioMay 6, 2014 at 6:47 pm #3234noisesevParticipantHi Andrii,
I’m using the German edition of WordPress. Is the language for the standard pages overridden by the theme?
And I’d like to keep the search box in the top section permanently but remove it from the standard page (and the categories and archive widget). Is there any way to achieve this?
Regarding the background image: I’ll try that out once the site is up and running again!
Cheers,
Chris
May 7, 2014 at 12:41 pm #3238satoriKeymasterHey Chris,
The content of the pages is displayed in the language in which it has been inserted in the page editor mode; could you please clarify which part of the page do you have in mind in this case?
There is no back-end option to display the search form only on certain pages, yet you can use some additional CSS to hide it where you don’t need it:
.page:not(.home) #header-search, .archive #header-search, .category #header-search { display: none !important; }
Sincerely,
Andrii / Satori StudioMay 7, 2014 at 4:09 pm #3240noisesevParticipantAndrii,
I mean the standard pages which I can’t access through the page editor mode.
Does that code apply to the search box customarily displayed on the standard pages or the one permanently activated in the top section? I’d like to remove the one in the body.
Cheers,
Chris
May 8, 2014 at 6:41 am #3243satoriKeymasterHey Chris,
now I get, it, sorry :)
Theme’s template files assume a searchbox only on the 404 page, which you can get rid of using this:
.error404 #searchform { display: none; }
Other archive pages should not have a default search form inside the content area of the website; in case you mean the one displayed in the sidebar, it can be removed by removing the “Search” widget from the Sidebar widget area in “Appearance -> Widgets” admin menu. Since Tokyo has a built-in feature that allows creating multiple sidebars in the same widget area, you can use the “Appearance -> Custom Sidebars” admin section to create a sidebar with a search form that will substitute the default one on pages where you want the form to appear. Alternatively, you can use some more CSS:
#sidebar #searchform { display: none; }
Sincerely,
Andrii / Satori StudioMay 8, 2014 at 10:16 am #3246noisesevParticipantHi Andrii,
Unfortunately the code removes the search form from the top section, too.
And as mentioned for some reason the search form is three times higher than usual on the 404 page.
Regarding the category and archives lists: Should I just delete lines 22-25 from the 404 template?
And how do I edit the page name displayed at the top of the browser via localisation, too?
Cheers,
Chris
-
AuthorPosts
- You must be logged in to reply to this topic.