• Want to use custom Header image on index page. Need to move location of theme generated entries,ie. position of first post which display on top of the graphic, and disable others, ie site title and tageline which are incorporated into the header art work. Will worry about getting the info back into the meta data later.

    Tried firebug with the rendered html looking at the page, and searching the php files in the theme folder but can not find the css or the php that pretains to the specific elements that I need to modify. Found parts of it in one theme some in another (both themes work fine) but could not find all in any. Also not happy using brute force to locate.

    1. How does one go about finding all the coding to modify a given element?

    2. If you comment the css one at a time will that get it done if there is no other way to locate?

Viewing 2 replies - 1 through 2 (of 2 total)
  • For starters I usually put comment lines in my theme template files.

    as example, 2010 theme page.php looks like this

    <?php get_header(); ?>
    	<div id="container">
    		<div id="content" role="main">
    			<?php
    ...
    			get_template_part( 'loop', 'page' );
    			?>
    			</div><!-- #content -->
    		</div><!-- #container -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I add two lines:

    <?php get_header(); ?>
    <!-- page.php -->                <<<<<<<<===================== ADD
    	<div id="container">
    		<div id="content" role="main">
    			<?php
    ...
    			get_template_part( 'loop', 'page' );
    			?>
    			</div><!-- #content -->
    		</div><!-- #container -->
    <!-- end page.php -->          <<<<<<<<===================== ADD
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I do this to all the major template files. Now when I am looking at the browser’s View Source I can tell from what template file the code in each section has come from.

    You can make them visible in Firebug by turning on comments display (under HTML option, Show Comments),
    Then you have narrowed down the code files you are searching to find the source of the HTML code.

    Thread Starter edziffel

    (@edziffel)

    Nice. Will give that a go. Very simple but would have never thought of it.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Finding css rules for php generated html elements’ is closed to new replies.