Cases – Page 2 – WordPress Monsters

WordPress Cases

How to reorder custom post type in admin menu

When you create a custom post type, you should edit this option for setting you post type menu in admin:

This list is very usefull. It represents a hierarchy preset of menu elements in WordPress admin menu:

  • 5 – below Posts
  • 10 – below Media
  • 15 – below Links
  • 20 – below Pages
  • 25 – below comments
  • 60 – below first separator
  • 65 – below Plugins
  • 70 – below Users
  • 75 – below Tools
  • 80 – below Settings
  • 100 – below second separator
contact form 7 plugins

Override any class from plugin

If you faced with situation when plugins classes hardcoded some data, you can override those for your theme. The main condition is a presence of special function before that class:

After that you should copy a file with this class. Then you create yourself plugin for example: wpm-vk-override-class. Copy a file ( for ex. it is vk.php ) with class in a plugin directory. A plugin main file will be like this:

But there is a little problem, you will see a Fatal Error after activation:

To understand this situation we have to know how the WordPress saveing an activated plugins in DataBase. Go to wp_options table and find a field – active_plugins. Lets have a look on value of this field:

It is a serialised array. Lets unserialize it:

Here you can set an order of activated plugins. But for our situation the better move would be deactivate conflict plugin (main plugin where we got a class). For me it is – woo-social-login. After deactivation you can activate your own plugin. There will be no errors, you can be sure. And activate a main plugin at the end. That’s all! Now your functionality have been overrided successfully!

There are no known methods to do the same result in your theme. You can override it in theme only if the class located in parent theme.

contact form 7 plugins

Child theme creation

Create a sibbling folder near for parent theme. For example we have parent theme Twenty Fifteen Child. Create a folder twenty-fifteen-child with style.css file in it. It should consist:

You will need to replace the example text with the details relevant to your theme.

The Template line corresponds to the directory name of the parent theme. The parent theme in our example is the Twenty Fifteen theme, so the Template will be twentyfifteen. You may be working with a different theme, so adjust accordingly.

The only required child theme file is style.css, but functions.php is necessary to enqueue styles correctly (below).

More details https://codex.wordpress.org/Child_Themes.

contact form 7 plugins

Define what post types to search

contact form 7 plugins

Default Post Tag for Custom Post Type

contact form 7 plugins

Ajax Cart Fragments

contact form 7 plugins

Plugin Annotation

contact form 7 plugins