Matt
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Featured Image not showing on pageI’ve found the answer!
I was using custom post types and had to use wp_query with arguments to call the posts in the page.
The new code is here but I now have a new set of problems outlined in this forum post!
It’s never ending but i’m learning loads thanks to people like you Calvin. Thank you so much!
Forum: Themes and Templates
In reply to: Content within the loop is not displayingResolved!
Forum: Themes and Templates
In reply to: Content within the loop is not displayingI’ve found the answer!!
I had to create a wp_query with the arguments for the custom post type and apply that to the loop.
Here is the updated code
<?php $args = array( 'post_type' => 'blog','cat'=> 5,); $myblogPosts = new WP_Query($args); if ($myblogPosts->have_posts() ) : ?> <h2 class="post-title">This text now displays!!</h2> <?php while ($myblogPosts->have_posts() ) : $myblogPosts->the_post(); ?> <div><?php the_title(); the_content(); ?> <?php endwhile; else : ?> <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p> <?php endif; ?>
Stephen – thank you so much for your help!! I’m learning all the time with the great support from the forums!!
Forum: Themes and Templates
In reply to: Content within the loop is not displayingOk thanks, i’ve reverted the page back to how it was.
I created the custom post type using this plugin. Would this have been taken care of when installing or do I need to check that somewhere?
Forum: Themes and Templates
In reply to: Content within the loop is not displayingHmm, it seems that using
archive-blog.php
defaults the page back toindex.php
and using the code above parses and error on line 37 which is this one<?php if ( $loop->have_posts() ) : ?>
Forum: Themes and Templates
In reply to: Content within the loop is not displayingI have the standard ‘Hello World’ post still and a couple of posts as a custom post type called “blog”
Forum: Themes and Templates
In reply to: Content within the loop is not displayingSure no problem, here it is.
Forum: Themes and Templates
In reply to: Content within the loop is not displayingReally sorry Stephen, you’re going to have to be patient with me as i’m a total noob.
I’ve enabled debugging and there doesn’t seem to be any errors that I can see.
The code is pretty much it other than some standard HTML. as I was following this tutorial and hit a problem at the first hurdle.
That code above is just in a content div and there’s no other php on the archive.php page other that get
get_header
andget_footer
functions.Am I missing something silly?
Forum: Themes and Templates
In reply to: Content within the loop is not displayingOops sorry I deleted that by mistake. This is the code that isn’t working.
This Text Displays <?php if (have_posts() ) : ?> <h2 class="post-title">This text isn't displaying</h2> <?php while (have_posts() ) : the_post(); ?> <?php endwhile; else : ?> <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p> <?php endif; ?> This Text Displays
Forum: Themes and Templates
In reply to: Featured Image not showing on pageHi Calvin,
I’m good thanks, hope you are too!
Many thanks for your quick reply!!!
This is the url for the category that I want to display:
https://localhost:8888/wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=5&post_type=blog
What are your thoughts?
Forum: Localhost Installs
In reply to: Requested URL not found plus not site at wwwI fixed the problem by creating an htaccess file with the following code:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
Hi there. I definitely have the database selected but still getting the same error message.
The error message is this:
#1146 – Table ‘focus_one.wp_options’ doesn’t exist
Hi there, i’m getting this problem too and running appropriate SQL but i’m getting an error saying that wp-options doesn’t exist, any ideas?
Great tutorial by the way, it was very well explained and helped me no end. If I can fix this final little snag i’ll be the happiest man alive!
Many thanks!
Forum: Localhost Installs
In reply to: Local Host Has No ContentHi Sloyer,
i’ve tried this and no luck. All the plugins weren’t activated and it looks like some of the widgets are missing too.
Should I have to reconfigure all the widgets or should they all be in place already as I copied over a fully functioning site?
Forum: Localhost Installs
In reply to: Local Host Has No ContentHi Topher, I made a backup of the database from the original site and imported it into the database for the local site. I can see all the tables in PHPMyAdmin but am at a loss as to why this is happening.