Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #313589

    Hi, Is there a way that I can show a category featured image here, instead of the featured image from the latest post in that category?
    Current work design for blog

    This is what I’ve done so far:

    Layout Element
    1/3 column

    Text Block element
    Spiritual Living linking to …category/spiritual-living/

    Contact Element
    Post Slider
    Which Entries? > Category: Spiritual Living
    Columns > 1
    Title and Excerpt > Title and Excerpt
    Preview Image Size > Set the preview image size automatically based on column…
    Autorotation active > No
    Custom Css Class > Blank

    Here’s the code:

    [av_one_third first]
    [av_textblock]
    <p class="category-head"><a title="Spiritual Living" href="http://lifestyle.innerpath.org/category/spiritual-living/">Spiritual Living</a></p>
    [/av_textblock]
    
    [av_postslider link='category,28' columns='1' items='1' offset='0' contents='excerpt' preview_mode='auto' image_size='portfolio' autoplay='no' interval='5']
    [/av_one_third]
    • This topic was modified 10 years, 3 months ago by Jagrav. Reason: Trying to get code section to display correctly
    #313775

    Hey Jagrav!

    Thank you for using Enfold.

    I’m sorry but you will have to modify the core theme files if you want to show the category image. The easiest way is to insert column layouts then add an Image element for each category. Link the category images on the category pages.

    Best regards,
    Ismael

    #395997

    Hope this helps:

    [1] Create a new custom widget area
    WP Admin: Appearance > Widgets > Custom Widget Area >

    Spiritual Living > Click Add Widget button

    Add PHP widget to the newly created Widget Area:

    			<?php
    				// Shows recent post from category ID 28
    				yourcompany_posts_in_category( 28 );
    			?>

    [2] Custom Blog page
    WP Admin: Pages > Your Custom Blog

    Avia Layout Builder code:

    [av_one_third first]
    [av_textblock size='' font_color='' color='' custom_class='']
    <a title="Spiritual Living" href="http://yourwebsite.com/category/spiritual-living/">Spiritual Living</a>
    [/av_textblock]
    
    [av_image src='http://yourwebsite.com/wp-content/uploads/sites/3/2014/03/category-image.jpg' attachment='381' attachment_size='full' align='center' animation='no-animation' link='manually,http://yourwebsite.com/category/spiritual-living/' target='' styling='' caption='' font_size='' appearance='' custom_class='category-image'][/av_image]
    
    [av_sidebar widget_area='Category Spiritual Living']
    [/av_one_third]
    #396270

    Hi!

    thanks a lot for sharing!

    Regards,
    Andy

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