Home › Forums › WoodMart support forum › Featured image in pages?
Featured image in pages?
- This topic has 18 replies, 4 voices, and was last updated 6 years, 10 months ago by
Artem Temos.
-
AuthorPosts
-
April 22, 2018 at 5:20 pm #53857
MoeMauphieParticipantHi there,
Are featured images not supposed to be displayed in pages (not posts)? I created a page and assigned a featured image but it is not visible on the frontend.
Thanks
April 22, 2018 at 6:11 pm #53865
Elise NoromitMemberHello,
No, they are not visible on the page by default. Page feature image is used when you share your page in the social networks.
If you want to add an image inside the page use Add Media option in the page editing mode.
Best Regards
April 22, 2018 at 6:20 pm #53868
MoeMauphieParticipantBut the featured image is visible in the default theme. It seems like a problem in your theme.
Regards,
MoeApril 23, 2018 at 6:15 am #53889
Artem TemosKeymasterYes, we didn’t display the featured image on our pages template. If you want, you can easily add it using WPBakery page builder as a Single Image element.
April 23, 2018 at 6:31 am #53904
MoeMauphieParticipantIt’s weird that we don’t have it by default like most themes out there, instead of removing it you could add a checkbox “hide featured image on frontend”
I think that would be great to add a classic template for pages in your future updates, for those who like me prefer a classic layout for pages.
BTW, you have never taken my feature requests into account, maybe this one draws your attention. 🙂
Regards,
MoeApril 23, 2018 at 6:41 am #53909
Artem TemosKeymasterWe can give you a simple instruction how to display it on frontend if you need this feature.
April 23, 2018 at 7:13 am #53913
MoeMauphieParticipantYes, I also need the page title to be underneath the featured image, like a blog post. Could you please give a template so I can put it in my child theme?
Thanks a lot,
April 23, 2018 at 9:15 am #53932
Artem TemosKeymasterTry to create a page.php file in the child theme
<?php get_header(); $content_class = woodmart_get_content_class(); ?> <div class="site-content <?php echo esc_attr( $content_class ); ?>" role="main"> <?php /* The loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="entry-content"> <p><?php the_post_thumbnail(); ?></p> <h3 class="entry-title"><?php the_title(); ?></h3> <?php the_content(); ?> <?php wp_link_pages(); ?> </div> <?php woodmart_entry_meta(); ?> </article><!-- #post --> <?php if ( woodmart_get_opt('page_comments') && (comments_open() || get_comments_number()) ) : comments_template(); endif; ?> <?php endwhile; ?> </div><!-- .site-content --> <?php get_sidebar(); ?> <?php get_footer(); ?>
April 23, 2018 at 11:33 am #53969
MoeMauphieParticipantThanks for your help. It worked. But there are still some problems with post template and page template.
1. Title tags (h1, h2, h3,…)
The sizes of the title tags don’t change responsively. When we use these tags inline with no associated class, they need to be responsive to look pretty across all platforms. We need some standard css codes for them.2. “Blog Element” in WPbakery only works with posts, while it’s indicated that we can also choose “pages” by titles.(please see the attached)
3. Product (Grid or Carousel) Element style is a mess when you use it within a post, and it is also the case with Button Element. (please see the attached)
Attachments:
You must be logged in to view attached files.April 23, 2018 at 11:40 am #53975
MoeMauphieParticipantA sample post: https://tennisfa.com/shop/2018/04/22/صفحه-ای-برای-تست-پست/
(As you can see the post body is “text-align: left” and it needs to be fixed too for RTL languages)
A sample page:
https://tennisfa.com/shop/راهنمای-انتخاب-کفش-تنیس/April 23, 2018 at 12:19 pm #54000
Artem TemosKeymaster1. This issue will be fixed in our next theme update that will be released soon.
2. Sorry, but this element works for blog posts only.
3. Try to change the post format to standard, not “link”.
April 23, 2018 at 1:17 pm #54015
MoeMauphieParticipantThanks, have you fixed title tags in the version you just released?
Regards
April 23, 2018 at 1:23 pm #54016
Artem TemosKeymasterYes, this issue is fixed in our 2.3 update. Don’t forget to clear the browser cache after the update.
April 25, 2018 at 9:09 am #54469
MoeMauphieParticipantAre you sure title tags are now responsive in pages? Please check this page:
https://tennisfa.com/shop/راهنمای-انتخاب-کفش-تنیس/April 25, 2018 at 9:13 am #54471
Artem TemosKeymasterSorry, we confused the first issue with this problem https://gyazo.com/a9730a2c5f0dd5e8e09405300de4f199
Could you please explain what titles and what sizes do you want to change on mobile devices? Actually, if you will use our theme WPBakery title it is already responsive. We didn’t touch default HTML headings tags to not break any other plugins styles.
April 25, 2018 at 9:21 am #54476
MoeMauphieParticipantI think these titles should be responsive (h2 to h6) as they are in other themes.
The main h1 with class “entry-title” is not also responsive and on mobiles.As you know if you limit title tags css to page/post body, they don’t break other plugins too.
Regards,
April 25, 2018 at 9:56 am #54489
Bogdan DonovanKeymasterHi,
Try to use this snippet
@media (max-width: 768px) { .page .entry-title, .page h1{ font-size: 22px; } .page h2 { font-size: 20px; } .page h3 { font-size: 18px; } .page h4 { font-size: 16px; } .page h5 { font-size: 14px; } .page h6 { font-size: 12px; } }
Regards
April 28, 2018 at 8:06 am #55133
MoeMauphieParticipantThanks a lot for your help,
Since I need to use “Blog” element in WPBakery and you said it only works with posts and not pages, I’m trying to modify post template to suit my needs.
In order to that, I created a content.php in my child theme and I managed to put the page title underneath the image, the only thing that I was not able to move is breadcrumbs that I want to put it where you see in the attached image. I tried to use the following code which I took from template-tags.php in content.php, but it doesn’t print anything. Could you please help me with that?
<?php if( $breadcrumbs && !is_search() ) woodmart_breadcrumbs(); ?>
Attachments:
You must be logged in to view attached files.April 28, 2018 at 8:19 am #55140
Artem TemosKeymasterHi,
Try to use this code instead
<?php woodmart_breadcrumbs(); ?>
-
AuthorPosts
- You must be logged in to create new topics. Login / Register