harshclimate
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Strange issue with WP_QueryI removed the instance of $paged from the query. I also changed up one of the loop posts to include your rendition of the global $post example:
<?php global $post; $content = $post->post_content; echo '<p>' . mb_strimwidth($content, 0, 270, ' ... ') . ' <a href=" ' . get_permalink() . ' ">more</a>' . '</p>'; ?>
Is this correct? I’m not getting any errors but I’m still not getting any content other than the post_thumbnail…
Forum: Developing with WordPress
In reply to: Strange issue with WP_QueryOkay, let me give it a shot…
Forum: Developing with WordPress
In reply to: Strange issue with WP_QueryMaybe it has something to do with this?
<?php $content = get_the_content(); echo '<p>' . mb_strimwidth($content, 0, 270, ' ... ') . ' <a href=" ' . get_permalink() . ' ">more</a>' . '</p>'; ?>
Forum: Developing with WordPress
In reply to: Strange issue with WP_QueryThanks for the response! I don’t think it’s an issue with the query itself, though. I did just build a CPT for what I need and the post thumbnail shows up, but
the_content
doesn’t. I just don’t get it!So now the query is:
<?php $args = array( 'post_type' => 'store', 'orderby' => 'rand', 'posts_per_page' => 1, 'paged' => $paged ); $store = new WP_Query($args); ?>
And I changed the loop in the previous example accordingly
- This reply was modified 6 years, 2 months ago by harshclimate.
Forum: Developing with WordPress
In reply to: Custom Post Type TaxonomiesI wonder if you could create a custom taxonomy and use the same naming conventions you did with your normal post type? I somehow doubt that would work but just throwing it out there…
Forum: Fixing WordPress
In reply to: How to show Pricing Details?You might try using Custom Fields for your items. Very flexible! Here are a few links:
https://codex.www.ads-software.com/Custom_Fields (this explains what they do and how to use them)
This is a popular plugin: https://www.ads-software.com/plugins/advanced-custom-fields/
Forum: Developing with WordPress
In reply to: Posts created under a TAGWell crap. I’m not good with this kinda stuff. I should probably come up with a different way of displaying the content. My coding skills are like… not having any ??
Forum: Developing with WordPress
In reply to: Posts created under a TAGOkay, my last didn’t make sense…
I only have two categories on the website. They are “Wineries” and “Breweries” in Arizona. Under those categories I would obviously have the names of those places. I would use the tags field to tag the city that these places are located.
There!
Forum: Developing with WordPress
In reply to: Posts created under a TAGHi Jose and BC. Thanks for the responses!
I’d like to grab all tags used on the website. So the way things work is, each post will have no more than two tags. On an “archives” page, I would like those tags used on each post to spit out on the archives page.
Under each tag, then, have each post shown.
Yeah, Jose’s would work, but it can’t be tag specific. It would have to burp out all the tags.
Yeah they are! Thanks for the explanation! And thanks for the snippet most of all!
Damn, this works! Normally I can kinda tell how something might work once I study it, but I can’t tell what this is doing. Can you explain it to me?
Also, would I just edit the attachment.php in order to layout the look of this?
Thanks, Steven! I’m afraid that I couldn’t write a function, filter, or hook if my life depended on it. While I’m sure what you’re saying is exactly what I need, I wouldn’t know how to compile all that to make sense ??
Would you be able to give me an example?
Forum: Developing with WordPress
In reply to: Pagination IssuesAlright cool. Appreciate all your time, people!
Forum: Developing with WordPress
In reply to: Pagination IssuesHoly crap, that worked! Thanks a lot! So why does the other way work with a CPT and not just a normal post?
Forum: Developing with WordPress
In reply to: Pagination IssuesHere’s a link to the complete file: https://www.harshclimate.com/page-photography.txt