antmore
Forum Replies Created
-
I am thinking of purchasing the license, but I had an issue with my Google+ account as well. I have not heard from your support since my initial email that I sent over a month ago. This isn’t a good sign for your service.
Nevermind. I was using the problem in this thread: https://www.ads-software.com/support/topic/thumbnail-override?replies=9
to deal with my problem. I shut off all the templates, then I reinserted the albums onto the page it was displaying, using the thumbnail override. I adjusted the images to the size of my thumbnails, then inserted to the page and hit Update. When I refreshed my page, the albums were the size I wanted.
Forum: Fixing WordPress
In reply to: How to add Admin Bar to non-wordpress sitesEvery time I try to add a function in :
if ( is_user_logged_in() ) {
//adding function here
}i get this error:
Fatal error: Cannot redeclare _wp_admin_bar_init() (previously declared in…/file/to/path/
Even though I am requiring all these pages that SHOULD let me use the function to call on non-WP pages
require(‘blog/wp-load.php’);
require(‘blog/wp-blog-header.php’);
require(‘blog/wp-includes/admin-bar.php’);
require(‘blog/wp-config.php’);It should treat the non-wordpress page as a WP page and be able to post the admin bar. unless I am posting the wrong function.
After some stupid mistakes, I will say that anyone that is trying to include “password protected” material on non-WP pages using WordPress login, should follow this:
Find plugin “Root Cookie.” Change the cookie path from what it is currently to “https://mysite.com.” usually WP has you set up as “https://mysite.com/blog/” if you are installing it in a subfolder of the root. Root Cookie Settings can be found in the Settings Tab of WP.
Clear out your cookies from your browser. Then try to access your password protected site using:
require(‘blog/wp-load.php’);
require(‘blog/wp-blog-header.php’);if ( is_user_logged_in() ) {
echo ‘Welcome, registered user!’;
} else {
header( ‘Location: https://www.mysite.com/blog/wp-login.php’ ) ;};
You should be prompted to login. Once logged in on WP, go to your non-WP page that is protected using the code above, and you should get “Welcome registered user.”
I have searched and searched for the answer to this problem and I think I have come up with the best solution so far.
Good Luck!
I loaded the “Root Cookie” plugin and it changed my cookie domain path from car-mds.com/blog to car-mds.com to include the root folder.
my next problem is that the code:
require(‘blog/wp-load.php’);
require(‘blog/wp-blog-header.php’);if ( is_user_logged_in() ) {
echo ‘Welcome, registered user!’;
} else {
header( ‘Location: https://www.car-mds.com/blog/wp-login.php’ ) ;};
is constantly returning false and therefore sending me to the login page and not seeing that I am logged in.
One of my buddies saw my cookie path and he thinks that the problem lies in that my blog’s cookiepath is set to “/blog/.” he says if i change it to “/”, that will allow the cookies to be in the root folder, which will then allow my non-WP pages to protected.
However, he knows how to do this in PHP but not in WP. Any help would be appreciated.
if you test the link on https://www.car-mds.com/shop.php, I have tried that solution and all the page does is redirect to the wp login page in the “else” section of my code.
The purpose of this type of integration is to password protect portions of my site unless logged in to the website, as well as use the same user/pass for posting on my blog and forum.