PHP help

Discussion in 'PHP' started by bob25, Jun 7, 2010.

  1. #1
    Can anybody tell me how to edit the post title out of this php file?

    Thanks

    <?php
    if ( function_exists('register_sidebar') )
    register_sidebar(array(
    'before_widget' => '<li id="%1$s" class="widget %2$s">',
    'after_widget' => '</li>',
    'before_title' => '<h2 class="widgettitle">',
    'after_title' => '</h2>',
    ));

    add_filter('comments_template', 'legacy_comments');
    function legacy_comments($file) {
    if(!function_exists('wp_list_comments')) $file = TEMPLATEPATH . '/legacy.comments.php';
    return $file;
    }


    ?>
     
    bob25, Jun 7, 2010 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,901
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #2
    Why do you want to remove the post title out of that file? You mean to have legacy_comments() remove the title?
     
    sarahk, Jun 7, 2010 IP
  3. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #3
    I'm using a script that adds the title to my posts, so I'm getting 2 headers on my posts. I've looked at that template and It seems difficult to remove. I was hoping someone here would suggest a modification of the php files instead. Really weird Wordpress theme.

    Thanks
     
    bob25, Jun 7, 2010 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,901
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #4
    You are better to look at Index and Single and make the change there.

    Feel free to post what you have and enclose in [ php ] tags.
     
    sarahk, Jun 7, 2010 IP
  5. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #5
    Like I said it's a weird theme. It's not in the index file as I can remove the header on the homepage, but not the posts. And there is no single.php. As far as I can tell it has to be in the functions file posted above. I've tried removing some code, but I either end up with an error (file doesn't function), or nothing seems to happen.

    Here's what I have:

    * Footer (footer.php)
    * Header (header.php)
    * Main Index Template (index.php)
    * Page Template (page.php)
    * Sidebar (sidebar.php)
    * Theme Functions (functions.php)
    * footernav.php (footernav.php)
    * nav.php (nav.php)

    Styles

    * Stylesheet (style.css)



    Thanks
     
    bob25, Jun 7, 2010 IP
  6. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #6
    Mostly it will be in Index.php
    What theme you're using?
     
    roopajyothi, Jun 8, 2010 IP
  7. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #7
    It's one from the FatCat Blueprint. But like I mentioned I can edit the header out of the index file, but it's still appearing on the posts, so I think it has to be in the functions. But I did manage to modify a different theme to look somewhat similar, and this is a normal theme that I was able to edit out the header in the index a single files.

    Thanks
     
    bob25, Jun 8, 2010 IP
  8. sarahk

    sarahk iTamer Staff

    Messages:
    28,901
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #8
    I would search your functions for is_single and that is where the damage is being done
     
    sarahk, Jun 8, 2010 IP