Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #22848

    Hi. I love the theme!

    I want to use the blog layout but for custom posts in their own directory. I can’t get the html in the loop to load.

    I have created a child theme and have done the following:

    • I’ve copied the Index.php and labeled it cases.php

    » Added a template label to cases.php

    » Changed “get_template_part( ‘includes/loop’, ‘index’ );” to “get_template_part( ‘includes/loop’, cases’ );”

    • Copied single.php and created a single-case.php

    • Copied loop-index and created a loop-cases.php

    » Added post query for cases to loop-cases.php

    What am I missing something? If this it too much trouble, how much would I need to pay for an answer?

    Thank you some much for your time!

    Bethany

    #117498

    Hi Bethany,

    A page template in wordpress is what would be selected from the templates dropdown when creating a page. So adding the template label inside your cases.php would give you that file showing in that dropdown.

    If you have not already, this is a good overview of templates http://codex.wordpress.org/Stepping_Into_Templates and http://codex.wordpress.org/Page_Templates

    Generally, I’m not sure you’ll be able to do what you are looking for just because a custom post type isn’t a post but actually a page (a weird wordpress naming scheme). Blog posts specifically are the only thing in worpdress that gets treated like actual blog posts with the ability to use archives by date and things like that.

    If its just the style of the page however, you may find this tutorial by Nick helpful: https://vimeo.com/channels/aviathemes/64996057

    Regards,

    Devin

    #117499

    Thank Devin for your help.

    I have managed to get custom posts to feed into the blog and almost look like regular blog post but is missing some of the html. The custom posts have the small meta box picture to the left but the content is flowing over into the left margin because it is missing or because the css classes for the blog are not being applied. What can I do? Thank you so much. I seriously google a ton before asking question and I feel I understand more.

    Bethany

    #117500

    Hey!

    Please post a link – I need to investigate the html code to find the missing classes.

    Regards,

    Peter

    #117501
    #117502

    Actually, go this this one instead.

    http://www.advocateswest.org/awnewsite/the-work/cases/

    #117503

    Never mind. I am have php issues on the other site.

    http://bethanywalter.com/advocateswest/cases/

    #117504

    Hi,

    This seems to be working. Please add this on your custom.css

    .cases .entry-content.clearfix.standard-content {
    padding-left: 131px;
    }

    Regards,

    Ismael

    #117505

    Thanks for helping Ismael.

    I am still confused. I took another close look at the page source differences between a regular blog post and a custom post and the I see all the same divs with exception of <div class=”status”> and some of the <div class=”post-10 cases type-cases status-publish hentry category-idaho tag-air tag-land tag-water tag-wildlife post-entry post-entry-type-standard post-entry-10 post-loop-1 post-parity-odd post-entry-last single-small with-slider”>, where cases would normally be posts. On the single custom post for cases, the sidebar even gets floated to the bottom of the page. I’m not sure why the css isn’t being applied.

    #117506

    Is it because the regular posts are getting targeted with an extra blog class because of location?

    #117507

    Hi BWIdaho,

    I’m not really sure what the issue is but if you apply the css above (from Ismael) the single page for the individual case looks correct with the sidebar and layout all positioned as it should be.

    Regards,

    Devin

    #117508

    You are right. I don’t know what was different. Gah. Thank you for all your help!!

    #117509

    Hi,

    Glad it is fixed. :))

    Regards,

    Ismael

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Duplicate blog page’ is closed to new replies.