harshclimate
Forum Replies Created
-
Figured out how to do what i need using Advanced Custom Fields. Thanks anyway!
Forum: Fixing WordPress
In reply to: My navigation menus are stuck!Sigh. It doesn’t help that I’ve been starring at this stuff for hours upon hours. Sometimes even the simplest things get me all in a kerfuffle. Thanks, BC – Sure do appreciate you.
Forum: Developing with WordPress
In reply to: Custom Taxonomy – Page not found help!That did it! I thought I had tried that already but I guess I didn’t. I wonder why you have to do that? Is that a bug?
Forum: Developing with WordPress
In reply to: Listing custom post types by year & monthThere is a problem with this function, however. When I hover over the year, what I get is this:
.. /2019/05/?post_type=azblog
which gives me an error. I would think it would take me to/2019/05/
where I would then display all posts in May.- This reply was modified 5 years, 11 months ago by harshclimate.
Forum: Developing with WordPress
In reply to: Listing custom post types by year & monthI actually did find this:
https://codex.www.ads-software.com/Function_Reference/wp_get_archives
Which basically solves my problem. Thanks for your guidance, sir!
Forum: Developing with WordPress
In reply to: Listing custom post types by year & monthOkay, one thing I failed to mention is that I really am no good at php. Snippets mean the world to me ??
Can you give me snippets of what you’re talking about? It sounds very complicated…
Forum: Fixing WordPress
In reply to: Grab all key/values from custom fieldsThanks so much, catacaustic! I’m just thrilled to get the emails where I can see them. One of the main reasons that I need them is to be able to email asking if any of their information needs to be updated. If you have a sec, take a look at what I’ve done: https://www.azbottle.com. I built this theme from the ground up from answers from ppl like you on these forums.
Forum: Fixing WordPress
In reply to: Grab all key/values from custom fieldsOkay, that does work! I’m wondering (just cuz I’m genius at this kinda stuff) would I be able to use the previous query with custom wp_query in the loop to get the results I would need?
So like:
$args = array( 'post_type' => 'wineries', 'orderby' => 'rand', 'posts_per_page' => 1 ); $email = new WP_Query($args); <?php while ( $email->have_posts() ) : $email->the_post(); ?> global $wpdb; $query = "SELECT meta_key, meta_value FROM ".$wpdb->postmeta." WHERE meta_key = 'email'"; $email_list = array (); foreach ($wpdb->get_results ($query) as $row) { $email_list [] = $row->meta_value; } echo '<ul><li>' . $emails = implode ('</li><li>', $email_list) . '</li></ul>'; <?php endwhile; ?>
Forum: Fixing WordPress
In reply to: Grab all key/values from custom fieldsThanks, @catacaustic! It’s working but not in order. Can you amend it in such a way that it orders by post_type? Here’s what I have so far:
<?php while ( have_posts() ) : the_post(); ?> <div class="col-12"> <?php global $wpdb; $query = "SELECT meta_key, meta_value FROM ".$wpdb->postmeta." WHERE meta_key = 'email'"; $email_list = array (); foreach ($wpdb->get_results ($query) as $row) { $email_list [] = $row->meta_value; } echo '<ul><li>' . $emails = implode ('</li><li>', $email_list) . '</li></ul>'; ?> </div> <?php endwhile; ?>
Forum: Fixing WordPress
In reply to: Grab all key/values from custom fieldsThat snippet isn’t showing any info. The wpdb variable… do I have to put my own database name there? Or is that something that doesn’t care about database names?
Forum: Fixing WordPress
In reply to: Grab all key/values from custom fieldsGood point on the mass email. Didn’t even think about that. I’ll give your snippet a try and see what happens ??
Forum: Developing with WordPress
In reply to: Strange issue with WP_QueryOh wow. I think I just found the issue. I looked at the code again and the title and content are between the post_thumbnail. So if there’s a post thumb the content shows up, but if there isn’t, the content won’t show! hah!
Are you seeing what I see?
If I’m correct, I have no clue how I ended up doing that. I’m usually so careful!
- This reply was modified 6 years, 2 months ago by harshclimate.
- This reply was modified 6 years, 2 months ago by harshclimate.
Forum: Developing with WordPress
In reply to: Strange issue with WP_QueryMaybe I should just redo the entire index? I’ve actually never had this happen before in any of the sites I’ve done.
Were you able to take a look at the gist I pasted? Maybe that could give you an idea of my psychosis ??
Forum: Developing with WordPress
In reply to: Strange issue with WP_QueryThanks, BC: Here’s what I have from the dump…
object(WP_Post)#713 (24) { ["ID"]=> int(212) ["post_author"]=> string(1) "1" ["post_date"]=> string(19) "2019-01-07 18:16:20" ["post_date_gmt"]=> string(19) "2019-01-08 01:16:20" ["post_content"]=> string(267) " This is a test store to see if I can figure out what's going on with the plaza liquors one. Very strange that the thumbnail will show up but not the content text. I don't know if I can figure this one out on my own. ["post_title"]=> string(18) "Testing This Store" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(18) "testing-this-store" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2019-01-07 18:16:20" ["post_modified_gmt"]=> string(19) "2019-01-08 01:16:20" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.azcork.com/?p=212" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
- This reply was modified 6 years, 2 months ago by harshclimate.
Forum: Developing with WordPress
In reply to: Strange issue with WP_QueryHere’s my entire index: https://pastebin.com/cxLZZUyq
Or on github: https://gist.github.com/harshclimate/1a3c8302933cfa7eae0309d7a1f08717