Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Can you tell me where exactly I can set the query argument to only query for top level posts? I have to say I do not know which file in Filezilla contains the code that generates the custom post type archive page?

    The template file is probably generated by Headway Theme as Headway is a ‘drag and drop’ theme with an interface. I have very limited coding skills.

    An alternative solution which I tried is that I actually got the menu to work by inserting a ‘custom code block’ within Headway containing the following code

    <h1> Kennisbank</h1><p></p>
    
    <?php
    $args = array(
      'depth'=> 1,
      'post_type'=>'kennisbank',
      'title_li'=> __('Kennisbank')
      );
    wp_list_pages( $args );
    ?>

    However, this results in a list without styling and where it is not ‘visually integrated’ with the other pages of my website. I looked on ‘styling wp_list_pages’ with css, but I don’t have any clue.

    Any input from your side would be great. Thanks a lot for your posting:)

    PS. This is the link to my custom post type archive page: https://bit.ly/1wG3IQs

    You can see from the child article pages of my custom post type ‘kennisbank’ how the page shoud visually look.

    I am not that experienced with developing websites, so I try my best to explain this well:

    https://fourhourbody.nl/kennisbank/ this is my custom post type archive page

    it currently lists both parent and child pages, and I only want this archive page to display parent pages.

    As I understand it, the listing of the posts here is generated by some code like wp_list_pages ( something )

    Now my problem is, I don’t know how to adapt the existing list as such that the layout (including the custom bullet points) do not change, but only that the parent pages are listed. As I am using Headway themes to create my website, I assume that the function.php is ‘generated’ by Headway, and I think I have to create a child theme and then add or eliminate some code to make this adaption? I rather solve this within Headway without changing code or creating a child theme. Is this possible?

    Hopefully I expressed this clear enough:)

    Hi Michael and Jessi,

    By finding this great post I came close to the solution, but not yet completely.

    I have an archive page that lists only the parent posts. I created the custom post type with your plugin custom post type UI. As my site works on headway them and I control my css and visual styling from there, is there anything you can suggest?

    https://fourhourbody.nl/kennisbank/

    Hi Michael,

    Not sure whether this is tackled somewhere but can’t find the solution after loooong hours of searching.

    I used the plugin Custom Post Types UI to create a custom post type. Now a new archive page has been created. Then I created posts and child posts that are assigned to their parent post.

    Now, on the archive page, both the parent posts and the child posts are displayed in a list (this is a list of the posts that I created). Is there a way to display only the parent posts and not the child posts?

    Many thanks for your reply:)

    Fred

    I have the same problem with the twenty ten theme.
    twenty ten does not have content.php but loop.php instead.
    I suspect that I have to change a similar thing, but can’t find it. I have searched a lot of forums for a solution of displaying the featured image left of the text i.e. wrapping the text aroudn the feautred image but haven’t found anything that worked. Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)