Forum Replies Created
-
AuthorPosts
-
October 2, 2020 at 8:07 am in reply to: Categories not showing in "blog post slider" and "show blog posts" #1249987
Hi, I am sorry but the provided thread is not helpful for me … just seems to leads to another thread and another thread. Could you please provide just the proper code snippet and where to place it exactly? Thank you so much in advance, Ursula
September 29, 2020 at 8:16 am in reply to: Categories not showing in "blog post slider" and "show blog posts" #1249280Hi,
I found this code in the thread and copied it to child functions.php and it seems to work :——-
function post_category_shortcode(){
global $post;
$categories = get_the_category($post->ID);
$separator = ‘ ‘;
$output = ”;
if ( ! empty( $categories ) ) {
foreach( $categories as $category ) {
$output .= ‘term_id ) ) . ‘” alt=”‘ . esc_attr( sprintf( __( ‘View all posts in %s’, ‘textdomain’ ), $category->name ) ) . ‘”>’ . esc_html( $category->name ) . ‘‘ . $separator;
}}
return trim( $output, $separator );
}
add_shortcode( ‘sc_post_category’, ‘post_category_shortcode’ );
——But where do I have to place the shortcode [sc_post_category] to make it show the categogy besides the date right under the headlines? I provided a link to files where I visualized this (example with “Blog Beiträge” element).
Kind regards, Ursula
Hi, worked perfectly – sometimes things can be so easy :) Kind regards, Ursula
This reply has been marked as private.Hi Mike,
thank you so very much for your help. Everything is working perfectly now – exactly the solution I needed. I appreciate your kind and patient support very much.
Kind regards,
UrsulaThis reply has been marked as private.This reply has been marked as private.Hi Mike,
no problem with the late reply. I am very thankful for your help anyway anytime :)I tried the proposed css for 2/3 by putting it in “General Styling > Quick CSS” and cleared cache a few times. But it didn’t work – instead, all the changes I set up in “Advanced Styling” seem not to work anymore …? This is quite a big problem for me now.
I didn’t want to use WordPress > Customize > Additional CSS because as far as I understand, this changes wil get lot on updating the theme. Is that right?
Please see login below, maybe it’s easier for you to figure out what’s going wrong …
Kind regards
UrsulaHi Rikard,
sorry for being so hard to understand – my english has become worse over the years not using it.
I try to explain the matter and please see attached link: When using “Post Slider” the size of the headlines always ramains the same (H3) – no matter whether we use 1, 2 or 3 posts showing over the full width. What we want is a bigger headline e.g. if we show 1 post over 2/3 of the width (as on the left side of the page linked below). Because the picture is bigger, the headline seems to be too small – is there any possibility to increase the size of the headline for a particular post slider?
Thanks
Ursula -
AuthorPosts