Snippets

Adding or Including custom post type to default WordPress loop

Adding or Including custom post type to default WordPress loop by altering the 'pre_get_posts' function. Here it use add_action() function.…

5 years ago

How to Limit or Disable WordPress Post Revisions

Limit the number of posts revisions that WordPress stores in the database. edit wp-config.php file in WordPress root: [crayon-662f7b0693946398016054/] WP_POST_REVISIONS:…

5 years ago

Multisite – List Recent Posts Across an Entire Network

In Multisite, List Recent Posts Across an Entire Network by using custom query or WP_Query you can list all recent…

5 years ago

Disable update notification for individual plugins / All

code for the plugin file itself:- [crayon-662f7b0693cbb895015209/] I like to put this in the actual plugin. Since I've only ever…

5 years ago

How to change the WordPress permalink structure to remove dates from the URLs

Switching the permalink structure from /year/month/post-slug to just /post-slug is easy by going to Settings > Permalinks and choosing “Post…

6 years ago

Limit character in content and title in wordpress

[crayon-662f7b0693f5f024408884/] or with readmore [crayon-662f7b0693f65447798448/]  

6 years ago

Hide page visual editor if certain template is selected

[crayon-662f7b0694089850752304/]  

6 years ago

Remove Admin Menus

[crayon-662f7b06941d7825157284/]  

6 years ago

has_post_thumbnail() not working

Assuming that you’re in The Loop, you can fix this problem, by replacing: [crayon-662f7b069430f527541563/] with [crayon-662f7b0694315870342452/]  

6 years ago

Display admin menu urls – debug

[crayon-662f7b069442f294642331/]  

6 years ago