georgerobbo
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: links problemCan you show us your code?
Forum: Fixing WordPress
In reply to: How to make my navbar change when user hovers?You can do this with plain old css.
https://www.webdesignerwall.com/tutorials/advanced-css-menu/
Forum: Fixing WordPress
In reply to: How to make website created in WordPress into a blogDo not bother with another WordPress installation. You can use your current one.
I assume you have a home.php and page.php file correct?
In your home.php page you need to add the WordPress loop so it then displays a list of your blog posts.
<div id="post_container"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div id="title"><h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2></div> <div id="excerpt"><p><?php the_excerpt(); ?></p></div> <?php endwhile; ?> <?php endif; ?> </div>
Then in your single PHP file do the same as above, but instead of using <?php the_excerpt(); ?> use <?php the_content(); ?>
Voila
Forum: Fixing WordPress
In reply to: WordPress LoopI’ve found the solution. It involves resetting the WordPress loop using
<?php wp_reset_query(); ?>
Forum: Fixing WordPress
In reply to: WordPress Loophi
instead of is_home() try using is_front_page(). Its not intuitive but that is how you designate the homepage. is_home() actually refers to the posts page.
If it still does not work, set a variable after you enter the first loop
Hello,
I’m afraid neither of those solutions work. There is something with my WordPress loop which is interfering with the IF statement.
Forum: Fixing WordPress
In reply to: Create a page with two different page namesI don’t know how experienced you are with PHP, but this could be an alternative.
When a purchase has been made or a user has logged in who has a payment history a variable could be set to TRUE. This could be stored in a session every time a user is logged in. They can then access the page you wish to hide.
However if they haven’t purchased anything then the variable is set to false, you could just then use a IF statement to redirect users away from the page if they aren’t logged in or if they don’t have a payment history.