Okay
  Public Ticket #1188898
How to change title from "home" to Database name
Closed

Comments

  • Stuart started the conversation

    How would I go about changing "Home" to the actual name of the Database?

    If I have more than one database, it will get confusing seeing "Home" on both, and the only thing to differentiate them is the colour?

  •  61
    Lee replied

    Hello Stuart,

    Well there's quite a few ways to do it depending on what you are comfortable with...

    1.  Use our output filtering hook to replace with your own php code

    2.  Custom Javascript (backend settings)

    3.  Page indication

    to name a few.

    Keep in mind each database will reside on a separate page so naming the pages after the database name might be something you would want to do.  For example you have 2 databases contacts and leads, setting your pages named the same would give (www.yoursite.com/contacts and www.yoursite.com/leads).  You can also set the footer to reflect the current database as well.

    If you must change it from Home to something else, probably the easiest way is using Javascript and here's an example...

    var d = jQuery('.wcp-breadcrumb');
    d.text(d.text().trim().replace(/Home/i, "New Name"));
    

    Where New Name would be the name you want to use.  You would set this in the backend settings for the current database you want to change.

  • Stuart replied

    Hello,

    Thank you for highlighting some solutions.

    Using your Custom Javascript, is there a way to use the page name where the database resides instead of a static hard coded name?

  •  18
    Avinash replied

    Hello Again,

    You have to use php code there. You can use <?php echo get_the_title(PAGE_ID) ?> page or post id which you want to use in place of PAGE_ID.

    It will only work if you're doing in php file in between  <script> tag.

    Otherwise you have to use hard-coded.