Forums

[resolved] Remove links from pictures? Sounds simple. (18 posts)

  1. oliviaok
    Member
    Posted 7 months ago #

    Hi on my site i have sliding door theme.

    http://www.calligraphycompany.com

    I have tried to seek help from the sliding door theme forum but to no avail.

    hopefully someone here can help?

    so on my site, i like the sliders as they are- are just wish to remove the links/pages attached to them. So basically when you run the mouse over the images they move but you can't click them.

    hopefully this makes sense?

    thanks

  2. Marventus
    Member
    Posted 7 months ago #

    Hi Olivia,

    I took a look at your site and your theme's code. First, I feel I should clarify something, just to make sure you are aware of it. The image slider is basically a navigation menu, and the images are menu items that point to pages, links, etc. If you remove the links, the navigation functionality will break.
    Now, that being said, if you are aware of this and still want to remove the links, here's how:

    You will have to open and edit 3 files with an html editor (such as Dreamweaver) or plain text editor (such as Notepad). Don't use Microsoft Word or Open Office for this.

    1. Inside header.php:
    a. Locate this piece of code:

    var myMenu = new ImageMenu($$('#imageMenu a'),{openWidth:310, border:2, onOpen:function(e,i){location=(e);}});

    and change #imageMenu a to #imageMenu span.

    2. Inside functions.php:
    a. Locate this line of code:

    $attributes = ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : '';

    There are two instances of this line. Delete both of them.
    b. Locate the following lines of code:

    $item_output = '<a' . $attributes .' style="background: url(\'' . $thumbnail. '\') repeat scroll 0%;">';

    and

    $item_output .= '</a>';

    There are two instances of each. In both instances, change <a to <span (don't delete the single quotation mark that follows) and </a> to </span>.
    c. Locate this line of code:

    function no_sliding_menu(){

    That line start a function. Inside that function, you will see seven lines that start with the same code <li class=. In each line:
    i. Replace <a with <span and </a> with </span>;
    ii. Delete the href attribute and its value. In the first line, that would be:
    href=\"http://mac-host.com/support\"
    Don't forget to delete the closing double quotation marks in each case.

    3. Inside imageMenu.css located in the subfolder imageMenu:
    a. Locate this selector:

    #imageMenu ul li a {

    and change it to:

    #imageMenu ul li span {

    Inside the modified selector, you will see this line:

    cursor:pointer;

    Change it to:

    cursor:default;

    b. Locate this selector:

    #imageMenu ul li.bk6 a {

    and change it to:

    #imageMenu ul li.bk6 span {

    That should do it. Let me know if it works.
    Cheers!

  3. oliviaok
    Member
    Posted 7 months ago #

    hi marventus,

    thanks for your very detailed input! unfortunately it did not work! the final outcome was no images? i would like to keep the images.

    thanks anyway, is there another way we can just remove the link without altering so much code?

  4. Josh
    Member
    Posted 7 months ago #

    I'm sorry, what is your question?

    Do you want them to be click-able... or not?

    When you click them, it is loading the content into your main content area. Do you NOT want it to do this?

  5. oliviaok
    Member
    Posted 7 months ago #

    Hi Josh,

    I want the picture to be NON clickable please. Yes at the moment it is loading content. The images are saved to the page. So if i delete the page I lose the featured image.

    Hope this makes sense, can you can help.

    thanks

  6. Josh
    Member
    Posted 7 months ago #

    And is there an option in your theme to make the images not link to anything? (We gotta start with the easy stuff)

  7. oliviaok
    Member
    Posted 7 months ago #

    hi josh,

    no such option. the image is a feature for that page- i cant unlink it.

  8. Josh
    Member
    Posted 7 months ago #

    Okay, well Marventus has the best solution, in my opinion. Are you sure you followed his directions carefully, and precisely??

  9. oliviaok
    Member
    Posted 7 months ago #

    hi yes i followed very precisley and closely- it did not work im afraid.

    :-( what do i do next...

  10. Josh
    Member
    Posted 7 months ago #

    Use my contact form Here. Send me a message, and I'll respond. Then you can reply and add as an attachment, your header.php, your functions.php, and your ImageMenu.css files.

  11. Marventus
    Member
    Posted 7 months ago #

    Hi Olivia,

    The modifications I suggested worked on my test site. Are you sure you followed all the steps thoroughly? If you ended up with no images, you probably deleted more code than needed in step 2 (functions.php).
    If you want to completely remove the links, the suggested changes will be needed. However, if you want to simply hide the links by forcing the cursor not to change on hover, you could simply implement step 3. of my walk-through (CSS). That will prevent the cursor from changing when users hover over the images. However, if they do click on them, they will be taken to wherever the menu item points to.

    Cheers!

  12. oliviaok
    Member
    Posted 7 months ago #

    Hi Marventus,

    I will try again and let you know how I get on.

    Thanks

  13. oliviaok
    Member
    Posted 7 months ago #

    Hi Marventus,

    This did not work im afraid.

    I did just step3 as you mentioned and i ended up with same result as i did originally.

    I have taken a screenshot but do not know how to attach to this forum?

  14. oliviaok
    Member
    Posted 7 months ago #

    ok, in step 3 i changed the cursor to default but i changed back 'span' back to 'a' .

    And that has seemed to have removed the mouse cursor- which is much better.

    I will try step 1 to 3 again now - but ignoring 'a' to 'span' for just step 3

  15. oliviaok
    Member
    Posted 7 months ago #

    ok marventus i finally got there with some changes to your instructions.

    ideally i would i loved to of done it your way as i presume its the cleaniest!

    so what worked for;

    i did step 1a. then skipped to step2a, then on step3 only change i made was the cursor.

    and it seemed to have worked- hope it doesnt leave me with any open issues now lol x

  16. Marventus
    Member
    Posted 7 months ago #

    Hi Olivia,

    Glad to know you made it work. If you want, you could send me your entire theme folder (your custom version) and I'll try to completely remove the links. I created a temporary email address where you can email me the zip: for-olivia@elblawg.com.
    It would only be a precaution to make sure nothing broke.

    Cheers!

    P.S.: Please let me know once you have uploaded the files.

  17. Marventus
    Member
    Posted 7 months ago #

    Hi Olivia,

    Were you able to figure this out? If so, could you please mark this topic as resolved?

    Thanks!

  18. oliviaok
    Member
    Posted 6 months ago #

    sure thanks

Reply

You must log in to post.

About this Topic

Tags