Tag: 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-6473dca10f66c188672700/] “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-6473dca10f9d6723369827/] Just replace YOURSITE.YOURDOMAIN with your site and at the fourth row of the actual code (don’t mind the # comment line) […]

  • Chaging the logo on the loging WordPress page

    You have built a new client’s website and you want to change the WordPress logo on the login page (wp-login.php), well there is nothing more easy then this. Add the following code to your theme’s function.php. [crayon-6473dca10fe3f667179379/] What actually is happening is that you are hooking the new_login_page_logo function to the login_head action and replace […]

  • 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-6473dca11024e591489009/] 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!