• JohnnyScience

    (@johnnyscience)


    I am setting up specific pages for specific topics and would like to have only the blogs with certain categories populate on these pages.

    How would I go about doing that?

Viewing 15 replies - 1 through 15 (of 17 total)
  • Raja Mohammed

    (@cthreelabs)

    You should be creating a new page template with a custom query and assign the template to your specified pages.

    Thread Starter JohnnyScience

    (@johnnyscience)

    Hmm, I’ve never done that before, do you know of a good walk-thru?

    Raja Mohammed

    (@cthreelabs)

    That’s a bit of coding i would recommend that, But you want a plugin to solve your issue you can use https://wordpress.org/plugins/list-category-posts/ and the list of categories would be displayed with a shortcode [catlist name=apples+oranges]

    Thread Starter JohnnyScience

    (@johnnyscience)

    Ahh yeah I’m not a programmer so a plugin is def a must for me, that sounds like it would work for me, I will try it out and let you know if I have any problems.

    Thank you!

    Thread Starter JohnnyScience

    (@johnnyscience)

    Ok that seemed to work perfect, however it lists them as just a list, is there a way to populate them so they are the visually appealing blog post with the Featured Image, date, brief description etc?

    Thread Starter JohnnyScience

    (@johnnyscience)

    Also, the part of the category code I want to be using is the “slug” correct?

    [catlist name=”oneill”]

    The Category Name: Justice Bill O’Neill
    The Category Slug: oneill

    Slug = code to enter in the catlist shortcode quote correct?

    Raja Mohammed

    (@cthreelabs)

    There is a list of parameters https://github.com/picandocodigo/List-Category-Posts/wiki/More-parameters-you-can-use

    To display post with thumbnail and content/excerpt [catlist name=”catgory_slug” excerpt=yes content=yes thumbnail=yes ]

    Thread Starter JohnnyScience

    (@johnnyscience)

    Hmm this is weird, on this page the particular category populates correctly:

    http://www.ohiocannabis.com/hb523

    [catlist name=”hb523” thumbnail=yes excerpt=yes]

    But this page is displaying additional blog posts from other categories when I only have 1 particular category in the code and only 1 blog assigned to the crypto slug:

    http://www.ohiocannabis.com/crypto/

    [catlist name=”crypto” thumbnail=yes excerpt=yes]

    This page should only be displaying the 1 blog post about Cannabis Cryptocurrency: Potcoin

    Not sure how or why the others are showing up, how can we fix that? This is the only page having issues with displaying the correct categories.

    Any any idea on how to fix the images?

    Thread Starter JohnnyScience

    (@johnnyscience)

    Nevermind that last post, seems there must have been something hidden in the copy/paste and I redid all the individual page list codes and they are populating fine now.

    But it would be nice to have the images show up in a more visually appealing way instead of just right in the middle.

    I’m trying to follow this walk-thru for a template setup:

    http://sundari-webdesign.com/wordpress-the-quest-to-my-perfect-list-view-for-posts-events-and-articles/

    I uploaded the folder & files it told me to:

    wp-content\themes\child-theme\list-category-posts\perfectlist.php

    But as I follow along, I don’t understand how to get it to use the template, they said use the code:

    [catlist name=”crypto” excerpt=yes thumbnail=yes template=perfectlist]

    But it doesn’t seem to populate? ohiocannabis.com/crypto

    It seems I have to add some CSS to the template? Do I add it direcly to the perfectlist.php file? Or some where else?

    Raja Mohammed

    (@cthreelabs)

    Child theme should be extending your activated Theme. You don’t need a template now you can simply add CSS rules and fix the layout try adding this css

    #dslc-theme-content-inner .lcp_catlist{
     list-style:none !important;
     margin:0;
    }
    
    .lcp_catlist li img.wp-post-image{
     float:left !important;
     display:inline-block;
     margin-right:15px;
    }
    Thread Starter JohnnyScience

    (@johnnyscience)

    Nevermind I figured it out. Ok thank you!

    What should I do to separate multiple blog entries so they’re not smashed together?

    Thread Starter JohnnyScience

    (@johnnyscience)

    http://www.ohiocannabis.com/cbd/

    See like on that page for instance, only the 1st article has a picture attached, but it looks as if all 3 of them are attached to that picture.

    How can we divide them with borders to make it look nicer?

    Raja Mohammed

    (@cthreelabs)

    Add default images for those posts without thumbnail. you need to add to each post. if you have a default image in your theme options you can use it.

    Raja Mohammed

    (@cthreelabs)

    .lcp_catlist li{
     margin-bottom:20px;
     display:block;
     width:100%;
     clear:both;  
    }

    add the above CSS this enables you to display each post separate with adequate spacing.

    Thread Starter JohnnyScience

    (@johnnyscience)

    Great, thank you!

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘Can I populate only certain blog categories on pages?’ is closed to new replies.