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 1 year, 6 months ago.

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

    notfarnow
    Participant

    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

    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 &#8216;<a>&#8216;;
    		echo get_the_post_thumbnail($thumbnail-&gt;ID, &#8216;portfolio&#8217; );
    		echo &#8216;</a>&#8216;;
    		echo &#8216;&lt;/div&gt;';
    	}
    }
    

    To this:

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

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

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


    #52734

    braddalton
    Participant

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

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


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

You must be logged in to reply to this topic.