• Resolved person19920

    (@person19920)


    How can I change the Title of the forums page from forums to Communities, so as the shortcode and the link under the blue button

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Robin W

    (@robin-w)

    it seems like you have solved this problem already

    Thread Starter person19920

    (@person19920)

    I just inserted a piece of javacode to the page to get the element and change it, it’s not a wise way.

    <script>
    var bodyElement=document.body;
    bodyElement.style.display = 'none';
    console.log("hide page");
    const currentURL = window.location.href;
    const targetURL = 'https://rotary-vve-connect.org/forums/';
    window.addEventListener('load', function() {
    if (currentURL.startsWith(targetURL)){
    console.log("This is a forum page");
    // Select the parent div element
    if(currentURL==targetURL){
    const parentDiv = document.querySelector('.bbpress-container.bsp-fse-container');
    // Select the h1 element inside the parent div
    const h1Element = parentDiv.querySelector('h1');
    const bbpcontent = document.querySelector('.bbpress-content');
    const forumtext = bbpcontent.querySelector('.bbp-breadcrumb-current');
    const forumintable = bbpcontent.querySelector('.bbp-forum-info');
    forumintable.textContent = "Community";
    forumtext.textContent="Communities";
    h1Element.textContent="VVE Communities";
    }else{
    const bbpcontent = document.querySelector('.bbpress-content');
    const forumlink = bbpcontent.querySelector('.bbp-breadcrumb-root');
    forumlink.textContent = "Communities";
    }
    }
    bodyElement.style.display = 'block';
    });
    </script>
    • This reply was modified 8 months, 3 weeks ago by person19920.
    Plugin Author Robin W

    (@robin-w)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change from “forum” to “Community”’ is closed to new replies.