Edit Site title in the Theme

This will sound odd, but bear with me.

My theme shows my site title as a text, I turned it into a link in the RW general settings tab:
<a href="mywebaddress">mySiteTitle></a>
Because I want my users to click it if needed, and I edited the CSS, so it looks really nice. In my theme, that is the simplest way to go back to the homepage.
But, the default way of going back to homepage is to click the logo in my theme. It turns out, I don’t want to use a logo, I don’t have one. So I decided the push it by turning site title to a clickable link.
I did it in the “General” settings of RW, by simply typing up the html code above.

The problem is then is this. In individual pages, on the browsers, the title shows like this:

"individual page title" | <a href="mywebaddress">mySiteTitle></a>

Note that the code for my site title shows as the browser title of individual subpages in my site.

I want it to show

“individual page title” | “mySiteTitle”

The only way I know is to go back to Site Settings in RW and replace the clickable link code with a simple text “mySiteTitle”. But that kills the whole purpose.

I went back to the theme contents: right-click show package contents, and find the index.html.

The index.html file in the theme has this %title% think in the html code. It seems that it is where the title generated by RW goes.
Is it possible to manipulate it so that %title% will be replaced by something like %page-title | “my SiteTitle”% where page-title is how RW gets the page title of my individual subpage and concatenates it with “mySiteTitle” as a text. Imagine mySiteTitle as a constant text that I put, so it will replace the html code that RW takes from my Settings.

I can figure out how to add things to the title generator %title% in the index file of the theme. But I don’t know how to remove/replace things in it.

I hope I could explain the problem.

Okay,
It’s kinda hard for me to follow what you are talking about. First thing if you are posting code on this forum, please mark it as code. You do that by selecting the code that you pasted into your post and selecting the “preformatted text button” </> right above where you type. Right now the “code” you posted isn’t really visible.

It’s also most helpful to post the actual code you have used, as well as a URL to at least a test page.

Right now I doubt the site title is called mySiteTitle and while coding HTML syntax can be very important.

Within a theme, the %title% is a variable that RapidWeaver Outputs the title of the current page.
The %site_title% Outputs the"generated" site title.

If you want to modify a theme, first make a copy.

Since I have no idea what theme you are using I can give some generic things you could try.
On the copy of the theme You probably have some code that looks like this:

<title>%title%</title>

Surround the tile with the anchor tag (like the logo has now):

<a href="%base_url%">
<title>%title%</title>
</a>

Many thanks.

But it didn’t work. The title actually shows as the browser title on top of my browser window/tab, I am not sure how tagging it with <a> would help.
I also tried
<title><a href="%base_url%"> %title% </a></title>
didn’t work either, as expected.

Here is a sample page: https://canbaskent.net/vegan/33.html

The title of the page “Can Baskent” is clickable because I entered it as a link on RW general site settings. But it also reflects to the browser title as an html code. Just look at your browser window/tab.
I want it to look like as follows, while maintaining the clickable site-title on the page, the big “Can Baskent” text:

Peynir Gemisi | Can Baskent

rather than

Peynir Gemisi | <a href="https://canbaskent.net/">Can Baskent</a>
(not as a code but as verbatim)

Any more suggestions, please?

Sorry,
I don’t have that theme, but I made a mistake on what I gave you above.

Look for something like thi (without the <title> tags):

<div id="siteTitle"><h1>%site_title%</h1></div>

This should be fertherdown the html

Now change it to this:

<div id="siteTitle"><h1><a href="%base_url%">%site_title%</a></h1></div>
1 Like

Perfect.

Many thanks. Just for the record, my theme didn’t have the div tags around it, but it still worked.

Best wishes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.