Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 91 through 105 (of 166 total)
  • Author
    Posts
  • in reply to: I get a 404 screen when viewing a post of a CPT #22697
    EddyPiVEddyPiV
    Participant

    Found it. Resolved.

    in reply to: Assign default value to DATE field? #21890
    EddyPiVEddyPiV
    Participant

    Yes, that was it. The format mistake I already figured out.
    Thanks, let's close this thread.

    in reply to: Assign default value to DATE field? #21885
    EddyPiVEddyPiV
    Participant

    That indeed resolves the critical error.

    And some new questions arise...

    Question 1:
    There are 2 posts found, 1 with date today, 1 with date 3 days ago.
    Yet, the post.date for both (according to the view) are shown as today. Why is that???
    Print of database: https://share.getcloudapp.com/X6uN152L
    Result of the View: https://share.getcloudapp.com/L1uJA65q
    The View-code: https://share.getcloudapp.com/xQuL2Og7

    Question 2:
    At least 1 post should be displayed with its details, but there are no posts displayed.
    Considering the post.date for both showing today, both should be displayed.
    Why are no posts displayed?
    Something with stored formats? How to formulate the condition correct?

    in reply to: Assign default value to DATE field? #21880
    EddyPiVEddyPiV
    Participant

    Hi,

    I know, the devil is in the details... I should have added the mb. prefix...
    But it doesn't resolve the critical error.

    Deleting the "if" construction avoids the critical error, so it is really in this statement.

    https://share.getcloudapp.com/nOukxRmP

    in reply to: Assign default value to DATE field? #21873
    EddyPiVEddyPiV
    Participant

    Actually, I found out that what I wanted to do wouldn't work: I was trying to set the expiration date fields of the Post Expirator plugin, but there is more needed to get it to work, probably setting a cron job.

    So my question is now a bit different.
    I am now skipping the posts that are older than 24 hours.

    I included this if statement: {% if {{ post.date }} > strtotime('-1 day') %},
    but WordPress didn't like it... critical error on the website.

    Here is the view: https://share.getcloudapp.com/RBuOpJkA

    in reply to: How to show all posts for specific taxonomy? #21842
    EddyPiVEddyPiV
    Participant

    Hi,

    To me is doesn't make sense to define multiple taxonomies for actually the same thing, with all having the same items.

    Anyway, I tried your approach and it indeed showed the pagination link, but also in case it shouldn't.
    For one type I had only 3 instances, these were shown, plus the Next link.
    Pressing that next link told me that there were 14 posts, and the last 4 were shown. So it looks like it thought it had shown 10 occurrences on the previous page...

    Whatever, it introduced new questions, and I have the feeling that I take 2 steps back again, while I am so close.

    My decision is to stay with 1 taxonomy and with your solution for the custom pages based on get-posts, with a larger number of posts to show, and forget the pagination.
    This works, looks nice, and I expect it will be acceptable to the client.

    Thanks a lot for your patience and help.
    Let's close this thread.

    in reply to: How to show all posts for specific taxonomy? #21823
    EddyPiVEddyPiV
    Participant

    Hi,

    That's what I meant when I said that for me the coding is more difficult for Custom views than for the Archive views. In the archive views we have the {{ mb.get_the_posts_navigation() }} function, but that doesn't work for the custom view.
    I have puzzled many hours to get this figured out for the custom view, but without success. All the time I get "critical error on my website" message.

    Isn't there any help to get this easier supported for custom view??

    in reply to: How to show all posts for specific taxonomy? #21811
    EddyPiVEddyPiV
    Participant

    Thanks Long.
    It works. I have managed to further adjust it to my liking.
    Except for the pagination, that doesn't work, no paging is shown. Any light on that?

    in reply to: How to show all posts for specific taxonomy? #21807
    EddyPiVEddyPiV
    Participant

    That I understand, and I did that before. But I got stuck on the coding, as I didn't manage to get the post link and the featured image of the post. That's what I meant when I said that the coding is more difficult for me in this approach.

    So perhaps you can help me with the correct code for getting the post link and the post featured image?

    in reply to: How to show all posts for specific taxonomy? #21790
    EddyPiVEddyPiV
    Participant

    Hi Long,

    There is now 1 view of a Custom Type. As the coding for custom type is harder for me to understand/specify, I prefer to use an Archive Type.

    Your comment on various views of Archive Type causing problems confuses me. It's a bit as I mentioned earlier: I don't understand the relation between the Archive Location settings and the url it relates to.

    E.g. I need different archive-views for ../location/amsterdam/?post_type=post and ../location/amsterdam/?post_type=event, and for ../location/rotterdam/?post_type=post
    How to define that in the Archive Location settings?

    My problem was that my View seemed to be ignored, perhaps because my Archive Location settings were incorrect.

    in reply to: How to show all posts for specific taxonomy? #21698
    EddyPiVEddyPiV
    Participant

    I have done that, but still the view seems ignored: all posts, pages and cpt’s for this value of the taxonomy are shown, and the initial text “This is the archive view” does not appear.

    in reply to: How to show all posts for specific taxonomy? #21692
    EddyPiVEddyPiV
    Participant

    Actually, I believe I don't understand how the location works in relation to the url of the acrchive page.
    Just a simple location is okay, but once it gets more (AND / OR relations) I am lost.
    Although in the case above, even with a single condition it already seems ignored...
    So if you please could elaborate...

    in reply to: How to show all posts for specific taxonomy? #21691
    EddyPiVEddyPiV
    Participant

    Hi,

    I am confused, I still couldn't figure out how to get all posts for a specific value of a taxonomy.
    It looks like my view is ignored at all.

    This is the view: https://share.getcloudapp.com/12uJlQwX
    This is the location: https://share.getcloudapp.com/Z4ukNpQ8,
    This is the value for the taxonomy: https://share.getcloudapp.com/RBuOAkKL
    This is the result: https://share.getcloudapp.com/nOuk7JBw
    It shows just all posts, pages and cpt's for this value of the taxonomy. Also, the initial text "This is the archive view" does not appear.

    Your help is much appreciated...

    in reply to: How to show all posts for specific taxonomy? #21625
    EddyPiVEddyPiV
    Participant

    Okay, that clarifies that part.

    Then I proceed with the Custom view, and I will include the shortcode.

    I have adapted the view according to your advise, but it seems it finds no records: I get 5 items, each without title, excerpt etc, but all with the current date & time.
    https://share.getcloudapp.com/YEuozDmv

    https://share.getcloudapp.com/lluY8gzj

    EddyPiVEddyPiV
    Participant

    Hi Long,

    Excellent, now it's all working!

    Thanks so much for your help.

Viewing 15 posts - 91 through 105 (of 166 total)