Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Oh sorry I had also removed the
    if ( !is_admin() ) wp_deregister_script('jquery');
    code from the same function.php which I forgot to mention in the previous comment.

    Although it is directly not related to the version 2.9.2 of wordpress but in my case the plugin was not at all working previously (loading forever) still after adding <?php wp_footer(); ?> <?php wp_header(); ?> and changing folders permission to 755 and files to 644 as suggested by some.

    After testing the polls with the default theme, I found out that this must be some problem with my custom theme files only. By checking the function.php I saw that I had used a deregister styles code in my theme function similar to this below:

    add_action( 'wp_print_styles', 'my_deregister_styles', 100 );
    function my_deregister_styles() {
    	wp_deregister_style( 'wp-polls' );
    	wp_deregister_style( 'thickbox' );
    }

    So now when I removed wp_deregister_style( 'wp-polls' ); from that, the polls are working perfectly just as it was before. Hope this helps someone else.

    Check the code below, this is a simple process. This works for me as I use most scripts directly on my php pages, but since you are using the lazyload plugin, I think you need to customize it to work in your situation.

    CODE:

    <head>
    <title> Your title </title>
    <script src="https://example.com/path/path/anyscript.js" type="text/javascript"></script>
    <?php
    if (is_page('home'))
    {?>
    <link type="text/css" rel="stylesheet" href="https://example.com/path/path/style.css" />
    <script src="https://example.com/path/path/homeonlyscript.js" type="text/javascript"></script>
    <?php } else { ?>
    <script src="https://example.com/path/path/yourlazyloadscript.js" type="text/javascript"></script>
    <script type="text/javascript">
    ETC ETC ETC
    </script>
    <?php } ?>
    <?php wp_head(); ?>
    </head>

Viewing 3 replies - 1 through 3 (of 3 total)