Home Forums Fusion Date format issues & sidebar on single post template

This topic contains 5 replies, has 2 voices, and was last updated by  emzeth 1 week ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #47469

    emzeth
    Participant

    Hi, I have 2 questions

    1. how to set fusion default date format. regular format is date-month-year (30-December-2017), but in your theme, it’s more like monthnumber-month-year (12-December-2017).

    how to change fusion_default_date_format. Btw I can solve this with edit every single php template from fusion_default_date_format() to <?php the_date(); ?>. but is there any solution so I don’t have to edit manually? just edit fusion default date format…

    2. I want in every single blog post shows sidebar, right now, your default theme just an archive, category, and tag that provide sidebar. how to make sidebar appears on blog post? thank you…

    #47470

    Joshua
    Keymaster

    1. We’ve corrected the date format in the upcoming version. You’ll also be able to override the format by adding the fusion_default_date_format to your child theme in the next version like so:

    fusion_default_date_format() {
      return 'j F, Y';
    }

    See here for a full list of date options- https://codex.wordpress.org/Formatting_Date_and_Time

    2. Are you trying to change the widgets in the sidebar style single post? Or are you wanting to add a sidebar to a style that doesn’t include a sidebar?

    #47472

    emzeth
    Participant

    Thank’s a lot…

    Actually, I want to add a sidebar to a style that doesn’t include a sidebar. I want to add sidebar on “card style-single post” in particular. but if it’s not possible, its not a big deal…

    #47473

    emzeth
    Participant
    fusion_default_date_format() {
      return 'j F, Y';
    }

    where should I input this code?

    #47477

    Joshua
    Keymaster

    It is possible to add a sidebar, but you’ll have to override in your child theme. You may also need to tweak the columns to get the exact style you want.

    Adding this to your child theme’s template-parts/post/single-card.php file will override the parent style and add a sidebar:

    <div class="page-header inverse text-center" style="background-image: url('<?php the_post_thumbnail_url('full'); ?>');">
    	<div class="container">
    		<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
    		<?php get_template_part('template-parts/post/meta'); ?>
    	</div>
    
    </div>
    
    <div class="container">
    	<div class="card card-main">
    		<div class="card-block">
    			<div class="row">
    				<div class="col-md-3">
    					<?php get_sidebar(); ?>
    				</div>
    				<div class="col-md-8 offset-md-1">
    					<div class="entry-content">
    						<?php the_content(); ?>
    					</div>
    					<?php _s_page_links(); ?>
    					<?php if ( get_the_tags() || _s_is_elementor_active() ): ?>
    						<footer>
    							<div class="row">
    								<div class="col-md-6">
    									<div class="tags">
    										<?php the_tags('', '', ''); ?>
    									</div>
    								</div>
    								<div class="col-md-6">
    									<?php echo _s_social_share(get_the_ID(), get_the_title()); ?>
    								</div>
    							</div>
    						</footer>
    					<?php endif; ?>
    				</div>
    			</div>
    		</div>
    	</div>
    	<div class="post-nav-container">
    		<?php _s_post_navigation(); ?>
    	</div>
    	<?php if ( comments_open() || get_comments_number() ) : ?>
    		<div class="card">
    			<div class="card-block">
    				<div class="col-md-8 offset-md-2">
    					<?php
    						comments_template();
    					?>
    				</div>
    			</div>
    		</div>
    	<?php endif; ?>
    </div>

    As for that function, you’ll add it to your child theme’s functions.php file. You only need to do that if you want to change the date format as the new version’s day of the month is fixed. Either way you’ll need to upgrade to version 1.3.27 for this to work.

    #47497

    emzeth
    Participant

    Okay thanks

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

You must be logged in to reply to this topic.