Home Code Hide Arras Theme header image on pages

Hide Arras Theme header image on pages

1780
5

I’m running the Arras Theme 1.4.3.1 on a site and I wanted to display the 640×250 thumbnail image on each post/page, but hide it for certain content, in this case it was all my pages.

There is some PHP code you can add to two files which will allow you to set a special custom field on a post/page which will hide that header image.

  • In Functions.php:

    Define( ARRAS_DONT_DISPLAY_THUMB, 'dontdisplaythumbinpost');

  • In library/template.php, find the line

    if ($post) $id = $post->ID;

  • Add the following code after that line:
    $dontdisplaythumbinpost = get_post_meta($post->ID, ARRAS_DONT_DISPLAY_THUMB, true);
    if ($dontdisplaythumbinpost) {
    return false;
    }
Previous articleChange the Page Title on Tell-A-Friend confirmation page
Next articleBusiness Catalyst Search by gender not working

5 COMMENTS

  1. Hi Mitch,
    Did you try this in Arras Theme 1.5? I’ve tried but have been unsuccessful and was wondering if you have updated the above code?

    Thanks

LEAVE A REPLY

Please enter your comment!
Please enter your name here