Skip to main content

Posts

Showing posts from December, 2016

GET and Display current page content and Title

<?php $id=12; $post = get_post($id); echo get_the_title( $id ); $content = apply_filters('the_content', $post->post_content); echo $content; $my_postid = 12 ; //This is page id or post id $content_post = get_post ( $my_postid ); $content = $content_post -> post_content ; $content = apply_filters ( 'the_content' , $content ); $content = str_replace ( ']]>' , ']]&gt;' , $content ); echo $content ; ?>

Disable the Plugin and Theme Editor

Access to plugin and theme code is available in the WordPress dashboard. You can do one thing to protect the site from trifile to disable the both of these editors. Open your wp-config.php file and add the following constant: define('DISALLOW_FILE_EDIT',true); Now, when you are in the dashboard it is impossible to access the theme or plugin editor, even if you are admin.

Disable Plugin and Theme Update and Installation

If you really want to disable Updates and Installations, you can block users from installing/updating themes and plugins through the dashboard. Add this quick snippet to your wp-config.php file: define('DISALLOW_FILE_MODS',true); It will prevent users from installing and updating themes and plugins. It will also automatically disable theme and plugin editing in the dashboard.

Add Font to Website Wordpress

a) First download .TTF file of font you want. b) then put it in folder fonts. c) then in css file u are using e.g. style.css d) copy the code shown below :- @font-face{     font-family: test;     src: url("http://abc.com/abc/wp-content/themes/abc/css/fonts/abc.ttf") } e) And use the font where you wont.