Adrian
Forum Replies Created
-
Forum: Hacks
In reply to: Problem when using conditional tag 'is_front_page' and a tagNo problem,
It was your actual PHP code that was wrong. It was incorrectly nested.
Forum: Hacks
In reply to: Problem when using conditional tag 'is_front_page' and a tagTry this one.
<?php if (is_front_page()){ echo ' <video id="example_video_1" class="video-js vjs-default-skin" controls preload="auto" width="1278" height="720" poster="https://imagestocksg.s3.amazonaws.com/preview/homepage-poster-test.jpg" > <source src="https://imagestocksg.s3.amazonaws.com/preview/homepage-video-test.mp4" type="video/mp4" /> </video>'; } ?>
Forum: Hacks
In reply to: Problem when using conditional tag 'is_front_page' and a tagHi,
Yes you do have an error in your code.
What are you using data-setup for?
Try this:
<?php if (is_front_page()){ echo ' <video id="example_video_1" class="video-js vjs-default-skin" controls preload="auto" width="1278" height="720" poster="https://imagestocksg.s3.amazonaws.com/preview/homepage-poster-test.jpg" data-setup=''> <source src="https://imagestocksg.s3.amazonaws.com/preview/homepage-video-test.mp4" type='video/mp4' /> </video>'; } ?>
Forum: Fixing WordPress
In reply to: Everything is blank. I am in shambles.No problem, glad you fixed it!
What theme are you using? Or you could paste the code that you tried to edit in here.
Forum: Fixing WordPress
In reply to: Everything is blank. I am in shambles.It would be inside the folder /wp-content/themes/your theme/..
Then it would be wherever the theme developer has put it.
If you can, download the whole website files and folders and you can search for the nav.php file
Forum: Fixing WordPress
In reply to: Everything is blank. I am in shambles.If you know what you edited, I would add it back in and should work ok.
Forum: Fixing WordPress
In reply to: No Results Found ErrorOn your page template file there must be a loop that is trying to query the database.
You can create a new page template with the same code and remove the call to the loop
Forum: Fixing WordPress
In reply to: Everything is blank. I am in shambles.Do you have access to your files?
If so you can edit the file and reupload it to fix the problem.
Forum: Fixing WordPress
In reply to: Dashboard Page Not Working, only Menu PresentThis could be a problem with plugins. Have you recently installed a plugin on the site?
I’d try and go through 1 by 1 and disable them to see if the error disappears.
Forum: Fixing WordPress
In reply to: Redirect user to intended URL after login on private siteThis code would generate a login form wherever you put it. So for your private page I would use the is_user_logged_in() function like this:
<?php if ( is_user_logged_in() ) { //show the page content you want them to see } else { args = 'redirect' => site_url( $_SERVER['REQUEST_URI'] ); //sends them back to the page that the form was on wp_login_form($args); } ?>
Forum: Fixing WordPress
In reply to: Redirect user to intended URL after login on private siteYou can use the wp_login_form() function like this
<?php args = 'redirect' => site_url( $_SERVER['REQUEST_URI'] ); //sends them back to the page that the form was on wp_login_form($args); ?>
Forum: Fixing WordPress
In reply to: unable to access databaseYou need to create a separate WordPress database with a separate username on your hosting package for security reasons do not use root.
If you take a look at how WordPress exports its data as XML using the available tool in your dashboard.
This will give you a good indication on how you can export the data and import it correctly into your new site.
Is your old website running on WordPress or another CMS?
Forum: Fixing WordPress
In reply to: Members Only SiteYes this is possible.
To login and not be directed to the dashboard do the following:
For the login form – Codex explanation
<?php $args = array("redirect" => "/your-desired-url"); wp_login_form($args); ?>
And then to check if a user is logged in you can do this:
<?php if ( is_user_logged_in() && current_user_can('subscriber') ) { echo 'Welcome, registered user!'; } else { echo 'Welcome, visitor!'; } ?>
This checks to see that the user is logged in and also a subscriber.