Forums

create custom links inside of a widget (2 posts)

  1. munk_
    Member
    Posted 11 months ago #

    Hi all,
    I'm using widgets to organize my navigations, and I can customize the CSS in the before_widget and after_widget- variables in function.php
    Now I would like to customize the links inside the widget(my navigation) to jump to a special spot on the site (a href= abc/#top - /#next)
    I searched throughout widgets.php but could not find where the links were declared to be able to customize them.

    thanks for help!

    munk_

  2. Domino_ukraine
    Member
    Posted 11 months ago #

    The matter is that there is no need crawl in php. Enough to prescribe sub-css properties. Naprmer: vіvod own widget to include in <div id="widget1">.
    Look what tags on a link displayed another and record them in the css.
    Example:

    <div id="widget1">
    
    <ul>
    <li><span id="bla-bla1"><a href="somewhere1">Smth1</a></span></li>
    <li><span id="bla-bla2"><a href="somewhere2">Smth2</a></span></li>
    </ul>
    </div>

    Tag ul already displayed widget.

    In css write (if necessary adjust the appearance of links):
    # widget1 ul li span a {
    color: ...
    font-weight: ...
    }

    It must work. If not - give me link.
    Good luck! :-)

Reply

You must log in to post.

About this Topic