Hi Everyone.
I am trying to add a pagination.class.php to my wp plugin options page using

include(ABSPATH.'/includes/pagination.class.php');

But I am getting an error... Saying the file does not exists.

When I view the source, the file location is website/includes/pagination.class.php

How do I set this to be the plugin directory ?

Hi, thanks for your reply, but that didnt help...

I know how to include css and js into my plugin for styling and functionality, What I am trying to do is include a .php when logged in as administrator in wp dashboard.

I have created the options page and would like to include a different php file into the same file.

Here is how I got it to work - Just incase anyone else is having the same problem...

require_once( plugin_dir_path( __FILE__ ) . '/filename.php' );
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.