Category: Back-end

  • Displaying the shortcode from Custom post type content or Metabox

    Whenever you try to display a shortcode through custom field you will get the text part and the shortcode function won’t be trigger.  To avoid this you can apply the following filter in your code:   [crayon-6337c46b7a115019821542/] “the_custom_field” should be replaced by your own custom field name. Basically you can apply this filter to any […]

  • HTTP error on video files upload

    Error happens after the whole file is uploaded (we lifted the post-size and file upload limits). Solution that helped me: nano /etc/apache2/mods-available/fcgid.conf add this: FcgidMaxRequestLen 1073741824 or edit MaxRequestLen to a higher value. Then restart: service apache2 restart

  • Prevent hotlinking on your media files

    Whenever you want to ban/prevent hotlinking your media files and protect your server’s resources and bandwidth you may use the following snippet in the .htaccess file of your main directory of your site. [crayon-6337c46b7a515212315597/] Just replace YOURSITE.YOURDOMAIN with your site and at the fourth row of the actual code (don’t mind the # comment line) […]

  • Add new options to any wordpress theme in the Customize panel

    Let’s say that you need a second logo image to be added in your header. And let’s assume that this should be editable feature. The easiest way to manage this task is to make a new option in the Customize panel (Appearance -> Customize) to upload a logo image and add a link to it. […]

  • Registring widget area and how to use it later

    To register a widget area for you theme you should  use the register_sidebar function in your theme’s function.php. [crayon-6337c46b7abf5446329830/] This function will register the widget’s area through the ‘widgets_init’ hook. For more specification on register_sidebar please see here. Next step is to set the place where we want to see the widgets to be displayed. […]

  • Аll-in-Оne cheatsheet on different programming languages

    Resources on WordPress Аll-in-Оne cheatsheet on different programming languages

    http://overapi.com/php (just an example for PHP) An awesome cheatsheet for various languages. Handy!