WordPress.org

Ready to get started?Download WordPress

Forums

Source Code for Pages Widget Anchor Tags (1 post)

  1. BrentLeavitt
    Member
    Posted 4 years ago #

    First, let me express my utter delight in rediscovering Word Press. My first experiences with Word Press when I knew much less about programming in general were not very pleasant. But now having several years of web development work under my belt (and deploying systems in several other open source and commercial CMS's --including building my own custom PHP websites), coming back and rediscovering Word Press has been an absolute dream! Thank you.

    Now on to my question: How do I go about locating the HTML that is being generated by the Pages Widget? Specifically, I am looking for where the anchor tags are being generated as I am trying to insert <span></span> tags inside the anchor tags. This is for a little CSS trick I'm trying to accomplish on the design side of my site. Right now my code look like this:

    <div id="top_menu"><span class="hidden">Pages</span>
    				<ul>
    					<li class="page_item page-item-3"><a href="http://bestconcretesinks.com" title="Home">Home</a></li>
    					<li class="page_item page-item-11"><a href="http://bestconcretesinks.com/our-service/" title="Our Service">Our Service</a></li>
    
    				</ul>
    			</div><!-- end TOP_MENU -->

    What I'm trying to do is simply add <span> tags so that they are dynamically generated within the existing anchor tags. So that it would look like this:

    <div id="top_menu"><span class="hidden">Pages</span>
    				<ul>
    					<li class="page_item page-item-3"><a href="http://bestconcretesinks.com" title="Home"><span>Home</span></a></li>
    					<li class="page_item page-item-11"><a href="http://bestconcretesinks.com/our-service/" title="Our Service"><span>Our Service</span></a></li>
    
    				</ul>
    			</div><!-- end TOP_MENU -->

    Now I've already looked in the "wp-includes/widgets.php" file and the "wp-includes/post-templates.php". I even modified code in the post-templates.php file for both the wp_pages_menu() function and the wp_link_pages() function without success. I'm not sure if there was a caching issue that didn't make the changes reflect in the code, but as far as I can tell neither of these had anything to do with the anchor tag code that is being generated for the Pages Widget. Any help would be appreciated.

    Thank you,
    Brent

Topic Closed

This topic has been closed to new replies.

About this Topic