Forum Replies Created

Viewing 15 replies - 1 through 15 (of 98 total)
  • Thread Starter harshclimate

    (@harshclimate)

    Heya BC. Yeah, I usually work in localhost but for some reason I was caught up on the web server since I was updating at the same time. I get my channels crossed when I have too much going on. Plus, font awesome didn’t work on my local environment for some reason. I guess I wanted those to show up more than anything else for some reason ??

    Anyway, I’m good for now. Decided to just rework things a bit since I couldn’t get it working. I like what I ended up with so it’s all good.

    Thanks for the time, mister.

    Thread Starter harshclimate

    (@harshclimate)

    Thanks for the reply. I’ve been running in to strange things during this issue with the website. Like, the caching has been super crazy. I had to contact my host to make sure files were actually uploading because every single time I made an edit and refreshed the permalink structure, nothing would ever change. Also, the content on home.php would disappear once I logged in as admin. When I logged out, the content came back. Totally whack.

    I’ve decided to start from scratch and reorganize. I’m going to remove cpt’s and just use cats and tags. Seems simpler for some reason. I’ll try the same pagination fiasco but hopefully without caching problems.

    I have ACF Pro, the classic editor and Font Awesome pro plugins installed so hopefully those aren’t suspect.

    Thanks, BC. I’ll probably start another topic once I get this clean version finished (pretty close on that already). I’m on slack as Brian but I know I can’t ask questions there ??

    Thread Starter harshclimate

    (@harshclimate)

    Nothing I’m doing is working. I’ll look around to see if there’s a perfect situation for paginate_links(). Maybe I need to change the CPT’s to categories or something or put everything on the index.php. I dunno. This stuff is too hard for a carpenter like myself.

    Thread Starter harshclimate

    (@harshclimate)

    I’m not at all sure how to write a rewrite rule to do that. I’m not even sure how to make paginate_links recognize the next pages. Is there some documentation you can link me to with examples? I’ll take a look around for some info, though…

    edit -> I did change the areas in paginate_links from paged to paginate but nothing changed as the end result. Now I’m searching around for rewrites, and the snippets I’ve tried don’t seem to help much. Though, I’m not sure what I’m doing with them other than copying and pasting them in to functions. I’ll study them a bit more…

    • This reply was modified 9 months, 1 week ago by harshclimate.
    Thread Starter harshclimate

    (@harshclimate)

    It’s just so strange because it’s showing page 2 in the address bar, but there’s no content showing. On localhost, it shows the content :/

    Thread Starter harshclimate

    (@harshclimate)

    Okay, I added a function

    add_filter(‘query_vars’, ‘registering_custom_query_var’);

    function registering_custom_query_var($query_vars) {
    
        $query_vars[] = 'paginate'; // Change it to your desired name
    
        return $query_vars;
    }

    $currentpage = get_query_var('paginate') ? get_query_var('paginate') : 1;
    $args = array(
    'posts_per_page' => 12,
    'post_type' => array('arizona_wine', 'arizona_beer'),
    'orderby' => 'title',
    'order' => 'ASC',
    'paginate' => $currentpage
    );
    $all_posts = new WP_Query($args);

    Still giving me a “page not found”, I’m assuming I didn’t do it correctly…

    Thread Starter harshclimate

    (@harshclimate)

    Hi bc! Long time no “see”! I’m not quite sure what you mean by using my own custom query? My $all_posts variable is referencing the new wp_query. Are you saying that I shouldn’t be using get_query_var? If that’s what you mean, I wouldn’t know how to define my own query…

    I read that if I were using front-page.php I would use ‘page’ instead of ‘paged’ but I’m using home.php

    Thread Starter harshclimate

    (@harshclimate)

    Hi Dipika. Thanks for your response. I have tried that a few times without success. Do you notice anything in the code that might be wrong?

    Thread Starter harshclimate

    (@harshclimate)

    I ended up creating pages for arizona_wine & arizona_beer instead of using archive and it seems to be working as expected.

    Thread Starter harshclimate

    (@harshclimate)

    That works! Thank you very much for the snippet! And I appreciate the heads up on the server/site performance. I’m fairly confident that my website will never generate any traffic but I love doing it anyway ??

    Thread Starter harshclimate

    (@harshclimate)

    I think that worked, George. Thank you so much! I didn’t realize that targeting the form would have transpired to much. I appreciate it!!

    Thread Starter harshclimate

    (@harshclimate)

    I get what you’re saying. I know this isn’t a wordpress issue but I was wondering if the input field was being constrained by something in wordpress. The parent element, part of my grid, is set from grid line 10 to grid line 13. 100% doesn’t fill that allotted space. So the percentage value isn’t being recognized, but pixels are. So I’m still confused.

    Thread Starter harshclimate

    (@harshclimate)

    That’s so interesting that pixels work but percentages don’t? Is there a way to make percentages work?

    Thread Starter harshclimate

    (@harshclimate)

    Okay, I got it working. I had to add a little something to the query:

    at 'tag' => get_queried_object() I added 'tag' => get_queried_object()->slug and now everything seems to be showing up. Sorry for the confusion!

    Thread Starter harshclimate

    (@harshclimate)

    On that note, I did see a few errors in my query. I changed the above to:

    $args = array(
             'posts_per_page' => -1,
             'post_type'      => array( 'arizonawine', 'arizonabeer', 'spotlight', 'posts' ),
             'tag'            => get_queried_object(),
             'post_status'    => 'publish',
             'orderby'        => 'title',
             'order'          => 'ASC'
    
    ); $tag_query = new WP_Query( $args );

    Still no success.

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