• Hi all,

    If you are holding your mouse over the header image on the following website https://www.hvc-capelle.nl a link for that image pops up. I would like to edit one of these links over the header image, but I can’t find the sourcefile for editing this header link anywhere inside of wordpress. I also digged through all the php files but can’t seem to find where to edit this code and link.

    Does anyone have a tip on finding the sourcefile so I can edit the header links?

    • This topic was modified 7 years, 10 months ago by jojoba007.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Hey!

    That’s quite interesting. Even though I can’t give you a definite answer, my best guess would be either in the page.php of /wp-content/themes/hvc-child/ or a custom file somewhere in this directory. It’s a bit weird to see a child theme of a custom theme that really is a Twenty Eleven^^ Therefore it is hard to say where this could be hidden.

    If it’s not, could you please provide us with a list of files in /wp-content/themes/hvc-child/?

    Cheers

    Thread Starter jojoba007

    (@jojoba007)

    I literally did a ctrl-F through all php files and searched for the therm “begraafplaats” but wasn’t able to find the source.

    page.php of the hvc theme only has this code inside of it:

    get_header(); ?>
    
    		<div id="primary">
    			<div id="content" role="main">
    
    				<?php the_post(); ?>
    
    				<?php get_template_part( 'content', 'page' ); ?>
    
    				<?php comments_template( '', true ); ?>
    
    			</div><!-- #content -->
    		</div><!-- #primary -->
    
    <?php get_footer(); ?>

    And the hvc theme has all these php files inside of it:

    404.php
    archive.php
    author.php
    category.php
    comments.php
    content-aside.php
    content-featured.php
    content-gallery.php
    content-image.php
    content-intro.php
    content-link.php
    content-page.php
    content-quote.php
    content-single.php
    content-status.php
    content.php
    footer.php
    functions.php
    header.php
    image.php
    theme-options.php
    (inc/theme-options.php)
    widgets.php
    (inc/widgets.php)
    index.php
    page.php
    search.php
    searchform.php
    send_order.php
    Showcase Template Paginatemplate
    (showcase.php)
    sidebar-footer.php
    Sidebar Template Paginatemplate
    (sidebar-page.php)
    sidebar.php
    single-file.php
    single.php
    tag.php
    Webwinkel Paginatemplate
    (webshop.php)
    Styles
    style.css
    editor-style-rtl.css
    editor-style.css
    rtl.css

    Interesting indeed^^

    Well, there are only three places this can be: somewhere in the parent theme, somewhere in the child theme or it could be a plugin. With the “hackiness” that can be seen in the source code I thought this might be some place obvious – I was obviously wrong.

    Could you please check whether you can find a plugin that does what you’re looking for? If this doesn’t bear any results, you might have to give me access with a test account (which should most certainly be the last resort as you should never give access to the backend to a stranger…). But let’s talk about that if we don’t have any other options available.

    Thread Starter jojoba007

    (@jojoba007)

    I can’t find it anywhere. I made a copy of the site onto another test domain. So yes, If you would like to take a look then that would be awesome. I searched for it for a couple of hours. Maybe its just something simple that I missed.

    Is it possible to get in contact with you privately?

    Of course you can – the question is how to give you my contact details as it’s not allowed by the forums rules to add private contact info. We could talk on IRC, or the WP Slack channel. Otherwise you can send me an email – it’s a combination of my firstname and the domain you can find on my profile.

    I’ll post an answer (if I can find a solution^^) here, so if others run into the same problem (even though in this case it’s rather unlikely) they can read up on it.

    Cheers, Michael

    Thread Starter jojoba007

    (@jojoba007)

    Hi Michael,

    I send you an email. I hope I made the right combination. Let me know if you recieved my email. Thanks for taking the time to help me out.

    Well, at least I was not terribly wrong with my assumptions ??
    There is a child theme of a child theme of Twenty Eleven. The code can be found in the child theme of Twenty Eleven – Twenty Eleven/hvc-theme in header.php:

    <?php
      // Check to see if the header image has been removed
      $header_image = get_header_image();
      if ( ! empty( $header_image ) ) :
    ?>
    
      <?php
        // The header image
        // Check if this is a post or page, if it has a thumbnail, and if it's a big one
        if ( is_singular() &&
            has_post_thumbnail( $post->ID ) &&
            ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) &&
            $image[1] >= HEADER_IMAGE_WIDTH ) :
          // Houston, we have a new header image!
          echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
        else : ?>
        <div id="header-img1" class="slide" style="width: 302px;">
          <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" style="margin-left: -0px;" style="" /><div class="header-img-info"><p>Historisch Museum<br /><a href="/historisch-museum/">(meer informatie)</a></p></div>
        </div>
        <div id="header-img2" class="slide" style="width: 147px;">
          <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" style="margin-left: -302px;" /><div class="header-img-info"><p>Dief- en Duifhuisje<br /><a href="/dief-en-duifhuisje/">(meer informatie)</a></p></div>
        </div>
        <div id="header-img3" class="slide" style="width: 306px;">
          <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" style="margin-left: -449px;" /><div class="header-img-info"><p>Begraafplaats<br /><a href="/oude-begraafplaats/">(meer informatie)</a></p></div>
        </div>
        <div id="header-img4" class="slide" style="width: 245px;">
          <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" style="margin-left: -755px;" /><div class="header-img-info"><p>Van Cappellenhuis<br /><a href="/regentenkamer/">(meer informatie)</a></p></div>
        </div>
      <?php endif; // end check for featured image or standard header ?>
    <?php endif; // end check for removed header image ?>

    It’s quite hacky – and the comments are fun ??

    Hope this helps?

    Thread Starter jojoba007

    (@jojoba007)

    Thank you very much Michael. I thought I searched all child theme php files. Don’t know why I missed this code? But anyway thank you very much for taking the time to help me out!!

    Anytime!
    Please set this entry to “resolved”, so it’s marked as fixed.

    Cheers, Michael

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Can’t find source php file to edit header link’ is closed to new replies.