Siobhan Bamber (siobhyb) on "[Theme: Sela] Adding a featured image to blog page"

ساخت وبلاگ

Hi there!

Nice work customising Sela so far. :) Your illustrations are awesome!

It is possible to achieve what you're after but will require you to experiment a little with the theme's HTML.

The first step is for you to set up a child theme.

In case you're unsure, the following guides provide a good introduction to child themes, including steps to set one up:

After you have completed that step, copy the parent's index.php file to your child theme's directory and then open it in your favourite text/code editor.

Locate the following code in that file:

get_header(); ?>

We're going to place the code for your image just below that:

<div class="hero"> <div class="entry-thumbnail"> <img width="1180" height="435" src="http://i0.wp.com/sarah-anne-davis.com/wp-content/uploads/2016/08/featuredimage.jpg?resize=1180%2C435" class="attachment-sela-page-thumbnail size-sela-page-thumbnail wp-post-image" alt="featuredimage"> </div>
</div>

Save your changes when you're done.

The final step is to add the following to your theme's style.css file in order to make sure your blog page's styling stays consistent with the rest of your site's pages:

.blog #content { padding: 0;
}
.blog #primary { padding: 3em 0 3em 55px;
}
.blog #secondary { padding: 3em 55px 3em 0;
}

Let me know how you get on with that! I'll be happy to help with any questions that may come up along the way, also.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 331 تاريخ : سه شنبه 19 مرداد 1395 ساعت: 0:27