How To Edit Standard Pages?

Front page Support Forums Tokyo Theme Support How To Edit Standard Pages?

This topic contains 13 replies, has 2 voices, and was last updated by  noisesev 3 years, 7 months ago.

Viewing 10 posts - 1 through 10 (of 14 total)
  • Author
    Posts
  • #3185

    noisesev
    Participant

    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

    #3198

    satori
    Member

    Hey 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 Studio

    #3207

    noisesev
    Participant

    Hi 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

    #3213

    noisesev
    Participant

    And 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 3 years, 7 months ago by  noisesev.
    #3228

    satori
    Member

    Hey 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 Studio

    #3234

    noisesev
    Participant

    Hi 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

    #3238

    satori
    Member

    Hey 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 Studio

    #3240

    noisesev
    Participant

    Andrii,

    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

    #3243

    satori
    Member

    Hey 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 Studio

    #3246

    noisesev
    Participant

    Hi 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

    • This reply was modified 3 years, 7 months ago by  noisesev.
    • This reply was modified 3 years, 7 months ago by  noisesev.
    • This reply was modified 3 years, 7 months ago by  noisesev.
    • This reply was modified 3 years, 7 months ago by  noisesev.
    • This reply was modified 3 years, 7 months ago by  noisesev.
Viewing 10 posts - 1 through 10 (of 14 total)

You must be logged in to reply to this topic.