cybershot
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: help getting featured image from custom post typewell, I have changed the code a few times. This is version 3.
add_action('init', 'OurMenu'); function OurMenu(){ $OurMenu_args = array( 'label' => __('Our Menu'), 'singular_label' => __('Our Menu'), 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => true, 'supports' => array('title', 'editor','page-attributes','thumbnail') ); register_post_type('OurMenu', $OurMenu_args); } add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 132, 133, true );
then in my template file, I have it set up right, I just need the featured image to show. I tried this
$loop = new WP_Query( array( 'post_type' => 'OurMenu', 'posts_per_page' => 3 ) ); while ( $loop->have_posts() ) : $loop->the_post(); echo '<div class="menupageContent">'; get_the_post_thumbnail(); ?><p class="textYellow arrow"><?php the_title(); ?></p><?php the_content(); echo '</div>'; endwhile;
I have tried
get_the_post_thumbnail();
get_the_post_thumbnail($id);
get_the_post_thumbnail(the_ID(), 'thumbnail');
get_the_post_thumbnail($loop->ID, 'thumbnail');
nothing is working. In every case, there is no output for the image. One version does display the ID where the image should be. Just not the image. I have checked the database. I see the posts, but I do not see any row for featured image. The image does not show up in the content in the database. I can see the image under “featured Image” in the admin area when editing the post.
Forum: Fixing WordPress
In reply to: help with my admin page codenever mind, I got it
Forum: Themes and Templates
In reply to: confused on theme filesI figured out the problem. I made a page template and called it home.php. I changed the filename to homepage.php and that fixed things.
Forum: Themes and Templates
In reply to: confused on theme filesI have tried the static homepage and it isn’t working. The blog page shows the homepage for some reason. Here is a link to the site. I don’t know what you can find out by having it so that will be interesting to find out.
Forum: Fixing WordPress
In reply to: am I doing this admin menu correctly?OH! that is awesome. Thank you, that is what I was looking for!
Forum: Fixing WordPress
In reply to: am I doing this admin menu correctly?without the query all together?
Forum: Themes and Templates
In reply to: confused on theme filesalso, I do need to query the posts in a category to fill a div. I had this working before. but it seems as if the static page will not query the posts. When I set the home.php as the template for the homepage, the info in the div disappeared.
Forum: Themes and Templates
In reply to: confused on theme filesthis isn’t working. I followed the instructions. but for the blog page, it is using the home.php which I created as a template and assigned to the static homepage as those instructions suggest. But now, when I go to the blog page, it is using the home.php even though it is not assigned to the blog page.
Forum: Fixing WordPress
In reply to: help with shortcodesI figured out that its because its a page template. I can’t get it to work in the template files. It works everywhere else, just not the templates
Forum: Fixing WordPress
In reply to: help with footerTrue true. I wasn’t even looking in the sidebar. I thought it was a coding issue in the footer.
Forum: Fixing WordPress
In reply to: help with footerI usually do to. That is one of those tricks that I just forgot. I haven’t coded anything in such a long time that my skills are getting cold. I am in school for web design and I am about to graduate. But I have been spending so much time on marketing class, history 101 and all the other crap they make you take that I haven’t had the time to work on any sites. So I have been forgetting those little tidbits of information that help you solve problems like this
Forum: Fixing WordPress
In reply to: help with footerYa, I can’t believe I missed it. I made the one mistake and then copied and pasted it into two different locations. when I fixed them all, it solved the problem. One misted tag cause that huge issue
Forum: Fixing WordPress
In reply to: help with footerYou did it! I cannot believe I missed that. Thank you so much! this was driving me crazy. I really appreciate your assistance!
Thank you!
Forum: Fixing WordPress
In reply to: help with footerI will look to make those changes right now.
Forum: Plugins
In reply to: help with plugin developmentI finally found a tutorial that was written well enough to help me figure it out.
https://blancer.com/tutorials/50837/how-to-integrate-an-options-page-into-your-wordpress-theme/