WordPress.org

Forums

Age Verify
[resolved] Background image on age verify (10 posts)

  1. Maniackiller
    Member
    Posted 2 years ago #

    Hi. Can i put a image as background insted of a color? Please help me as soon as posible.

    http://wordpress.org/extend/plugins/age-verify/

  2. Chase Wiseman
    Member
    Plugin Author

    Posted 2 years ago #

    Try utilizing one of the plugin's actions to add custom css code. Something like this:

    <?php add_action( 'av_custom_styles', 'my_av_custom_styles' );
    
    function my_av_custom_styles() { ?>
    
        <style type="text/css">
            #av-overlay-wrap {
                background: url(path/to/your/image.png);
            }
        </script>
    
    <?php } ?>
  3. Maniackiller
    Member
    Posted 2 years ago #

    First thank you very much for answering.
    Do i have to add that function to function.php? Create a new file with that code? I did not understand what you mean by adding custom css code to the plugin's actions.

  4. Chase Wiseman
    Member
    Plugin Author

    Posted 2 years ago #

    Try pasting the above code into your themes functions.php file.

  5. Maniackiller
    Member
    Posted 2 years ago #

    I am using Mantra theme. When I paste that code to theme-function.php , The age verify box it is show almost properly(forces you to chose fast on the dropdowns or the dropdowns close automaticaly). But the main problem is that forces a conflict with the main div where the information is, removes the proper configuration, align,width and height, etc. Is there any simple solution (changing some code is not a problem) or is better to use color as background and forget about image?
    Thank you very much for your time.

  6. Chase Wiseman
    Member
    Plugin Author

    Posted 2 years ago #

    I am unfamiliar with the Mantra theme, so I can't help much when it comes to that theme's styling. I would suggest asking whoever made the theme for some direction as to where to place that code.

  7. Maniackiller
    Member
    Posted 2 years ago #

    Thank you for your help

  8. michent1
    Member
    Posted 1 year ago #

    Hi, we tried adding the code you noted above to our theme functions.php file to create an action and it totally broke our theme. Even after uninstalling the Age Verify plugin, we're still geting the "Are you 21 years old to visit this site" info in the footer and the responsive design is no longer working. Could you tell me which specific files that code would affect so we can fix this? Thanks!
    Awesome plugin by the way!

  9. jharri74
    Member
    Posted 1 year ago #

    Hi. I was able to add a background image. In the settings.php file for the plug-in, once I removed the following lines, I was able to see the changes I made to #av-overlay-wrap

    remove:

    <?php }
    
    /**
     * Prints the background color settings field.
     *
     * @since 0.1
     */
    function av_settings_callback_bgcolor_field() { ?>
    
    	<fieldset>
    
    		<legend class="screen-reader-text">
    			<span><?php esc_html_e( 'Background Color' ); ?></span>
    		</legend>
    
    		<?php $default_color = '';
    
    		if ( current_theme_supports( 'custom-background', 'default-color' ) )
    			$default_color = ' data-default-color="#' . esc_attr( get_theme_support( 'custom-background', 'default-color' ) ) . '"'; ?>
    
    		<input type="text" name="_av_bgcolor" id="_av_bgcolor" value="#<?php echo esc_attr( av_get_background_color() ); ?>"<?php echo $default_color ?> />
    
    	</fieldset>
    
    <?php }

    Once the website goes live, I'll post the URL

  10. yarir1979
    Member
    Posted 1 year ago #

    If i remove the code mentioned above in the plugin setting.php, do i then just modify the #av-overlay-wrap with css code in the Theme options?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Age Verify
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic