Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter 3vil3mpir3

    (@3vil3mpir3)

    Well, the goal of making an onclick event was circumnavigated by adding some css and a background image to the <a> tag like so:

    #topnav a{
    font-weight:bold;
    font-size:18px;
    width:191px;
    height:55px;
    display:block;
    text-decoration:none;
    }
    
    #topnav a:link, a:visited{
    color:#000000;
    background-color:transparent;
    background-image:url(<?php bloginfo('template_directory');?>/images/home-primary_nav.jpg);
    }
    
    #topnav a:hover, a:active{
    color:#ffffff;
    background-color:#000000;
    background-image:none;
    }

    Therefore . . . no need to alter anything. Case closed for this I suppose, but it really would be nice to know if I can alter the start_el in the template’s functions.php document. Thoughts?

    Forum: Plugins
    In reply to: Document Management Plugin?

    I’m also looking for something like this.

    Thread Starter 3vil3mpir3

    (@3vil3mpir3)

    To be a little more descriptive of what I’m trying to accomplish:

    I’d like to modify the output of wp_list_pages to include a javascript onclick command on the <li> but I can’t seem to get the unique url for each <a> that wp_list_pages is generating.

    essentially, it should look like this:
    <li class="page_item current_page_item" onclick="location.href=' the page url';" style="cursor:pointer;"><a href=" the page url">The page</a>

    I’ve tried to use get_page_link($page->ID), but it returns the same post url for each instance (rather than a page url).

    As such, I’ve turned to modifying the start_el entry in classes.php, but I’d rather not make this modification each time I install WP or update it. Is there a way to override the start_el function local to the template? Am I thinking about this the wrong way?

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)