Move Title Below Image Executive Portfolio Archive

Community Forums Forums Design Tips and Tricks Move Title Below Image Executive Portfolio Archive

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  braddalton 8 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #52646

    notfarnow
    Participant
    Post count: 16

    Hi, how can I move the title of the portfolio image archive beneath the featured image in the executive portfolio archive?

    http://demo.studiopress.com/executive/portfolio/

    I’d like to move the title beneath the image.
    ALSO, Can I add some text here? Like a portion of the post content?

    Thanks!

    http://demo.studiopress.com/executive/portfolio/
    #52733

    braddalton
    Participant
    Post count: 7454

    On line 22 of your child themes arcgive-portfolio.php file, change this code

    /** Add the featured image after post title */
    add_action( 'genesis_post_title', 'executive_portfolio_grid' );
    function executive_portfolio_grid() {
    	if ( has_post_thumbnail() ){
    		echo '<div class="portfolio-featured-image">';
    		echo '<a>';
    		echo get_the_post_thumbnail($thumbnail->ID, 'portfolio' );
    		echo '</a>';
    		echo '</div>';
    	}
    }
    

    To this:

    /** Add the featured image after post title */
    add_action( 'genesis_before_post_title', 'executive_portfolio_grid' );
    function executive_portfolio_grid() {
    	if ( has_post_thumbnail() ){
    		echo '<div class="portfolio-featured-image">';
    		echo '<a>';
    		echo get_the_post_thumbnail($thumbnail->ID, 'portfolio' );
    		echo '</a>';
    		echo '</div>';
    	}
    }
    

    You can also display the excerpt using this code instead of the code above.

    https://gist.github.com/braddalton/6093801


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #52734

    braddalton
    Participant
    Post count: 7454

    You can also customize the excerpt length by placing this code in your archive-portfolio.php file.

    https://gist.github.com/braddalton/6093884


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

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

You must be logged in to reply to this topic.