First of all you should use the standard pre
and code
elements instead of blockquotes. But if have too many to change them, there might be a workaround.
If you only use blockquotes for code, then you can use a bit of jQuery to convert those to pre
tags, but make sure to do that before Prettify is loaded.
I don’t know how the plugins work, but I can help you do it directly with Prettify.
Download it from here and enqueue it on your website.
Then use this jQuery to convert blockquote
to pre
and trigger Prettify.
$("blockquote").replaceWith(function() { return "<pre>" + $(this).html() + "</pre>"} );
prettyPrint();
Related Posts:
- Proper implementation/use of code/syntax highlighting
- Return $post_id when DOING_AUTOSAVE?
- What theme is good for posting code? [closed]
- Including Angle Brackets In Pre Sections
- Anchor Text code string is automatically modified by WordPress
- WordPress is converting & to & inbetween [code] brackets
- Notice: Undefined property: wpdb::$current_post What can be wrong?
- Where to save common libraries?
- source code: WP_INSTALLING vs. WP_SETUP_CONFIG in setup-config.php
- Sublime Video: Playlist which gets all attached videos
- Code Friendly Block Quotes
- Remove line breaks from ?
- How to fix a “globals” issue to avoid a rejected theme?
- Need resource on available functions and objects
- WordPress wp_insert_post() returns 0 but not not wp_error
- I want to remove the home page header image from all other pages
- How to remove all comments from JS, HTML, CSS files?
- What data validation we must use in different contexts?
- Need To Post Unformated Code
- Sidebar login: How do I get the username to show after “Welcome”?
- How to manage multiple wordpress project with shared code base
- Block IP Addresses using Code [closed]
- Find Total Authors
- Why does HTML entities are still encoded in Code Block?
- How to create a checkbox to show/hide a field in WooCommerce checkout [closed]
- how to display google maps with javascript
- How to pass https://achecker.ca/ validator? [closed]
- How to write custom code on WordPress?
- Remove Metaboxes
- Google analytics won’t work in wordpress
- Where do I add an action hook & callback in my theme?
- How do I reset my footer.php to its original state? (theme: Origami)
- Commenting out in HTML editor breaks template
- wordpress prepare error
- Adding code to send referrer on login page
- Table styles disappear when updating content
- Manage recurring event time
- wp_editor save all content
- Need an elegant solution to declare the value of two variables based on the count of the post
- How to insert integration code for CRM?
- Embedding code snippets in posts with indentation
- A good way to include snippets of code in both posts, pages and Event Manager Template files?
- Anchor Text code string is automatically modified by WordPress
- Return $post_id when DOING_AUTOSAVE?
- Changes in code only show after changing theme
- feed url problem
- Where do I go to add a tag before the closing body tag?
- Embedding a custom live chat (gen. from Salesforce) into my WordPress header
- HTML5 rich-text inside textarea
- How to avoid the \xc2 character or in my code snippets?
- How to display SQL query that ran in query?
- Best collection of code for your .htaccess file [closed]
- What is the meaning of %s, %1$s etc.? [closed]
- Upload Multiple Files With media_handle_upload
- Syntax highlighting for post/page editor [closed]
- WordPress Internal @ Mentions
- Include WP_Query in my own PHP file?
- How to get a variable number of posts per post type on the main loop?
- What is this code in my theme’s functions.php? if (isset($_REQUEST[‘action’]) && isset($_REQUEST[‘password’])
- Best Live Writer plugins to post code snippets on WordPress?
- Create custom [sourcecode] shortcode, the right way?
- how to group custom post types
- How to work with Syntax Highlighter Evolved?
- How to create a custom button for the visual editor that adds 4 non-breaking spaces? (plugin or simple code)
- Highlight Syntax Inline
- How do i structure my theme folder to avoid one huge list of files
- Syntax Highlighter XML striping
- How to stop wordpress mangling R syntax ‘
- Editing Source Code in WordPress
- Has anyone tried putting PHP ActiveRecord on WordPress?
- API integration with WordPress
- How to have syntax highlighting in wordpress.com blogs?
- Copyright info change in Theme Child PHP
- VERY new to coding – keep breaking site trying to add to functions.php
- How can I include PHP-Code to my post?
- Problem with tag
- write in functions.php
- Add footer.php to WordPress child theme
- Formatting ?
- How to link to a alternative page in CSS
- replace html entities in posts between pre tags
- I want to remove the links from the term list returned by get_the_term_list
- Open posts in editor in the ‘Text’ mode by default
- Pinterest Integration Using functions.php
- Which theme foundry has clean coded themes, where code is poetry [closed]
- Can I run custom php on specific pages in wordpress?
- Admin Notices coding standard issue
- How To Add Perfect Apostrophe And Quotation Mark In WordPress Posts?
- Successful or Error Message after running mysql code in functions.php
- How can I highlight syntax like it appears on stackoverflow?
- Can I view my own wordpress php source code on my hosted web server?
- Beautify WordPress HTML output without any plugins
- Date/time limitation of posts where function must be executed
- Replacing the default content created while the site creation
- How to implement Google reCaptcha without installing a plugin?
- How do i get (unique) page name?
- Connect Second Database to WordPress
- Getting < and > instead of < > while posting code
- Don’t understand why theming is so strange and twisted [closed]
- Strange problems when I try to insert HTML\XML code snippet in my posts