Theme & Front End snippets

Small changes to how your site looks and behaves for visitors, from excerpts to menus.

Showing 30 snippets

Theme & Front End PHP Add a Class to Menu Links Add your own CSS class to the links in a menu, such as a "nav-link" class your design system or framework expects. Beginner WP 7.1 Theme & Front End PHP Exclude a Category From the Blog Page Keep posts from one category, such as News or Podcast, off the main blog page while leaving them in their own archive. Beginner WP 7.1 Theme & Front End PHP Change the “Read More” Link Text Replace "(more…)" from the More block with your own text, including the post title for screen readers. Beginner WP 7.1 Theme & Front End CSS Stop Sticky Headers Covering Anchor Targets Leave space above headings when visitors jump to them, so a fixed or sticky header doesn't hide them. Beginner WP 7.1 Theme & Front End PHP Change the Comment Form Title and Button Change "Leave a Reply", the "Post Comment" button and the notes above the comment form. Beginner WP 7.1 Theme & Front End JS Add a “Back to Top” Button Show a round button in the bottom corner after visitors scroll down, which takes them back to the top of the page. Beginner WP 7.1
Want it without code?Our plugins do the heavy lifting, with settings, updates and support.
Browse plugins
Theme & Front End PHP Register a New Widget Area Add a new sidebar or widget area to a classic theme, ready to fill from Appearance > Widgets. Beginner WP 7.1 Theme & Front End JS Add Copy Buttons to Code Blocks Add a "Copy" button to every code block in your posts, so readers can copy code with one click. Intermediate WP 7.1 Theme & Front End JS Show a Reading Progress Bar Add a thin bar across the top of the screen that fills up as the reader scrolls through an article. Beginner WP 7.1 Theme & Front End JS Add a Class to the Header When the Page Scrolls Add an is-scrolled class to your header after the visitor scrolls, so you can shrink it or add a shadow with CSS. Beginner WP 7.1 Theme & Front End JS Add Link Anchors to Headings Give every heading in your posts an id and a small "#" link, so readers can share links to a specific section. Intermediate WP 7.1 Theme & Front End JS Open External Links in a New Tab Make links to other websites open in a new tab, with the safe rel attributes and a hidden notice for screen reader users. Beginner WP 7.1 Theme & Front End PHP Add Code to the Head and Footer Add verification tags, tracking scripts or chat widgets to every page, in the head or just before the closing body tag. Beginner WP 7.1 Theme & Front End PHP Remove “Category:” From Archive Titles Show "News" instead of "Category: News" at the top of category, tag and other archive pages. Beginner WP 7.1 Theme & Front End PHP Add a [year] Shortcode for Copyright Notices Add [year] and [copyright] shortcodes so your footer's copyright year updates itself every January. Beginner WP 7.1 Theme & Front End PHP Show a Dismissible Announcement Bar Show a slim message bar at the top of every page, such as a sale or shipping notice, that visitors can close. Intermediate WP 7.1 Theme & Front End PHP Show a “Last Updated” Date on Posts Add "Last updated on…" above posts that were changed at least a day after publishing. Beginner WP 7.1 Theme & Front End PHP Add Share Links Without Tracking Scripts Add plain share links for X, LinkedIn, Facebook and email below each post, with no third-party scripts or cookies. Intermediate WP 7.1 Theme & Front End CSS Limit Excerpts to Three Lines Cut post card excerpts off after three lines with an ellipsis, so cards in a grid line up neatly. Beginner WP 7.1 Theme & Front End CSS Clean Print Styles for Posts Hide headers, menus and sidebars when a page is printed, and show link addresses after link text. Beginner WP 7.1 Theme & Front End CSS Mark External Links With an Icon Add a small arrow after links in your content that point to other websites, so readers know they're leaving. Beginner WP 7.1 Theme & Front End PHP Add Custom Body Classes by Page Template Append custom CSS classes to the body tag based on the current page template, post type, or taxonomy, enabling template-specific CSS targeting without inline styles. Beginner WP 7.1 Theme & Front End PHP Use Your Own Default Avatar Replace the generic mystery person Gravatar shown for users without a profile image with your own custom default avatar hosted on your site. Beginner WP 7.1 Theme & Front End PHP Register a Custom Navigation Menu Location Register one or more custom nav menu locations so they appear in Appearance > Menus and can be assigned and rendered anywhere in your theme templates. Beginner WP 7.1 Theme & Front End CSS Smooth Scrolling for Anchor Links One CSS rule for smooth jumps to page sections, which switches off for visitors who prefer reduced motion. Beginner WP 7.1 Theme & Front End CSS Brand-Coloured Text Selection Change the highlight colour when visitors select text, from the browser's default blue to your brand colour. Beginner WP 7.1 Theme & Front End CSS Make Video Embeds Responsive Make YouTube and Vimeo iframes scale to the width of their container and keep a 16:9 shape on every screen. Beginner WP 7.1 Theme & Front End CSS Hide the reCAPTCHA Badge the Allowed Way Hide Google's floating reCAPTCHA badge while keeping the required notice, so forms stay protected and within Google's terms. Beginner WP 7.1 Theme & Front End CSS Fluid Heading Sizes With clamp() Make headings scale smoothly between a minimum size on phones and a maximum on large screens, with no breakpoints. Beginner WP 7.1 Theme & Front End CSS Add a Basic Dark Mode Switch your site to dark colours automatically for visitors whose device is set to dark mode. Intermediate WP 7.1

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only