[Resolved] Change post title according to the color background of image

Home Forums Support [Resolved] Change post title according to the color background of image

Home Forums Support Change post title according to the color background of image

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

    Dear Sir/Madam,

    I know how to use the Element, I like using the Header type of element, I will use the featured image of the page/post as the default background image to the Element but also preset the fallback image.

    If I use a light colour image as a background, then I set the page title in dark, otherwise dark colour background image with white colour. I can create two elements and preset the fallback image with light and dark and then assign the rules with specific page/post but it is too time-consuming if I frequently write the blog. Does GP have smarter solution that I can simply select from page/post attribute or custom field and then GP will use the correct element?

    Best regards,

    Kelvin.

    #917563
    David
    Staff
    Customer Support

    Hi there,

    the easiest way to do this would be to use the Post Category display rule, then simply select the required category for each post.

    To add categories to Pages for this purpose you can add this PHP Snippet:

    function add_categories_to_pages() {
        register_taxonomy_for_object_type( 'category', 'page' );
    }
    add_action( 'init', 'add_categories_to_pages' );
    #917567
    Kelvin

    Dear David,

    Thanks for your excellent support. I am sure I was right in purchasing GP.

    Best regards,

    Kelvin.

    #917587
    David
    Staff
    Customer Support

    You’re very welcome. Glad you’re enjoying GP

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