WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't remove an image from the template (8 posts)

  1. brt1919
    Member
    Posted 2 years ago #

    I’ve taken over a site which was created by someone else & is using the twenty eleven theme.

    At the bottom of every page the site is trying to display an image which from the fact that it’s just an empty box with the good old red ‘x’ in the top left corner, suggests that the picture has not been uploaded in the right place or something along those lines, & that being as it is in every page, it must be part of the global template for the site & not something which just happens to have been uploaded each time a new page has been created (I’ve created new pages so know this isn’t the case). As it happens, we don’t want a picture there at all, but for the life of me I can’t find where it is to get rid of it! So it just looks very amateurish & unfinished having a blank box there.

    When I right click & display properties I can see that its called ‘http://www.xxxxxxx.co.uk/uploads/2011/tfc-logo-low.jpg & then I look through the source code for the page I can see the following <img src="/uploads/2011/tfc-logo-low.jpg" width="728" height="179">. However, I’ve looked in the Appearance & Settings pages but just can’t figure out where in the template software the image has been (incorrectly) put to remove it.

    Thanks for any help someone can offer – I suspect it’s a very simple thing for people used to WordPress, I’ve just switched from MIACMS & it looks similar but a bit more friendly overall!

  2. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    Check the footer.php file.

  3. brt1919
    Member
    Posted 2 years ago #

    Thanks for mega quick response. I had a look before in that area with no joy, but I've gone through all the php files & can't see anything there. There are a number of content_xxxx.php files too & have checked through all of them as well as standard header/hooter etc. the footer php file contents are as below. Most of wordpress has been an absolute doddle to pick up from scratch but I just can't figure this one out!

    Thanks

    [code moderated - please use the pastebin]

  4. Luca Hammer
    Member
    Posted 2 years ago #

    Try to deactivate all plugins and see if it is still there (after deleting the cache). A plugin could use the footer hook to insert code. It could also be a javascript somewhere on the site.

  5. brt1919
    Member
    Posted 2 years ago #

    Thanks. I went to the Plugin area & I have 3 plug ins (Akismet, Hello Dolly & MCE Table Buttons) although only MCE table Buttons was currently enabled. So I deactivated it, checked all show as Inactive, cleared all my temporary internet files & still have the missing picture!

    The website is http://www.trainingforcyclists.co.uk & the ‘image’ I want to be rid of is at the bottom of the page (& on every new page created)

    Thanks

  6. brt1919
    Member
    Posted 2 years ago #

    been looking a bit more at this & just wondering whether I might be in the right area – the theme is twenty eleven with 3 widgets. If I click on the widgets page, on the right hand side are Main Sidebar, Showcase Sidebar, then Footer Area One, Two & Three. Main & Showcase appear to be empty but the Footer Area’s seem to be active. Footer One has a title Meta:Administration, the other 2 relate to recent posts & recent comments.

    Before I risk destroying the site, is there any possibility my missing picture relates to the widgets or is that completely the wrong place to look?

    Thank you

  7. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    the image seems to be at the bottom of the page content;
    possibly some 'signature' image (?)

    if it is not directly added into the page content, have a look into functions.php of the theme, for some add_filter('the_content','.....') code.

    or look into content-page.php

    more important:
    please do not edit Twenty Eleven directly, but create a child theme to work with http://codex.wordpress.org/Child_Themes

    otherwise, any customisations might get overwritten with your next upgrade.

  8. brt1919
    Member
    Posted 2 years ago #

    You’re a star – thank you very much.

    It definitely wasn’t in the actual page content. I then went to Editor & opened up Theme Functions (functions.php) which had some add_filter code but not the one you suggested. Last hope was content-page.php & bingo, there it is - my rogue image!

    [please follow the forum guidelines for posting code: http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    	<header class="entry-header">
    		<h1 class="entry-title"><?php the_title(); ?></h1>
    	</header><!-- .entry-header -->
    	<div class="entry-content">
    		<?php the_content(); ?><img src="/uploads/2011/tfc-logo-low.jpg" width="728" height="179">

    I’ve got rid of the image directly for now, but will read up on child themes & do it properly in due course to ensure I don’t lose it when I upgrade

Topic Closed

This topic has been closed to new replies.

About this Topic