If you are doing a ajax call to retrieve data from your own server on a platform which is set to prevent these ajax calls . To bypass “Access-Control-Allow-Origin” you need to allow cross domain access by including this in your server php code.
OR – for only one domain
I hope this will help you gain access to you cross-domain data.
How to import recent post from your internal blog to your website without any difficulties.
First you need to create wp-latest-blogs.php file where you include wp-load.php for your wp blog.
* WoredPress Latest blog entries
* @package WordPress
require( './blog/wp-load.php' );
// Load the recent top 10 posts
query_posts( 'posts_per_page=10' );
< ?php if (have_posts()) : ?>
< ?php while (have_posts()) : the_post(); ?>
< ?php the_title(); ?>< ?php the_time('F jS, Y') ?>
< ?php endwhile; ?>
< ?php endif; ?>
Continue reading “Display Recent Posts outside the WordPress” »
get_defined_vars — Returns an array of all defined variables
get_defined_functions — Returns an array of all defined functions
You should be careful about the location in the code, because if you are inside a function it will work only for this function.
get_defined_constants – Returns list all defined constants with their respective values
get_declared_classes – Returns list all declared classes
memory_get_usage — Returns the amount of memory allocated to PHP
To create a plugin, all you need to do is create a folder and then create a single file. First go to the wp-content/plugins folder, and create a new folder named myPlugin. Inside this new folder, create a file named myPlugin.php. Open the file in a text editor, and paste the following information in it:
Plugin Name: myPlugin Creator
Plugin URI: http://www.nikolaynikolov.net
Description: My fist plugin
Author: Nikolay Nikolov
Author URI: http://www.nikolaynikolov.net
You can go into the back end to activate your plugin. Of course, this plugin doesn’t do anything, but you can add functionality by yourself.
Continue reading “Create WordPress Plugin” »