Home Forums WoodMart support forum Featured image in pages?

Featured image in pages?

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #53857

    MoeMauphie
    Participant

    Hi 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

    #53865

    Hello,

    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

    #53868

    MoeMauphie
    Participant

    But the featured image is visible in the default theme. It seems like a problem in your theme.

    Regards,
    Moe

    #53889

    Artem Temos
    Keymaster

    Yes, 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.

    #53904

    MoeMauphie
    Participant

    It’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,
    Moe

    #53909

    Artem Temos
    Keymaster

    We can give you a simple instruction how to display it on frontend if you need this feature.

    #53913

    MoeMauphie
    Participant

    Yes, 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,

    #53932

    Artem Temos
    Keymaster

    Try 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(); ?>
    #53969

    MoeMauphie
    Participant

    Thanks 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.
    #53975

    MoeMauphie
    Participant

    A 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/راهنمای-انتخاب-کفش-تنیس/

    #54000

    Artem Temos
    Keymaster

    1. 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”.

    #54015

    MoeMauphie
    Participant

    Thanks, have you fixed title tags in the version you just released?

    Regards

    #54016

    Artem Temos
    Keymaster

    Yes, this issue is fixed in our 2.3 update. Don’t forget to clear the browser cache after the update.

    #54469

    MoeMauphie
    Participant

    Are you sure title tags are now responsive in pages? Please check this page:
    https://tennisfa.com/shop/راهنمای-انتخاب-کفش-تنیس/

    #54471

    Artem Temos
    Keymaster

    Sorry, 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.

    #54476

    MoeMauphie
    Participant

    I 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,

    #54489

    Bogdan Donovan
    Keymaster

    Hi,

    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

    #55133

    MoeMauphie
    Participant

    Thanks 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.
    #55140

    Artem Temos
    Keymaster

    Hi,

    Try to use this code instead

    <?php woodmart_breadcrumbs(); ?>

Viewing 19 posts - 1 through 19 (of 19 total)