Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #560738

    I’d like to add an image to the top of my blog page. I’ve added it to my archive and single post pages (http://www.abidinghope.org/2014/10/), but I can’t manage to get it to show on the blog page (http://www.abidinghope.org/watch/sermons-test/). I’ve tried adding an is_page if statement to page.php but it doesn’t have any effect.

    Here’s the code I’ve added to page.php – I put it underneath <div class=’container’>:

    <?php if(is_page( '12929' )) {?>
    <img src="http://www.abidinghope.org/uploaded-files/images/watch/watchImages_sermons.jpg">
    <?php } ?>

    It’s been a while since I’ve written PHP, so I’m not sure if it’s the code or something else.

    Any help is appreciated!

    #560758

    Hey jwyderko!

    Try convert your code to

    <?php if(is_page( 'sermons-test' )) {?>
    <img src="http://www.abidinghope.org/uploaded-files/images/watch/watchImages_sermons.jpg">
    <?php } ?>

    and let us know if that works out good for you

    Best regards,
    Basilis

    #560791

    Hi Basilis,

    Thanks for your response. I tried changing the code to the page slug but it had no effect.

    Any other ideas?

    #561582

    Hi!

    can you provide us admin access, so we can take a deeper look please? post login details here as private reply.

    Best regards,
    Andy

    #562126

    See the private reply

    #562731

    Hey!

    Thanks for the info I did not see you have set any background image. Please goto Enfold Options > General Styling > Logo Area > background Image and select a predefined image or you can upload a custom background image.

    Cheers!
    Vinay

    #563392

    Thank you for your response, but I don’t understand how that will solve my problem. I’m trying to get a custom image at the top of just my Blog Page (http://www.abidinghope.org/watch/sermons-test/). You can look at my archive pages for an example of the image/layout I’m looking for on my Blog Page (http://www.abidinghope.org/2016/01/).

    See my earlier message in the thread for the code that I’ve tried adding to my page.php file.

    #563567

    Hi!

    Do you have a mockup to share with us? so we can help you better. You may upload it to image hosting service like imgur.com and apste the direct link here.

    Regards,
    Vinay

    #563568

    As I said in my previous post, I want the Blog Page to look like my Archive Pages which you can see at http://www.abidinghope.org/2016/01/. Is that not a satisfactory example?

    #563861

    Hi!

    you can change archive page layout by following these steps: http://kriesi.at/documentation/enfold/change-archive-categorytag-blog-style/

    Cheers!
    Andy

    #564069

    Ok. I REALLY do appreciate your assistance, but this is getting ridiculous. This is the third message in a row that I have received that is erroneous or has nothing to do with my problem.

    Assuming that it’s me who is not being clear enough, here’s an image that shows exactly what I want to happen: http://www.abidinghope.org/uploaded-files/screenshot.png.

    Please let me know if there’s anything I can do to clarify what I’m trying to do.
    Thank you.

    #564081

    Hi!

    You can go to Enfold theme options > Blog Layout > Blog Layout and choose to use Advanced Layout Builder to create your blog page and edit it as any other page and add your image to the top of your content manually.

    Best regards,
    Yigit

    #564093

    Thanks you. I tried that, and it works for the Blog Page, but then the Archive and Tag pages don’t use the Grid Layout anymore (see what my Archive Page looks like now http://www.abidinghope.org/2015/12/).

    Is there a way to force the Archive and Tag pages to use the Grid Layout while the Blog page uses the Advanced Layout Builder?

    #564137

    Hey!

    what about if you disable ALB on posts and then use the shortcode wand instead? Then you won’t have any layout conflicts I think.

    Cheers!
    Andy

    #565051

    Thanks for the reply, but I worked it out a different way.
    In case anyone comes across this with the same problem, here’s what I did: after scouring the code using Firebug, I discovered that the PHP file used for the Blog Page isn’t page.php, it’s index.php. I put my original code (see the top of this thread) underneath <div class=’container template-blog ‘> in index.php and it works great. No if-statement needed.

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Add Header Image to Blog Page’ is closed to new replies.