Before you ask please READ THIS

Visit Site button

edited May 2013 in Beach Please Posts: 27
Is it possible to change the name of the Visit Site Button on a certain work page and leave the others as is? I want to re-name that button on certain work pages to say something else.

Comments

  • AirAir
    Posts: 10,970
    Hello:-)

    It is possible to hard code such thing for certain works, we only need to know their IDs.

    With regards.
  • Posts: 27
    Thxs, i'm new to wordpress templates; how do I find the ID? Also once I give you the ID will I be able to just apply that change to any work page?

    Also is it possible to have the button trigger a light box that displays the linked webpage? if so do I just need to a light box widget and put the code into the admin section that ask for the internet code?

    Thxs for the help...
  • AirAir
    Posts: 10,970
    Hello:-)
    jwoodsoniii said: lso is it possible to have the button trigger a light box that displays the linked webpage?
    It is rather not simple modification, and probably would require many changes.
    jwoodsoniii said: how do I find the ID?
    When you edit work then in address bar you can see something like post=981 and 981 is your ID.
    jwoodsoniii said: Also once I give you the ID will I be able to just apply that change to any work page?
    When you have ID, you change such code in single work line ~45
    
                        if(strlen($temp)){
                            echo '<a class="project-site" href="'.$temp.'">'.__fe('Visit Site').'</a>';
                        }
    
    to
    
                        if(strlen($temp)){
                            $ids = array(777,982,983); //here you add your IDs
                            if(in_array(get_the_ID(), $ids)){ //this will show up if current work is one of this special
                                echo '<a class="project-site" href="'.$temp.'">'.__fe('Do not :-) Visit Site').'</a>';
                            }
                            else{ //normal scenario
                                echo '<a class="project-site" href="'.$temp.'">'.__fe('Visit Site').'</a>';
                            }
                        }
    
    With regards.
  • Posts: 27
    Thxs, Just so that i'm clear i will update i.e. $ids = array(777,982,983); //here you add your IDs to $ids = array(xxx,xxx,xxx); //here you add your IDs; with my work page IDs filling in the xxx,xxx etc...

    Also where do I make the update to the name of the button? and can I change the color of the Visit site button globally another color?

    Thxs for the help...
  • AirAir
    Posts: 10,970
    Yeah, just read code and you will see comments and name of button to change.
    "Do not :-) Visit Site" is string for your special cases and "Visit Site" is your normal string, so change them as you wish.

    For color use this custom CSS:
    a.project-site{
    background-color: #000; /* normal color */
    }
    a.project-site:hover{
    background-color: #ff0000; /* hover color */
    }
    With regards.
  • Posts: 27
    Thxs
  • AirAir
    Posts: 10,970
    If you are happy with this theme please don't forget to rate us on ThemeForest - it helps us a lot! Thanks!
  • Posts: 27
    Hello, which of the CSS files do i need to edit to make the visit site button green throughout the whole site?
  • Posts: 27
    sorry figured it out :)
  • AirAir
    Posts: 10,970
    Great :-)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion