Modern Portfolio not show blog post dates

Community Forums Forums General Discussion Modern Portfolio not show blog post dates

This topic is: not resolved

This topic contains 11 replies, has 4 voices, and was last updated by  kworthington 7 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #95164

    kworthington
    Participant
    Post count: 17

    Hello!

    We are using the Modern Portfolio theme. The blog posts are not showing dates on the Blog page, nor the single blog post pages. I don’t see an option to add it anywhere. Is there some custom code I can add to functions.php to add this functionality?

    Thanks.

    #95165

    Sridhar Katakam
    Participant
    Post count: 1048
    #95190

    kworthington
    Participant
    Post count: 17
    #95242

    Sridhar Katakam
    Participant
    Post count: 1048

    Can you elaborate on your blog page setup? Do you have it set in Settings > Reading?

    Have you tried deactivating all plugins and seeing if it makes a difference?

    Are you using any custom template files?


    #95346

    kworthington
    Participant
    Post count: 17

    Thanks for your replies.

    In Settings > Reading, I have the “A static page (select below)” radio button selected: Home as the Front Page, and “Blog” as the Posts Page.

    I deactivated all plugins. It did not have any effect on showing the dates for posts.

    I am not using any custom templates.

    Any other ideas? I have already run out of ideas myself.

    #96278

    neilgee
    Member
    Post count: 122

    does this work in functions.php

    /** Customise the post-meta info function */
    add_filter( 'genesis_post_info', 'genesischild_post_info' );
     
    function genesischild_post_info($post_info) {
        if (!is_page()) {
        $post_info = 'Posted on [post_date] [post_comments] [post_edit]';
        return $post_info;
        }
    }

    Neil Gee
    Coolest Guides

    #96286

    kworthington
    Participant
    Post count: 17

    Thanks for the reply, but that didn’t add the dates. URL: http://tracyguarino.com/tracy-guarino-new-ceo-forcex-inc/ … for example…

    #96292

    neilgee
    Member
    Post count: 122

    does it work without the conditional…

    function genesischild_post_info($post_info) {
    		$post_info = 'Posted  on [post_date]  [post_comments] [post_edit]';
    		return $post_info;
    		}
    add_filter( 'genesis_post_info', 'genesischild_post_info' );

    Neil Gee
    Coolest Guides

    #96293

    kworthington
    Participant
    Post count: 17

    No, it still does not show up, even without the conditional.

    #96347

    AC
    Blocked
    Post count: 7712

    Not sure if this is the cause – but I ran the CSS through the W3C validator and it caught this –> You have two of these /* and only one of these */

    #title a::before {
    	/*
    	background: url('http://tracyguarino.com/wp-content/uploads/2013/08/tg-276x300.png') no-repeat center left;
    	display: inline-block;
    	height:75px;
    	margin-right: 16px;
    	margin-right: 1rem;
    	padding: 3px 4px;
    	padding: 0.1875rem 0.25rem;
    	text-align: center;
    	width:69;
    	/*	
    	background-color: #FBC926;
    	border-radius: 50%;
    	color: #fff;
    	content: "TG"; /* Used to display the letter in the header logo */
    	cursor: pointer;
    	display: inline-block;
    	height: 70px;
    	line-height: 2.1;
    	margin-right: 16px;
    	margin-right: 1rem;
    	padding: 3px 4px;
    	padding: 0.1875rem 0.25rem;
    	text-align: center;
    	width: 70px;
    	*/
    }

    I am using this theme on a client – you are using the NON-Html version like I am. The post info is coming through fine for me.

    Do you have the Genesis Simple Edits plugin installed? It looks like you’ve modified the footer and you could have also modified the post-info section.

    #96391

    kworthington
    Participant
    Post count: 17

    Thanks for the reply. Those ideas did not work for me, though I did fix my CSS, so thanks for that.

    I had this in my functions.php:

    remove_action( ‘genesis_before_post_content’, ‘genesis_post_info’ );

    The above removes the date of the post and the “Leave a Comment” link. We want that link gone, but we want to leave the date. Any ideas?

    #96393

    kworthington
    Participant
    Post count: 17

    Please disregard. I got it.

    The effect of uncommenting:
    remove_action( ‘genesis_before_post_content’, ‘genesis_post_info’ );

    and adding:

    function genesischild_post_info($post_info) {
    $post_info = ‘Posted on [post_date]‘;
    return $post_info;
    }
    add_filter( ‘genesis_post_info’, ‘genesischild_post_info’ );

    Makes it just show the date. Thanks everyone for your help. I really appreciate it.

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

You must be logged in to reply to this topic.