php - Using $wpdb on a different URL -


i have wp installation on 1 url - www.demosite.com/wordpress , want call in posts different url on same sever - www.demosite.com/foundation.

i see there's $wpdb function/class , understand there various queries can use extract specific posts (ie user).

what i'm struggling accessing db different domain. i'm assuming i'll need give www.demosite.com/foundation clue db want access. i've got copy of www.demosite.com/wordpress's config file relevant db access details. isn't working on it's own. suspect i've missed basic step somewhere.

so i'm asking if has done similar before or knows of tutorial can follow please?

i've read quite few tutorials , seem assume you're working in/with current wp installation on same url , therefore don't need config files they're connected right db.

i apologise if php101 type stuff php isn't area of expertise.

thanks


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -