Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1447285

    Hi;
    i am using the blog as news page. The setting is 3 news in row in raster format as usual setting.
    Would it be possible to place a news per row?
    [images ] [headline + text + link]

    It should looks like here: https://evelyn-kuehne.de/aktuelles/

    • This topic was modified 2 weeks, 6 days ago by xeovision.
    #1447394

    Hey Sebastian,
    By raster do you mean grid?
    That would be very tricky to overwrite, and our list style doesn’t have images, I believe the best option would be to use a plugin for list style posts, and add it’s shortcode to the page.

    Best regards,
    Mike

    #1448192

    Hi .. good idea, so i did setup a plugin for such view .. it works like expected.
    BUT – it is always a but :) … i using the blog system for news and also products.

    Display on 2 different pages, page NEWS shows news the category A and PRODUCT page shows the category B.
    This works fine.
    The problem is now, that on the blog news single page i have added the area block from page NEWS .. so this NEWS block comes also on the page with PRODUCTS .. this shows a wrong headline now .. is here an option so add in functions that differse inbetween both pages?

    If page NEWS show area 1
    If page PRODUCTS show area 2
    ?

    #1448526

    Hi,
    Thanks for the lin to your pages, but when I check the heading for each seems to be correct.
    Please explain the issue further and perhaps a screenshot would help.

    Best regards,
    Mike

    #1448530

    Yes but you see the same head area “Veranstaltungen” on both sides. So the text does not fit to the Books page.
    Sure the reason is that i use the blog for 2 different contents.

    So i need a workaround in function.php that display different header area in “Veranstaltungen” and “Books” .. maybe controlled by the page ID?

    It is difficult to describe, but see the area block (brown with with H1) and open an event. On new browser window open a Book description, you see that both has the same header with content and headline from Veranstaltungen because we defined it in the function.php that this one should be shown on single blog event. This is bcs i use Veranstaltunge AND books as blog pages.

    • This reply was modified 2 weeks, 1 day ago by xeovision.
    #1448533

    Hi,
    When I check only one is Veranstaltungen, the other is Lesestoff entdecken, and both of these are built into your page and not from your functions.php code, so you can change this directly in your page instead of your functions.php Please see the screenshot in the Private Content area of what I see.

    Best regards,
    Mike

    #1448535

    I have record it as short clip for better understanding

    #1448570

    Hi,
    Ok thank you, I understand better now 🙂, but your site has changed since that video, Lesestoff entdecken is not a menu option now.
    Enfold Support 6033
    So I try to adjust this with the menu item Buchtipps I hope that I understand correctly.
    So the items under Buchtipps so header of Veranstaltungen, so basically your Veranstaltungen is built-in:
    Enfold Support 6035
    you can create a difficult code based on the category:
    Enfold Support 6037
    So please try adjusting this

    Best regards,
    Mike

    #1448608

    Thanks, that might be the way, seletive header by category .. but how should it looks like?

    if(get_post_type( $post_id ) == “post” || is_archive() || is_category()) {
    ?

    • This reply was modified 2 weeks ago by xeovision.
    #1448618

    Hi,
    if(get_post_type( $post_id ) == "post" || is_archive('xxx'))
    xxx is the category ID number
    your original code has is_archive() || is_category() but is_archive() covers is_category() so you should not need both, then add the category ID

    Best regards,
    Mike

    #1448638

    hmmm…something will not work like you wrote :)

    I add 2 header areas and gave each a differen page ID .. so far so fine but i could not save it and get always this error
    Cannot redeclare ava_after_main_title_mod() (previously declared in wp-content/themes/enfold-child/functions.php:63)

    /* area img on archive Events

    
    add_action('ava_after_main_title', 'ava_after_main_title_mod');
    function ava_after_main_title_mod() {
    	$post_id = get_the_ID();
        if(get_post_type( $post_id ) == "post" || is_archive('3658'))  {
    		echo 'xxxxcontentxxxxx';
    	}
    }
    

    /* area img on archive Bücher

    
    add_action('ava_after_main_title', 'ava_after_main_title_mod');
    function ava_after_main_title_mod() {
    	$post_id = get_the_ID();
       if(get_post_type( $post_id ) == "post" || is_archive('3443'))  {
    		echo 'xxxxcontent-2xxxxx';
    	}
    }
    

    Whats wrong here?

    #1448641

    Hi,
    You can’t redeclare ava_after_main_title_mod(), so you need to rename it like this:
    the first one:

    add_action('ava_after_main_title', 'ava_after_main_title_one');
    function ava_after_main_title_one() {
    	$post_id = get_the_ID();
        if(get_post_type( $post_id ) == "post" || is_archive('3658'))  {
    		echo 'xxxxcontentxxxxx';
    	}
    }

    then the next one:

    add_action('ava_after_main_title', 'ava_after_main_title_two');
    function ava_after_main_title_two() {
    	$post_id = get_the_ID();
       if(get_post_type( $post_id ) == "post" || is_archive('3443'))  {
    		echo 'xxxxcontent-2xxxxx';
    	}
    }

    Best regards,
    Mike

    #1448644

    ahh .. ok, now, i can save it.
    Both different header are shown. So, now i need to make the opposite invisible… I thought it will be only ony dispayled when using unique IDs

    #1448677

    I have seen your change MIKE

    add_action('ava_after_main_title', 'ava_after_main_title_one');
    function ava_after_main_title_one() {
    	$post_id = get_the_ID();
        if(get_post_type( $post_id ) == "post" && has_category('veranstaltungen'))  {

    Pretty cool .. many many thanks

    …so i am glad and we can close here

    #1448678

    Hi,
    I see that both 3658 & 3443 are post IDs, I thought that you wanted to use the category IDs so that you could set this for each category instead of creating an array of post IDs
    So I changed it like this using the category slugs instead of the IDs so it will be easier to read: if(get_post_type( $post_id ) == "post" && has_category('veranstaltungen')) {
    and
    if(get_post_type( $post_id ) == "post" && has_category('buecher')) {
    and this seems to be working correctly, please check.

    Best regards,
    Mike

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.