Adding an image to a preset demo theme?

Hi everyone,

So I haven’t made a website in years and have decided to give wordpress and the X-theme a shot and I have to say it really is incredible. I’m stuck at the moment trying to figure out how to add an image to the right hand side of this feature template. I’m using the renew 8 theme if that matters at all.

What I would like to do: https://www.screencast.com/t/jxioPRcz33tn

As you can see from the above screen shot I would like to be able to put an image within the red square but I haven’t figured out a way to manipulate the code to do so. If someone can kindly point me towards where I can find the code or if someone can come up with a quick and easy way to do so please let me know!!

Thanks

Hi tgtonyak,

Please install a child theme so any changes you do make do not affect the core x theme as when you go to update you will remove any files you have edited.

Now that that is out of the way you will need to add a file to the root child theme folder E.G. my-template.php

In this file add the below:

<?php

// =============================================================================
// TEMPLATE NAME: YOUR THEME NAME
// -----------------------------------------------------------------------------
// Handles output of content left, sidebar right pages.
//
// Content is output based on which Stack has been selected in the Customizer.
// To view and/or edit the markup of your Stack's index, first go to "views"
// inside the "framework" subdirectory. Once inside, find your Stack's folder
// and look for a file called "template-layout-content-sidebar.php," where
// you'll be able to find the appropriate output.
// =============================================================================

?>

<?php get_header(); ?>

  <div class="x-container max width offset">
    <div class="x-main left" role="main">

      <?php while ( have_posts() ) : the_post(); ?>
        <?php x_get_view( 'renew', 'content', 'page' ); ?>
      <?php endwhile; ?>
    </div>
		<aside class="x-sidebar right" role="complementary">

   		</aside>
  </div>

<?php get_footer(); ?>

You have just uploaded a custom theme template file which you can select on the page templates in the page options. Place any custom content you want in the <aside> </aside>

Kindest regards,

Samuel Rose.

Hi Samuel,

Thank you for your post. I have attempted to post several times leading up to this question but every time I did I ended up solving the issue. I have successfully installed a child-theme and activated it. I have also created a “my-template.php” and entered the code as you have previously provided. I then navigated to “Pages” in the main wordpress dashboard and selected the newly created template but my image is not showing up. I believe I am doing something wrong. How would I go about uploading an image inside the 2 aside tags if my images are within a directory called “Images” in my child-theme main directory. I know this seems very basic but like I said, I haven’t touched web-dev in a very long time!

Thanks so much!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.