Skip to content
Promex®
  • Services
  • Solving Problems
  • Blog
  • Contact
Promex®

Wordpress Snippets

A collection of wordpress snippets

Set Minimum Word Count to Publish Post
Wordpress Snippets

Set Minimum Word Count to Publish Post

BySupport Admin June 28, 2022

If you’re running a WordPress blog with multiple authors, then it’s important for you to maintain your blog’s content quality. With WordPress, you can restrict your authors to publish a post without having enough content. Here is a code snippet that lets you set a minimum word count for your WordPress posts. You can paste…

Read More Set Minimum Word Count to Publish PostContinue

Disable WordPress Admin Bar for All Users Except Admins
Wordpress Snippets

Disable WordPress Admin Bar for All Users Except Admins

BySupport Admin June 28, 2022

By default, each registered user has the option of showing the Admin Bar on the frontend and/or back-end of the website. And user can change these preferences, just by visiting Users > Your Profile and choose to show/hide admin bar. Although it’s nice to have for some users but sometimes you don’t want to allow…

Read More Disable WordPress Admin Bar for All Users Except AdminsContinue

Display All WP Query Variables in Wordpress
Wordpress Snippets

Display All WP Query Variables in Wordpress

BySupport Admin June 28, 2022

When developing a WordPress theme or plugin, it may be very useful to be able to output all WP Query variables. Here is a simple code snippet to do it easily. Paste the code below on any files, where you’d like to display the WP Query variables. <?php // display all wp query variables global…

Read More Display All WP Query Variables in WordpressContinue

Add Custom Image Size to Post Thumbnails
Wordpress Snippets

Add Custom Image Size to Post Thumbnails

BySupport Admin June 28, 2022

Here we will see we can we add additional custom image size to post thumbnails in WordPress media uploader to use in our WordPress theme. WordPress has a built-in feature for Post Thumbnails. When you upload an image in any post or in media library, WordPress automatically resize and crop image to some predefined sizes,…

Read More Add Custom Image Size to Post ThumbnailsContinue

Enqueue Scripts and Stylesheets in WordPress
Wordpress Snippets

Enqueue Scripts and Stylesheets in WordPress

BySupport Admin June 28, 2022

If you are a designer or a developer then knowing the proper way to enqueue scripts and stylesheets in your WordPress themes and plugins is very important. Because if you don’t do it proper way then you will probably run the risk of conflicting with other themes and plugins, and potentially creating problems that could…

Read More Enqueue Scripts and Stylesheets in WordPressContinue

Add Custom Post Types to Your RSS Feed
Wordpress Snippets

Add Custom Post Types to Your RSS Feed

BySupport Admin June 28, 2022

WordPress has in-built RSS feed allowing visitors to subscribe. This RSS feed normally consist of just blog posts and it does not include custom post types in default RSS feed. Although WordPress does not offer any setting to include custom post types in RSS feed, but we can modify the WordPress query to keep the…

Read More Add Custom Post Types to Your RSS FeedContinue

Get Current Page ID Outside The Loop
Wordpress Snippets

Get Current Page ID Outside The Loop

BySupport Admin June 28, 2022

With WordPress sometimes you’re not always working inside the WordPress loop. When you are working inside the loop, template tag the_ID can be used to easily get current page ID but if you are working outside the loop then getting current page ID is little tricky. Let’s look at how this is done. Inside the…

Read More Get Current Page ID Outside The LoopContinue

Change Excerpt Length For Different Categories
Wordpress Snippets

Change Excerpt Length For Different Categories

BySupport Admin June 28, 2022

Do you ever wonder how you could be able to change excerpt length based on category the post belongs to. In this article we will be discussing how to change excerpt length for different categories. Post excerpt has a default length of 55 words but sometimes you want to modify this limit for certain category…

Read More Change Excerpt Length For Different CategoriesContinue

Remove WordPress Version From The Admin Footer
Wordpress Snippets

Remove WordPress Version From The Admin Footer

BySupport Admin June 28, 2022

The WordPress admin footer bar shows the current WordPress version on the right side. But there are times when you want to remove WordPress version from the admin footer or perhaps you want to change it and provide additional link to your website for branding purposes. We are going to demonstrate both of these cases…

Read More Remove WordPress Version From The Admin FooterContinue

Remove Default Wordpress Widgets From Dashboard
Wordpress Snippets

Remove Default Wordpress Widgets From Dashboard

BySupport Admin June 28, 2022

WordPress comes with a number of in-built widgets which allow you to easily add additional functionality to your WordPress theme. You can use WordPress Widgets to add content and features to your sidebars or to any other predefined widget locations. But nobody uses all the default widgets. In fact, there are probably a few default…

Read More Remove Default Wordpress Widgets From DashboardContinue

Page navigation

Previous PagePrevious 1 2 3 4 5 6 … 20 Next PageNext

Send a message
Contact us!

Visit US

Seattle, WA | Sofia, Bulgaria
Lisbon, Portugal | Beirut, Lebanon

TOS / Privacy Policy

  • Services
  • Solving Problems
  • Blog
  • Contact