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

    Good day. I have purchased your theme over 10 times for my clients. Best theme ever. I have 2 questions I can hope you can help with.

    #1) I would like to add the category name to the masonry blog main page like on this page:

    So under the title for each blog post on the main blog page, I want the category name to be appear. For example, in the URL above, I want the category name to appear under “New electric cars are getting really fast” and “Cryptocurrencies are booming” and so on. For all the blog posts.

    I know that section already has the title, excerpt, and date. But now I want it to show category name under the title.

    Is that possible? I also want to style it, like maybe change the color. But I can do that myself with CSS. From you I need the ability to add it before I can style it.

    #2) Also on the Masonry Blog main page, one of the filters says “All”. Where can I change that text? I would like it to say “All Articles”

    Thank you!

    • This topic was modified 7 years, 2 months ago by santanin.
    #863217

    Hey santanin,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Best regards,
    John Torvik

    #863459
    This reply has been marked as private.
    #863983

    Hi santanin,

    Please refer to this thread for a possible solution.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #864052

    Hello. I read through that thread and do not understand. Which of my 2 issues will that help? And what exactly do I do? I need to replace the value of the “is_page” function and the slug value for “whats-new”?? What do I replace it with?

    #864945

    Hi I replied to you 3 days ago but no response. Please help and why no respond? Please respond and help. Thank you to you.

    #865056

    Hi,

    I’m sorry for the late response. Please add this filter in the functions.php file.

    add_filter( 'avf_masonry_loop_prepare', 'avf_masonry_loop_prepare_mod_cat', 10, 2 );
    function avf_masonry_loop_prepare_mod_cat( $key, $entries )
    {
        $categories = get_the_category($key['ID']);
        $separator = ' ';
        $output = '
    <div class="ww-masonry-cat">';
    	    if ( ! empty( $categories ) ) {
    	        foreach( $categories as $category ) {
    				if($category->slug == "whats-new" && is_page(13)) {
    					$output .= '<span alt="' . esc_attr( sprintf( __( 'View all posts in %s', 'textdomain' ), $category->name ) ) . '">' . esc_html( $category->name ) . '</span>' . $separator;
    				} else {
    					$output .= '<span alt="' . esc_attr( sprintf( __( 'View all posts in %s', 'textdomain' ), $category->name ) ) . '">' . esc_html( $category->name ) . '</span>' . $separator;
    				}
    	        }
    	    }
    	 $output .= '</div>
    ';
    
        $key['text_before'] .= trim( $output, $separator );
        return $key;
    }

    You can also try the following solution if the filter above is not working: https://kriesi.at/support/topic/display-the-post-category-above-the-title-in-masonry-view/#post-660247

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.