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

    hi guys, is there a way to have the full width banner / slider shown on a per category basis? or based on page parent so that all child pages would share same slider / featured image?

    Thanks!

    #427408

    Hey!

    As far as i know, Pages can not be categorised by default. Can you post a link to your website so we can get a better context?

    Cheers!
    Josue

    #427563
    This reply has been marked as private.
    #428163

    Hey!

    Yeah, you’re correct. This will require custom modifications. You can edit loop-index.php file manually if you want to add a slider or an image inside a post within a certain category. Use the has_category function. https://codex.wordpress.org/Function_Reference/has_category

    The code will look something like this:

    if(has_category('video')) {
    // Video slider here 
    } 
    elseif(has_category('image')) {
    // Image slider here 
    } else {
    // Else slider here	
    }

    Regards,
    Ismael

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