Tagged: x
-
AuthorPosts
-
November 10, 2016 at 2:32 pm #1252244
SabaconParticipantHi
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
November 10, 2016 at 9:41 pm #1252718
DarshanaModeratorHi 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.
November 10, 2016 at 11:00 pm #1252799
SabaconParticipantSabacon.net
November 11, 2016 at 1:50 am #1252939
FriechModeratorHi 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!
November 11, 2016 at 11:27 pm #1254192
SabaconParticipantI will try this tomorrow.
G
November 12, 2016 at 12:03 am #1254217
Rue NelModeratorSure no problem.
If you need anything else we can help you with, please let us know.November 12, 2016 at 10:54 am #1254500
SabaconParticipantHi 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
November 12, 2016 at 6:32 pm #1254746
Rue NelModeratorHello 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.
November 12, 2016 at 7:11 pm #1254834
SabaconParticipantI 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
November 13, 2016 at 1:52 am #1254999
Rue NelModeratorHello 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.
November 13, 2016 at 8:45 am #1255224
SabaconParticipantI 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?
November 13, 2016 at 9:30 am #1255267
ChristianModeratorHey 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.
November 14, 2016 at 6:27 pm #1257171
SabaconParticipantHi 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
November 15, 2016 at 1:33 am #1257578
Paul RModeratorHi,
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>“' . single_cat_title( '', false ) . '”</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.
November 15, 2016 at 11:36 am #1258229
SabaconParticipantIt 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> -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1252244 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
