vyww
Forum Replies Created
-
Forum: Themes and Templates
In reply to: different widths for image and text?Forum: Themes and Templates
In reply to: custom css for category pagesWorks great, thank you!! π
Forum: Themes and Templates
In reply to: custom css for category pagesIt works perfectly on the entry page but strangely zoomed in on the category page?
Forum: Themes and Templates
In reply to: custom css for category pagesAh I think it was the typo! It works now, thank you so much for your patience π
Forum: Themes and Templates
In reply to: custom css for category pagesOh dear I don’t know what’s wrong but I’ve added the codes
add_filter('body_class','add_category_to_single', 10, 2); function add_category_to_single($classes, $class) { if (is_single() ) { global $post; foreach((get_the_category($post->ID)) as $category) { // add category slug to the $classes array $classes[] = "cateogry-" . $category->category_nicename; } } // return the $classes array return $classes; }but the custom CSS still doesn’t show up on the entry page
Forum: Themes and Templates
In reply to: custom css for category pagesI’m sorry this is so much trouble! I pasted the code above, with the 2 replacements of “custom_add_category_to_single” and it says:
Warning: Missing argument 2 for custom_add_category_to_single() in /home/vyee/public_html/wp-content/themes/origami/functions.php on line 457
class=”archive category category-blog category-14 logged-in admin-bar no-customize-support custom-background”>Forum: Themes and Templates
In reply to: add space under the side by side imagesOmg this is wonderful, I don’t even need to adjust the widths now! Thank you!! π
Forum: Themes and Templates
In reply to: custom css for category pagesI’m not sure what’s wrong, but when I add the code (replacing it with the “custom_add_category_to_single”), I get this on the website:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘add_category_to_single’ not found or invalid function name in /home/vyee/public_html/wp-includes/plugin.php on line 173
Warning: join(): Invalid arguments passed in /home/vyee/public_html/wp-includes/post-template.php on line 389
class=””>Forum: Themes and Templates
In reply to: add space under the side by side imagesI have changed the images to
alignleftandalignrightbut they don’t align. How do I set this?Forum: Themes and Templates
In reply to: custom css for category pagesIt says: Cannot redeclare origami_print_styles().
Sorry about this, as I know nothing about php, but which part of functions.php should I place the code?
In case it’s needed, here’s the functions.php:
[Excessive code moderated. Please use a pastebin.]
Forum: Themes and Templates
In reply to: custom css for category pages