Okay
  Public Ticket #2207917
"Read more" link - Portfolio items
Closed

Comments

  •  2
    Anna started the conversation

    Hi,

    I would like to add a "read more" link for each portfolio item. Is it possible?

    Thanks in advance.

  •  510
    Arlind replied

    Hi Anna,

    Can you tell me which portfolio layout are you using:

    medium
    (view large image)

    And where do you want to place the read more link so I can help you with that.

    Kind regards,
    Arlind


      Documentation        Follow on Envato         Like on Facebook

  •  2
    Anna replied

    Hi Arlind,

    I'm using "Titles inside".
    I would like to add the link after categories as shown on the attached image (red).

    Thanks!
    Anna

    Attached files:  portfolio-item.jpg

  •  510
    Arlind replied

    You can add the following code in functions.php:

    add_action( 'kalium_portfolio_loop_item_categories_before', function() {
        global $post;
        echo sprintf( '<a href="%s" class="view-project-link">View project</a>', get_permalink( $post ) );
    } );

    Then style the .view-project-link with Custom CSS.

    Kind regards,
    Arlind


      Documentation        Follow on Envato         Like on Facebook

  •  2
    Anna replied

    Hi Arlind,

    Can it be rendered after the post's categories? (After <p class="terms">...</p>)

    Thanks!

  •  510
    Arlind replied

    Hi Anna,

    You can assign the hook to another tag: kalium_portfolio_loop_item_categories_after so it will look like:

    add_action( 'kalium_portfolio_loop_item_categories_after', function() {
        global $post;
        echo sprintf( '<a href="%s" class="view-project-link">View project</a>', get_permalink( $post ) );
    } );
    
    However, this hook is not implemented in current version, so I am sending you the updated version of file that includes this hook and will be included in future updates of Kalium, but for now you can use it as an early update:

    Download this file and replace it in this directory (of the theme): /kalium/tpls/

    I hope this works fine for you.

    Kind regards,
    Arlind


      Documentation        Follow on Envato         Like on Facebook

  •  2
    Anna replied

    Yes, it worked! Thank you so much! :)

    Kind regards,

    Anna

  •  510
    Arlind replied

    I'm very happy to hear thatsmile.png

    I wish you have an amazing weekend!

    P.S: If you like the theme, it would help us a lot if you could give us a five-star rating on Themeforest from your Downloads tab.

    A huge thank you from me and Laborator in advance <3

    Kind regards,
    Arlind


      Documentation        Follow on Envato         Like on Facebook