Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1192578
    Michelle T
    Participant

    It’s not showing up when I add it in cornerstone. http://altainstitute.org/blog/

    #1192617
    Thai
    Moderator

    Hi There,

    Please add the following code under functions.php file locates in your child theme:

    add_action( 'x_before_view_global__index', 'print_blog_image' );
    function print_blog_image(){
    	if(is_home()){
    		?>
    		<div class="x-section">
    			<div class="x-container">
    				<img src="http://placehold.it/1300x350">
    			</div>
    		</div>
    		<?php
    	}
    }

    Hope it helps 🙂

    #1193055
    Michelle T
    Participant

    How don’t have a child theme set up. Anyway to do it without?

    #1193387
    Prasant Rai
    Moderator

    Hello Michelle,

    Thanks for writing in!

    A child theme is a WordPress theme that inherits its functionality from parent theme. In that regards we always recommend our customer to setup child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

    Thanks.

    #1194250
    Michelle T
    Participant

    Thanks! I got the child theme set up and excited how easy set up was. I installed the code. Not sure if this was an issue before or not, but now when I go to http://altainstitute.org/blog/ and I go to edit in cornerstone, none of the editor features or the left handed bar shows up. I have gone into text and visual tabs and have deleted all the code. but I still have this grey image box that I can’t get rid of and no way to edit the page.

    #1194251
    Michelle T
    Participant
    This reply has been marked as private.
    #1194388
    Rupok
    Member

    Hi there,

    It seems you are referring the placeholder image as “gray image box”. You need to change the image path http://placehold.it/1300x350 with your own uploaded image path that you want to use.

    Hope this makes sense.

    #1198958
    Michelle T
    Participant

    Unfortunately, I can’t edit anything. See my attachments. Cornerstone is not available for some reason on this page. Nor can I edit it another way. All editors are missing. Please help! Thanks!

    #1199069
    Christopher
    Moderator

    Hi there,

    Blog page is not editable and its content generates automatically base on number of posts.

    Thanks.

    #1200541
    Michelle T
    Participant

    I used to be able to edit it. I at least need to get that empty image off. Can you please remove it for me with the login info above?

    #1200671
    Joao
    Moderator

    Hi Michelle.

    This is the image you hard coded by adding the code provided by Thai:

    add_action( 'x_before_view_global__index', 'print_blog_image' );
    function print_blog_image(){
    	if(is_home()){
    		?>
    		<div class="x-section">
    			<div class="x-container">
    				<img src="http://placehold.it/1300x350">
    			</div>
    		</div>
    		<?php
    	}
    }

    As you can see there is an url inside the code http://placehold.it/1300x350n this is where you should place the URL of the image you want to show, if you want to remove this, simply remove the code you have added.

    Hope it helps

    Joao

    #1203588
    Michelle T
    Participant

    Cool! I got the image in there. Thanks for the explaination. Now I just need to know how to center the image? I tried putting align=”middle” after the source, but that didn’t work. Thanks!

    #1203624
    Joao
    Moderator

    Hi There,.

    Please add the following code to Appereance > Customizer > Custom > CSS

    .blog .x-main.full {
        text-align: center;
    }
    

    Hope that helps,

    Joao

    #1203902
    Michelle T
    Participant

    Thank you kindly! Worked like a charm. 🙂

    #1204115
    Jade
    Moderator

    You’re welcome Michelle.

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