Chris Huff
Forum Replies Created
-
Forum: Hacks
In reply to: Make Theme Show Full Post instead of ExcerptsChange this:
<?php the_excerpt() ?>To this:
<?php the_content(); ?>Forum: Fixing WordPress
In reply to: Take out featured image from articlesDo you have a single.php file in your theme? Post its code here and we’ll take a look.
Forum: Hacks
In reply to: Make Theme Show Full Post instead of ExcerptsLooks like the next step would be to look for either of those pieces of code in the theme’s file named wp-blog-header.php
I’m guessing they won’t be in there either, though, so if not, post that file’s contents as well and I’ll continue to help you track down the right file.
Forum: Themes and Templates
In reply to: Removing featured image from post (keep on homepage)Just a guess, but I bet you can remove the featured image from the post by removing this line:
<?php glades_display_thumbnail_single(); ?>Forum: Hacks
In reply to: Make Theme Show Full Post instead of ExcerptsIt’s difficult to give you exact advice without seeing your code, since your code could be written one of many ways.
On the index.php file of your theme, see if you can find this somewhere in the code:
get_the_excerpt();Or maybe this:
the_contentCopy and paste the lines of code that contain this (and a few lines above and below), and maybe I can help.
Forum: Hacks
In reply to: Can't access plugins or updatesIf that plugin is truly the problem, you can deactivate it by renaming it. You can usually do this via ftp or your hosting control panel. Just rename the plugin’s folder or main php file. Then access the WordPress plugins page. It should be deactivated at that point. Then you can rename the plugin so that it will appear in WordPress again, but it will remain deactivated until you activate it once again.
Forum: Themes and Templates
In reply to: Removing featured image from post (keep on homepage)You looked in the right place, but your theme uses this:
get_template_part( 'content', 'single' );Therefore, you need to look for a file named “content-single.php”. I’m guessing the code for the thumbnail will be in it. Usually, the code you want to remove looks something like this:
<?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. the_post_thumbnail(); } ?>Hope this helps.
Forum: Plugins
In reply to: [JSON API] identify featured image from attachment arrayI don’t think you can tell by looking at the data from the images. I think you need to look at data from the posts themselves. Look for the value of the “_thumbnail_id” key, and if there’s a featured image attached, this should give you the ID of the image.
Forum: Fixing WordPress
In reply to: Featured image from blog post not showing up on FaceBookLooking at the page source, it looks like you have WordPress SEO by Yoast installed. On the edit post screen, there should be a section for this plugin below the content area. Go to the “Social” tab, and you’ll find a spot labelled “Facebook Image”. You’ll need to click “Upload Image” and then either upload an image or select the image you’d like to use from your WordPress Media Gallery.
I use SEO Ultimate, which automatically sets this image for me, using the Featured Image. But each plugin has it’s pros and cons, I suppose.
Forum: Hacks
In reply to: Plugin updatesJust update the version numbers in your-plugin.php and readme.txt files. Users will be notified of the new version automatically.
You should also have changelog and upgrade notice sections in your readme.txt file, something like this:
== Changelog == = 1.1 = * Some really cool feature * Another awesome feature = 1.0 = * First version == Upgrade Notice == This is a great new version with some really cool features.Forum: Hacks
In reply to: Don't trim space at the endmndewitt, my plugin writes text to an image. I had a feature request that asked if he could have “- ” (without quotes) added to the beginning of the text to be written to the image, like an attribution to an author. So that it would be more diverse, I wanted to allow users to input whatever they wanted to be added before and after the text to be written. But if the user inputs a dash and a space, the space is trimmed and only the dash is saved to the database.
ryanmclaughlin1, thanks for the ideas. I don’t think the filters you mentioned would work, since it only needs a space at the beginning or the end IF the WordPress user inputs them (not just all the time). But I think you might be on to something with saving it as an array. Kind of a hack, but I’ll have to look into that.
Forum: Hacks
In reply to: Don't trim space at the endI reread the first sentence of my question and realized I left a word out that made it confusing. I apologize. Here’s what it should have said.
Via my plugin’s settings page, I’m trying to save a string to the database that has a space at the end of the string, which I want it to have.
I also found that spaces at the beginning are being stripped out as well. I’d like these to also be retained.
Forum: Hacks
In reply to: Make an image resource available to another pluginThank you so much!!! Exactly what I need to do!
Forum: Hacks
In reply to: Set Thumbnails via DatabaseSo, since no one has offered a SQL solution to this, I thought I may as well offer a PHP solution I use in a plugin I wrote. Just paste it in the functions.php file of your theme.
// Set the first attached image as the featured image, if there isn't one yet function set_featured_image($post_id) { $post = get_post( $post_id ); if (get_the_post_thumbnail($post->ID) != '') return; $images = get_posts( array( 'post_type' => 'attachment', 'post_mime_type' => 'image', 'post_parent' => $post->ID, 'posts_per_page' => 1, /* Save memory, only need one */ ) ); require_once( ABSPATH . 'wp-admin/includes/image.php' ); // Set the first image as the featured image if(count($images) > 0){ set_post_thumbnail( $post->ID, $images[0]->ID ); } } add_action( 'the_post', 'set_featured_image' );Basically, any time the homepage or a post is visited, it checks to make sure there is a featured image set, and if not, sets the first attached image as the featured image.
Sorry I can’t offer a SQL solution, but this does work.
Forum: Themes and Templates
In reply to: remove featured img in post display only, but keep featured imgYou’ll need to edit your theme. For how a single post is displayed, you’ll usually edit the single.php file.
Find the code that includes the featured image and either comment it out or just remove it. The code will usually look something like this.
<?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. the_post_thumbnail(); } ?>Be careful, though, if you don’t know what you’re doing here, you could really mess things up, and cause your website to produce errors or even break your website completely. I’d hire someone familiar with WordPress coding if you’re not already familiar with it.