Home / Forums / DynamiX Support / Modifying the blog post page excerpt read more and insert the author?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts

  • sethdotterer_sc
    Participant

    I’m trying to modify posts list out in the blog template. I’m using a child theme and a custom template for the blog.

    Two things I’d like to mofify:

    1) I want to change the excerpt so that Read More is on another line without the ellipses. In my child theme functions file I tried to remove your filter and add my own but it’s not working:

    function remove_parent_filters(){ //Have to do it after theme setup, because child theme functions are loaded first
        remove_filter('excerpt_more', 'new_excerpt_more' );
    }
    add_action( 'after_setup_theme', 'remove_parent_filters' );
    
    add_filter('excerpt_more', 'my_new_excerpt_more' );
    			
    			function my_new_excerpt_more($more)
    			{
    				global $post;
    				return '<p><a class="excerpt-readmore" href="'. get_permalink($post->ID) . '">' . __( 'Read More', 'themeva' )  . '</a></p>';
    			}	
    

    2) I would like the blog listing to include the author’s name just under the title.

    Here’s what I have so far:

    News and Press

    Hi @ sethdotterer_sc

    There is no need to change the theme’s functions. You can use CSS so that ‘Read More’ goes to another line (plus right-aligned).

    Use this CSS:

    .excerpt-readmore {
        display: block;
        margin-top: 20px;
        float: right;
        font-weight: 600;
    }

    To show the author, you just need to enable ‘Show Author Bio’ first under Theme Options > General then set ‘Display Post Metadata’ and ‘Post Metadata Align’ .

    Thanks!

    Thanks


    sethdotterer_sc
    Participant

    This helped but it displays the author with the other meta data (which I don’t really want) below the post and image. Or if I choose left align it creates another column which I also don’t want.

    Trying to get just the author right below the title.

    Any good way to do this?

    What I’d really like to do is just set up the blog format exactly how I like:

    left image in own column then another column with title on one line then author on another then a shorter except.

    Is there any way to customize the layout? I tried using the posts grid but it was a bit of a disaster and I’d rather hack at the actual blog posts format.

    Thanks


    sethdotterer_sc
    Participant

    Here is what I’m looking to achieve:

    Blog Layout

    You can hide the other metadate via CSS, as well. Use this CSS:

    .post-date {
        display: none;
    }
    
    .comments-list{
        display: none;
    }

    The mockup that you sent is definitely possible, but this will require a lot of work , so it is best to hire a developer to help you with it.

    Regards


    sethdotterer_sc
    Participant

    My question is where should I be looking for the files to modify that control the blog layout.

    I’m very comfortable modifying PHP, HTML and CSS. I just want to do it in a way that changes won’t get wiped out in next theme update.

    I have a child theme set up and have already modified the blog page extensively. However a lot of the actual content is controlled by includes.

    Any pointers in the right direction would be much appreciated

    The blog layout is controlled by blog.php and all the functions for it are inside functions.php. The classes should be insider lib/inc/classes.

    Thanks!

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

You must be logged in to reply to this topic.