{"id":17,"date":"2026-09-09T04:25:31","date_gmt":"2026-09-09T04:25:31","guid":{"rendered":"https:\/\/nirohelp.com\/docs\/17\/code-blocks-and-images\/"},"modified":"2026-09-09T04:25:31","modified_gmt":"2026-09-09T04:25:31","slug":"code-blocks-and-images","status":"publish","type":"nirohelp_doc","link":"https:\/\/nirohelp.com\/docs\/knowledge-base\/code-blocks-and-images\/","title":{"rendered":"Code blocks, image zoom and heading links"},"content":{"rendered":"<p>NiroHelp adds three reader-facing extras to docs: syntax highlighting for code,<br \/>\nclick-to-zoom on images, and automatic links on headings.<\/p>\n<h2>Syntax-highlighted code blocks<\/h2>\n<p>Wrap code in the <code>[nirohelp_code]]<\/code> shortcode and say which language it is:<\/p>\n<pre><code class=\"language-none\">[[nirohelp_code lang=&quot;php&quot;]]\nyour code here\n[[\/nirohelp_code]\n<\/code><\/pre>\n<p>The language defaults to <code>php<\/code>. Any common language name works \u2014 js, ts, css,<br \/>\nhtml, bash, json, yaml, sql, python, go, ruby, rust and the rest.<\/p>\n<p>Your code is displayed exactly as written, and line breaks the visual editor<br \/>\nadded are cleaned up first, so pasted code survives.<\/p>\n<p><strong>The block editor&#8217;s own Code block is not highlighted.<\/strong> It produces a plain<br \/>\ncode block with no language attached, so it renders unstyled. Use the shortcode<br \/>\nwhen you want colours.<\/p>\n<h2>Image zoom<\/h2>\n<p>Images inside a doc&#8217;s body are made clickable automatically: clicking one opens<br \/>\nit full size in a lightbox, and clicking outside or pressing <kbd>Esc<\/kbd><br \/>\ncloses it. Images you have already linked to something else are left alone, so<br \/>\na screenshot that links somewhere keeps its link.<\/p>\n<p>There is no setting for this. Turning it off needs a developer.<\/p>\n<h2>Heading links<\/h2>\n<p>On a single doc, each heading gets a small <code>#<\/code> link beside it, so readers can<br \/>\ncopy a link straight to a section.<\/p>\n<p><strong>On docs written in the block editor, headings usually do not get one.<\/strong> The<br \/>\nfeature only recognises plain headings, and the block editor adds styling<br \/>\ninformation to every heading it produces. Headings written in the classic<br \/>\neditor do get their links.<\/p>\n<p>If you rely on links to specific sections, write those headings in the classic<br \/>\neditor, and check the published page before you announce the link.<\/p>\n<h2>Featured image<\/h2>\n<p>The featured image appears in the docs archive and at the top of the doc<br \/>\nitself. NiroHelp does not set the image used when someone shares your doc on<br \/>\nsocial media \u2014 that comes from whichever SEO plugin you run, reading the same<br \/>\nfeatured image.<\/p>\n<h2>A note on page weight<\/h2>\n<p>The syntax-highlighting files load on <strong>every<\/strong> page of your site, not only on<br \/>\ndocs. If page weight matters to you, a developer can limit them to doc pages.<br \/>\nThe image-zoom files load on single docs only.<\/p>\n","protected":false},"author":1,"featured_media":0,"template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"nirohelp_product":[],"nirohelp_topic":[4],"class_list":["post-17","nirohelp_doc","type-nirohelp_doc","status-publish","hentry","nirohelp_topic-knowledge-base"],"_links":{"self":[{"href":"https:\/\/nirohelp.com\/docs\/wp-json\/wp\/v2\/nirohelp_doc\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nirohelp.com\/docs\/wp-json\/wp\/v2\/nirohelp_doc"}],"about":[{"href":"https:\/\/nirohelp.com\/docs\/wp-json\/wp\/v2\/types\/nirohelp_doc"}],"author":[{"embeddable":true,"href":"https:\/\/nirohelp.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"wp:attachment":[{"href":"https:\/\/nirohelp.com\/docs\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"nirohelp_product","embeddable":true,"href":"https:\/\/nirohelp.com\/docs\/wp-json\/wp\/v2\/nirohelp_product?post=17"},{"taxonomy":"nirohelp_topic","embeddable":true,"href":"https:\/\/nirohelp.com\/docs\/wp-json\/wp\/v2\/nirohelp_topic?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}