Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1252244
    Sabacon
    Participant

    Hi

    I would like to place an image at the top of my Blog page above the title. I might imbed the title within the image and remove the title completely. I’m using Integrity and I can’t figure it out? I cannot open the page in Cornerstone?

    G

    #1252718
    Darshana
    Moderator

    Hi there,

    Thanks for writing in! To assist you with this request, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1252799
    Sabacon
    Participant

    Sabacon.net

    #1252939
    Friech
    Moderator

    Hi There,

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Then add this on your child theme’s functions.php file.

    function custom_banner() { ?>
        <div class="custom-banner x-container max width">
        <img src="IMAGE URL HERE" />
        </div>
      <?php }
    add_action('x_before_view_integrity__landmark-header','custom_banner', 29);

    Replace the IMAGE URL HERE string with the image actual URL.

    Then add this on your custom CSS on Customizer to remove the blog title.

    .archive .x-header-landmark {display: none;}

    Hope it helps, Cheers!

    #1254192
    Sabacon
    Participant

    I will try this tomorrow.

    G

    #1254217
    Rue Nel
    Moderator

    Sure no problem.
    If you need anything else we can help you with, please let us know.

    #1254500
    Sabacon
    Participant

    Hi Friech,

    I forgot to mention that this is a category listing pseudo page, not the actually blog page. I would like to an image at the of this category listing pseudo page. Eventually, I will have two category pages. One for blogs the other for podcasts. I am assuming that will change your suggestion. Is there something different I need to do?

    Gerald

    #1254746
    Rue Nel
    Moderator

    Hello There,

    Since you are creating a pseudo page, you can simply create a page and use Recent posts element. There is no need to have the custom functions since you can build the layout of the page in anyway you want. With the help of the image element, recent post element, line element, custom headline element and more, you should be able to achieve what you have in mind.

    Hope this make sense.

    #1254834
    Sabacon
    Participant

    I right now I have two categories, one for my Blog Posts and one for my podcasts. I have set up the Blog (Category) page, but I have not to set up the Podcast (category) page yet. I would like to have and image above the title on both the blog and podcast category pseudo pages.

    G

    #1254999
    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates! Since you already set up the blog index, if you want to display the Podcast, please use the Podcast category page instead. It will have the same look as the blog index. You can go to Appearance > Menu and enable the categories for menu items. The usual link for the podcast would be something like http://example.com/category/podcast/

    To know more about how you can create custom menus, please check this out: https://community.theme.co/kb/wordpress-custom-menus/

    Hope this helps.

    #1255224
    Sabacon
    Participant

    I would like to place an image at the top of my Blog (pseudo category)page above the title. I might imbed the title within the image and remove the title completely. I’m using Integrity and I can’t figure it out? I cannot open the page in Cornerstone?

    #1255267
    Christian
    Moderator

    Hey there,

    The Blog, archive or any dynamic page is not editable by Cornerstone.

    For that, you’ll need to copy _landmark-header.php located in wp-content\themes\x\framework\views\integrity to the same folder in your child theme (wp-content\themes\x-child\framework\views\integrity).

    Open the copied file and paste your image code (<img src="IMAGE_URL">) under the line

    <?php elseif ( is_category() || x_is_portfolio_category() ) : ?>

    If you’re unsure how to do this, You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/

    Thanks.

    #1257171
    Sabacon
    Participant

    Hi Christian,

    That worked perfectly. Thanks. Second question when I create my podcast category pseudo page. Where do I put that img src=”…” for that page. In other words, I want one image for the blog and another for the podcast pseudo page.

    Did I need to create that podcast pseudo page before doing this?

    G

    #1257578
    Paul R
    Moderator

    Hi,

    You can add another conditional statement for your specific category.

    eg.

    
    <?php elseif ( is_category(1)) : ?>
    <img src="IMAGE_URL">
      <?php
    
      $meta     = x_get_taxonomy_meta();
      $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Category Archive', '__x__' );
      $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>&ldquo;' . single_cat_title( '', false ) . '&rdquo;</strong>';
    
      ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p>
      </header>
    

    Change 1 in is_category(1) with your category id.

    https://community.theme.co/kb/how-to-locate-category-ids/

    http://screencast.com/t/qhqvCGTdQZ1

    Hope that helps.

    #1258229
    Sabacon
    Participant

    It helped, but from the code you gave me combine with the code from Christian. I thought before I did it that the same image would appear on both category pages. And it did. I used your screencast as a guide. I also commented out the subtitle because I did want to show up. I think I need an else if for each category id. Am I right? Below is what I did:

    <?php elseif ( is_category() || x_is_portfolio_category() ) : ?>

    <?php

    $meta = x_get_taxonomy_meta();
    $title = ( $meta[‘archive-title’] != ” ) ? $meta[‘archive-title’] : __( ‘Category Archive’, ‘__x__’ );
    // $subtitle = ( $meta[‘archive-subtitle’] != ” ) ? $meta[‘archive-subtitle’] : __( “Below you’ll find a list of all posts that have been categorized as “, ‘__x__’ ) . ‘“’ . single_cat_title( ”, false ) . ‘”‘;

    ?>

    <header class=”x-header-landmark x-container max width”>
    <h1 class=”h-landmark”><span><?php echo $title ?></span></h1>
    <p class=”p-landmark-sub”><span><?php echo $subtitle ?></span></p>
    </header>

    <?php elseif ( is_category(12)) : ?>

    <?php

    $meta = x_get_taxonomy_meta();
    $title = ( $meta[‘archive-title’] != ” ) ? $meta[‘archive-title’] : __( ‘Category Archive’, ‘__x__’ );
    $subtitle = ( $meta[‘archive-subtitle’] != ” ) ? $meta[‘archive-subtitle’] : __( “Below you’ll find a list of all posts that have been categorized as “, ‘__x__’ ) . ‘“’ . single_cat_title( ”, false ) . ‘”‘;

    ?>

    <header class=”x-header-landmark x-container max width”>
    <h1 class=”h-landmark”><span><?php echo $title ?></span></h1>
    <p class=”p-landmark-sub”><span><?php echo $subtitle ?></span></p>
    </header>

  • <script> jQuery(function($){ $("#no-reply-1252244 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>