TBRudy3
Forum Replies Created
-
Forum: Plugins
In reply to: [WP REST API (WP API)] End point for custom post type in v2A CPT would require you to use the name of the CPT in the URL.
In your case it would be
/wp-json/wp/v2/music
.Although that doesn’t seem to work which is probably because you haven’t added the proper argument (like I showed above).
Take a look and review it.
*Note: If you are using a plugin to generate custom post types then I would reconsider using that plugin, and writing it on your own, or extending it in a way that won’t break the plugin.
Forum: Plugins
In reply to: [WP REST API (WP API)] End point for custom post type in v2If you add
show_in_rest=true
as one of your arguments that gets passed toregister_post_type()
you will be able to retrieve custom post type data.Example:
add_action( 'init', 'create_post_type' ); function create_post_type() { $labels = array( 'name' => __( 'Data' ), 'singular_name' => __( 'item' ) ); $args = array( 'labels' => $labels, 'public' => true, 'has_archive' => true, 'show_in_rest' => true ); register_post_type( 'data', $args ); }
Then you can use an endpoint like this: https://www.example.com/wp-json/wp/v2/data/
Just in case anyone was wondering, I was able to “hack” the situation by just adding the Ajax Load More JS code to my function right after this line:
$('.feed').html(parsed_json);
Works fine, but obviously not ideal. I’ll keep a lookout for your updates. Thanks again.
Forum: Fixing WordPress
In reply to: Static Page vs Blog PageFigured it out…
I’m an idiot
Forum: Fixing WordPress
In reply to: Subdomains on a NetworkWell, it seems as though the godaddy people failed to mention this.
NOTE: You cannot use the WordPress Subdomains option with our shared hosting if you are planning on using wildcard subdomains.
Entire article is here:
https://support.godaddy.com/help/article/6143/enabling-wordpress-multisitesHope this saves someone else’s headaches.
Forum: Fixing WordPress
In reply to: Custom theme – Only 1 post showing on the blog pageresolved
Forum: Fixing WordPress
In reply to: Custom theme – Only 1 post showing on the blog pagePerfect.
Thanks again for sticking with me. Really appreciate it!
Forum: Fixing WordPress
In reply to: Custom theme – Only 1 post showing on the blog pageActually I take that back. Now that makes it show one post and the “blog” page itself.
I have a post labelled blog so I thought it was working.
Any other suggestions?
Forum: Fixing WordPress
In reply to: Custom theme – Only 1 post showing on the blog pageDave Coast.
Thank you!!!
3 hour headache overwith!
Forum: Fixing WordPress
In reply to: Custom theme – Only 1 post showing on the blog pageHmm,
Is there a workaround for this?
Also seems strange because when I set the front page to the latest posts, it still is only showing one post.
Thank you for your help.
Forum: Fixing WordPress
In reply to: Custom theme – Only 1 post showing on the blog pageIt depends.
If I change the code to this:
<?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('posts_per_page=5'.'&paged='.$paged); while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
And then change the number from 5 (to whatever) it will determine the blog post.
—
The static page is not the issue. Unless that may be interfering with what I am trying to accomplish. Although I don’t think so.
I also tried to just display all of my latest posts on the home page. And when I switch to the Twenty Twelve theme it works…switch back to my theme and it displays only one post.
My hunch is that I need something else in my funtions.php file
Hope this helps.