WordPress.org

Ready to get started?Download WordPress

Forums

Crayon Syntax Highlighter
[resolved] Problems with AutoFocus 2 pro and crayon plugin (16 posts)

  1. chrillemeter
    Member
    Posted 2 years ago #

    I have a problem with crayon and autoFocus 2 pro theme.

    Blog: post index. Plugin not working.
    Two text fields instead of highlighted code

    Blog: Single post. Plugin working fine.
    In the single post everything looks good

    Can you tell what's wrong? Is it the theme or the plugin?

    http://wordpress.org/extend/plugins/crayon-syntax-highlighter/

  2. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    Would you be able to provide the URL to these posts so I can investigate the HTML code? Also, make sure you're running the latest release (1.6)

  3. chrillemeter
    Member
    Posted 2 years ago #

    Yes, have have installed latest version (1.6)

    Here is the link to my blog page.
    Scroll down to the post with the title "Beräkna ålder i MySQL".

    http://www.christher.se/bloggen/

    On the single post page it works.

  4. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    Could you email me the theme so I can test it? I found a copy of v1.2 but it merely crashed my wordpress because it was outdated...

  5. chrillemeter
    Member
    Posted 2 years ago #

    It is not a free theme, I have purchased the theme. That's why you can not find it.

    I looked at the code for the theme and these lines are not included in header for the blog page.

    JS:
    wp-content/plugins/crayon-syntax-highlighter/js/jquery-1.7.min.js?ver=1.6.2
    wp-content/plugins/crayon-syntax-highlighter/js/crayon.js?ver=1.6.2
    wp-content/plugins/crayon-syntax-highlighter/js/jquery.popup.js?ver=1.6.2

    CSS:
    wp-content/plugins/crayon-syntax-highlighter/css/style.css?ver=1.6.2
    wp-content/plugins/crayon-syntax-highlighter/themes/twilight/twilight.css?ver=1.6.2

    After I included these lines of code in the header, everything worked as it should.

  6. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    Could you please check if you can find wp_head() in header.php?

  7. chrillemeter
    Member
    Posted 2 years ago #

    Yes, wp_head() is in the header.php

  8. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    Replace your files with this:

    http://dl.dropbox.com/u/33811812/crayon-syntax-highlighter-temp.zip

    Then refresh on the page that doesn't work and send me the log.txt, which will capture which parts of the code are being executed.

  9. chrillemeter
    Member
    Posted 2 years ago #

    Have done that and emailed the log by pressing the "Email developer" button.

  10. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    Got it, it all looks fine. wp_enqueue_style() and wp_enqueue_script() are called but after wp_head it seems. Looking into fixing it now.

  11. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    http://wordpress.stackexchange.com/questions/36189/how-to-use-wp-enqueue-style-and-wp-enqueue-script-only-when-needed

    Some plugins will load anyway and couldn't care less, but I'd like to load the script sparingly for those who only have a few Crayons here and there. In reality it probably makes the difference of a fraction of a second, but I'm too much of a perfectionist...

  12. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

  13. chrillemeter
    Member
    Posted 2 years ago #

    it did not work. Now the code is plain text, you can visit the blog
    http://www.christher.se/bloggen/

    The second post from the top.

  14. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

  15. chrillemeter
    Member
    Posted 2 years ago #

    Thank you. It working now.

  16. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    Glad to have helped!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic