Skip to main content
added 77 characters in body
Source Link

I suggest that you install FPW Category Thumbnails plugin. It will cover every scenario mentioned in your question. It will save you from maintaining code in functions.php, and will do it visually! The built-in FPW Post Thumbnails will add very powerful styling to your featured images (borders, shadows, margins, backgrounds, etc). You will be able to switch themes without losing its functionality!

Your code (if you want to use it) needs 24 changes to work. Replace:

if(!isset($_POST['_thumbnail_id'])) {

with

if(-1 == $_POST['_thumbnail_id']) {

and replace:

$cats = $post_categories->term_id;

with

$cats = $post_categories[0]->term_id;

In lines checking category id, change assign operator = to comparison ==.

I suggest that you install FPW Category Thumbnails plugin. It will cover every scenario mentioned in your question. It will save you from maintaining code in functions.php, and will do it visually! The built-in FPW Post Thumbnails will add very powerful styling to your featured images (borders, shadows, margins, backgrounds, etc). You will be able to switch themes without losing its functionality!

Your code (if you want to use it) needs 2 changes to work. Replace:

if(!isset($_POST['_thumbnail_id'])) {

with

if(-1 == $_POST['_thumbnail_id']) {

and replace:

$cats = $post_categories->term_id;

with

$cats = $post_categories[0]->term_id;

I suggest that you install FPW Category Thumbnails plugin. It will cover every scenario mentioned in your question. It will save you from maintaining code in functions.php, and will do it visually! The built-in FPW Post Thumbnails will add very powerful styling to your featured images (borders, shadows, margins, backgrounds, etc). You will be able to switch themes without losing its functionality!

Your code (if you want to use it) needs 4 changes to work. Replace:

if(!isset($_POST['_thumbnail_id'])) {

with

if(-1 == $_POST['_thumbnail_id']) {

and replace:

$cats = $post_categories->term_id;

with

$cats = $post_categories[0]->term_id;

In lines checking category id, change assign operator = to comparison ==.

added 16 characters in body
Source Link

I suggest that you install FPW Category Thumbnails plugin. It will cover every scenario mentioned in your question. It will save you from maintaining code in functions.php, and will do it visually! The built-in FPW Post Thumbnails will add very powerful styling to your featured images (borders, shadows, margins, backgrounds, etc). You will be able to switch themes without losing its functionality!

Your code (if you want to use it) needs 2 changes to work. Replace:

if(!isset($_POST['_thumbnail_id'])) {

if(!isset($_POST['_thumbnail_id'])) {

with

if(-1 == $_POST['_thumbnail_id']) {

if(-1 == $_POST['_thumbnail_id']) {

and replace:

$cats = $post_categories->term_id;

$cats = $post_categories->term_id;

with

$cats = $post_categories[0]->term_id;

$cats = $post_categories[0]->term_id;

I suggest that you install FPW Category Thumbnails plugin. It will cover every scenario mentioned in your question. It will save you from maintaining code in functions.php, and will do it visually! The built-in FPW Post Thumbnails will add very powerful styling to your featured images (borders, shadows, margins, backgrounds, etc). You will be able to switch themes without losing its functionality!

Your code (if you want to use it) needs 2 changes to work. Replace:

if(!isset($_POST['_thumbnail_id'])) {

with

if(-1 == $_POST['_thumbnail_id']) {

and replace:

$cats = $post_categories->term_id;

with

$cats = $post_categories[0]->term_id;

I suggest that you install FPW Category Thumbnails plugin. It will cover every scenario mentioned in your question. It will save you from maintaining code in functions.php, and will do it visually! The built-in FPW Post Thumbnails will add very powerful styling to your featured images (borders, shadows, margins, backgrounds, etc). You will be able to switch themes without losing its functionality!

Your code (if you want to use it) needs 2 changes to work. Replace:

if(!isset($_POST['_thumbnail_id'])) {

with

if(-1 == $_POST['_thumbnail_id']) {

and replace:

$cats = $post_categories->term_id;

with

$cats = $post_categories[0]->term_id;
added 262 characters in body
Source Link

I suggest that you install FPW Category Thumbnails plugin. It will cover every scenario mentioned in your question. It will save you from maintaining code in functions.php, and will do it visually! The built-in FPW Post Thumbnails will add very powerful styling to your featured images (borders, shadows, margins, backgrounds, etc). You will be able to switch themes without losing its functionality!

Your code (if you want to use it) needs 2 changes to work. Replace:

if(!isset($_POST['_thumbnail_id'])) {

with

if(-1 == $_POST['_thumbnail_id']) {

and replace:

$cats = $post_categories->term_id;

with

$cats = $post_categories[0]->term_id;

I suggest that you install FPW Category Thumbnails plugin. It will cover every scenario mentioned in your question. It will save you from maintaining code in functions.php, and will do it visually! The built-in FPW Post Thumbnails will add very powerful styling to your featured images (borders, shadows, margins, backgrounds, etc). You will be able to switch themes without losing its functionality!

I suggest that you install FPW Category Thumbnails plugin. It will cover every scenario mentioned in your question. It will save you from maintaining code in functions.php, and will do it visually! The built-in FPW Post Thumbnails will add very powerful styling to your featured images (borders, shadows, margins, backgrounds, etc). You will be able to switch themes without losing its functionality!

Your code (if you want to use it) needs 2 changes to work. Replace:

if(!isset($_POST['_thumbnail_id'])) {

with

if(-1 == $_POST['_thumbnail_id']) {

and replace:

$cats = $post_categories->term_id;

with

$cats = $post_categories[0]->term_id;

added 68 characters in body
Source Link
Loading
Source Link
Loading