[Support request] Blog Page, Archive Page (customizing)

Home Forums Support Blog Page, Archive Page (customizing)

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1497951
    Ernst Wilhelm

    I’ve started with my generatepress website very close to WordPress. Some month ago I changed my focus on showing my images, not that much on blogs. And I want to go more into this direction making use of appearance block elements to show posts in a very lean way (3rd party plugins).

    Now my question. Is it possible to have blog Page, category pages in place without having the content as foreseen by WordPress? Executing the appearance block element and then stop.

    Newbie with generatepress

    #1498547
    David
    Staff
    Customer Support

    Hi there,

    not sure i fully understand.
    So instead of displaying the content, you would only want to display the content of a Block Element?

    Are our you trying to use the Block Element to ‘design’ the archive post content ?

    #1498574
    Ernst Wilhelm

    Hi David.

    1. Yes.
    2. Yes and no. I am calling a plugin shortcode. This plugins is a small and lean solution for designing the post content.

    Thanks.

    Newbie with generatepress

    #1498594
    David
    Staff
    Customer Support

    Replacing the Blog / Archive loop is possible but currently requires code to do that, and integrating that with another plugin would require custom development.
    The only alternative method to that is to create static pages for your blog / archives – but this comes with its own set of problems and difficulties.

    Do you have an example site of what you’re trying to achieve? It may be simply resolved with some CSS.

    #1498627
    Ernst Wilhelm

    David.

    If you look at this Archive : between Header/Navigation and Archive loop I have some blog posts and a pool of images with the same category term assignment (different taxonomy). You will see that this 3 posts are equal to the first 3 posts of the archive loop. The plugin gives me several tweaks. From that viewpoint integration with another plugin is already done. 🙂

    Let me know what you think. Thank you.

    Newbie with generatepress

    #1499532
    David
    Staff
    Customer Support

    So to confirm – in your example – you only want to display the Plugin list in the element – and remove the default post loop ?

    #1499535
    Ernst Wilhelm

    The plugin list and the images (both in the element) to be displayed and remove the default post loop. Yes.

    Newbie with generatepress

    #1499581
    David
    Staff
    Customer Support

    Where will the images come from?

    #1499758
    Ernst Wilhelm

    David. Everything is okay so far. The images are in the standard wp library. The gallery tool I am using is mla media library assistant. The shortcodes are already in place. Our do you need to change this approach so far in order to remove the Archive loop?

    look here https://ernst-wilhelm-grueter.de/category/alltag-menschen-street/

    Newbie with generatepress

    #1500082
    David
    Staff
    Customer Support

    Any chance you could provide a Mockup image of what you’re trying to achieve?
    Sorry we’re still not getting what the final design should look like.

    #1500257
    Ernst Wilhelm

    1. At the bottom a piece of code which is already in place, most likely you will understand. This piece of code is part of a php snippet, called via an own shortcode.
    2. This shortcode is called via a shortcode block element, block_type=Hook, Hook=generate_after_archive_title, Priority=10, Location=Post Category Archive, All Categories
    3. The specific plugin “W4 Post List” causes corresponding posts to be displayed, corresponding posts of the selected category need to be in place.
    4. Call https://ernst-wilhelm-grueter.de/category/test/ , for the time being I’ve colored a specific title attribute into white. So you can see what I want to achieve. There is exactly one post with the appropriate category. But it looks like what I want to achieve.

    Hope this helps, Ernst-Wilhelm

    <?php
    
    $searchstring = $_GET['sk'];
    if (empty($searchstring)) {
    
    $ewg_category = get_queried_object();
    $searchstring = get_cat_name( $ewg_category->term_id);
    
    }
    
    switch ($searchstring) {
    
    case "Aktuelles":
    echo do_shortcode('[postlist id=40496]');
    Break;
    
    case "Antifa":
    case "Antifaschismus":
    echo do_shortcode('[postlist id=40489]');
    Break;
    
    case "Test":
    echo do_shortcode('[postlist id=40489]');
    Break;
    
    case "Antira":
    case "Antirassismus":
    echo do_shortcode('[postlist id=40452]');
    Break;
    
    case "Autoritäre Bewegungen":
    echo do_shortcode('[postlist id=40508]');
    Break;
    
    case "Refugees Welcome":
    case "Flüchtlingsdemonstrationen":
    echo do_shortcode('[postlist id=40493]');
    Break;
    
    case "Kunst und Kultur":
    echo do_shortcode('[postlist id=40511]');
    Break;
    
    case "Alltag Menschen Street":
    case "Alltag Menschen Street":
    echo do_shortcode('[postlist id=40510]');
    Break;
    
    case "Gender":
    case "Gender Sexualität Identität":
    echo do_shortcode('[postlist id=40505]');
    Break;
    
    case "We stand united":
    case "Solidarität":
    echo do_shortcode('[postlist id=35499]');
    Break;
    
    case "Soziale Bewegungen":
    echo do_shortcode('[postlist id=39417]');
    Break;
    
    case "Umwelt- und Naturschutz":
    echo do_shortcode('[postlist id=40492]');
    Break;
    
    case "Urbane Fotografie":
    echo do_shortcode('[postlist id=40513]');
    Break;
    
    case "Urlaub und Reisen":
    echo "postlist id undefiniert";
    Break;
    
    case "Peace":
    case "Friedensbewegung":
    echo do_shortcode('[postlist id=41296]');
    Break;
    
    default:
        echo "<br>default: " . $searchstring;
    Break;
    }
    
    echo "<br><p align='center'><a href='https://ernst-wilhelm-grueter.de/gezielte-bildersuche/?sk=" . $searchstring . "'><strong>Bilder zum Thema</strong></a></p><hr class='wp-block-separator has-text-color has-background has-cyan-bluish-gray-background-color has-cyan-bluish-gray-color is-style-wide'>";
    
    ?>

    Newbie with generatepress

    #1500465
    Tom
    Lead Developer
    Lead Developer

    It’s difficult to see this because the shortcode (I guess?) is using the same markup as the theme, so it’s impossible to tell what’s coming from the theme and what’s coming from the shortcode.

    Can I ask what the purpose of the shortcode is? Why not use the default theme loop?

    #1500512
    Ernst Wilhelm

    The idea is to give users a text, stringbased overview of posts. It can be easier to find a post of useful information if there is no mix of text information and images. It seemed to me it would be easier to go the way I took so far (element, plug-in).

    I have no deeper knowledge about markups.

    Tom, David. Perhaps it is a good point, to stop here. I hoped to would be much easier. Let me thank you both. I appreciate your help a Lot.

    Newbie with generatepress

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