wee-beastie
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Accessing Icons from My WordPress SiteThe image path itself may give you a clue as to where the image lives in the file structure. There are a number of ways to do this, including simply right clicking the image and selecting “Copy Image Address.” Language may vary from browser to browser.
You can also open up your browser’s dev tool to glean a little more info about the image in question.
You can also download the install and run a find command (at least on a Mac).
https://www.techradar.com/how-to/computing/apple/terminal-101-using-the-find-command-1305633
Forum: Fixing WordPress
In reply to: It use to workTo start, I’d suggest including a link to the site in question (you probably meant to but forgot).
Also, consider including a larger snippet of code as a gist. Perhaps the entire home page template, or whatever file includes the code you feel is relevant to this problem.
That’ll give the folks here a little more to chew on.
Forum: Developing with WordPress
In reply to: Published Post not showing on home or menuFor what it’s worth, I believe I am seeing the correct post at the top. I also agree with @t-p that there may be an additional caching layer at work here.
“WINE OF THE WEEK {V5} MAN FREE-RUN STEEN CHENIN BLANC” is the title of the first post on the home page for me.
Okay scrap my earlier suggestion entirely. Now I think we should try updating the conditional in entry-title.php.
This is my suggestion:
https://gist.github.com/mpseymour/612d245dc703d606bce8c992df2300c6#file-entry-title-php-L9I’ve added
! is_search()
to the conditional to say, “if we’re not viewing a search results page, go ahead and display the entry title.”For future reference: https://codex.www.ads-software.com/Conditional_Tags
Okay thanks for sharing that. Now just to be clear, you want the page title to follow its normal behavior on the rest of the site, but you want it to be hidden on the page that lists search results — is this correct?
Forum: Developing with WordPress
In reply to: Published Post not showing on home or menuInterestingly, I’m now seeing the “Wine of the Week” post on the home page. BUT I didn’t see it until I visited, navigated away, then navigated back.
If you didn’t make any changes during that time, then I suspect caching may be the culprit.
To stop showing the title on pages, you could use a conditional like so:
// Header ob_start(); get_template_part( 'partials/entry', 'meta-top' ); get_template_part( 'partials/entry', 'sticky' ); if ( 'post-header' === $thumb_option ) : get_template_part( 'partials/entry', 'thumbnail' ); endif; if ( get_post_type() != 'page' ) : get_template_part( 'partials/entry', 'title' ); endif; get_template_part( 'partials/entry', 'meta-before-content' ); $entry_header = trim( ob_get_clean() );
Note the addition:
if ( get_post_type() != 'page' ) : get_template_part( 'partials/entry', 'title' ); endif;
https://developer.www.ads-software.com/reference/functions/get_post_type/
If that’s too heavy handed, or doesn’t do what you need, I’d like to dig into
partials/entry-title.php
. I’d prefer you share the full contents of that file in a Gist (https://gist.github.com/).Forum: Developing with WordPress
In reply to: Published Post not showing on home or menuThis is a tough one to diagnose without seeing the big picture. Are you using a premium or third-party theme? You mention that WP updated recently. Is everything up to date (themes, plugins, core)?
If you are using a premium theme, it may be advantageous to look to the developers for a bit of support. If it’s a free theme, maybe point us to it to give us and idea of what you’re working with.
Forum: Developing with WordPress
In reply to: Adding external, dynamically created links to postsOh one more little thing. Be sure to give
update_post_meta()
a look as well. I often prefer using that overadd_post_meta()
to avoid duplicate meta key/values.https://codex.www.ads-software.com/Function_Reference/update_post_meta
Forum: Developing with WordPress
In reply to: get_post results omit table elements?Okay, just wanted to rule out the easy stuff first. I think I may need to see the bigger picture in order to help. I’m not sure what the preferred code-sharing resource is on these forums, but maybe you can create a Gist from the full template you are working on?
Forum: Developing with WordPress
In reply to: Adding external, dynamically created links to postsYes, there is a good chance saving the link as custom post meta is what I would do as well.
Also, yes, my understanding is that when a post is deleted (not trashed), the associated meta gets deleted with it.
Forum: Developing with WordPress
In reply to: Adding external, dynamically created links to postsCan you be more specific about where the trouble is occurring? Are you having trouble associating the link with the correct post? Are you unsure of how to modify your theme?
Forum: Developing with WordPress
In reply to: get_post results omit table elements?Well first things first — the HTML you provided is invalid.
This:
<table><tr><td>some texts</td><td>
Should look more like this:
<table> <tr> <td>text</td> </tr> </table>
Try getting that HTML sorted and see where you are after that.
Forum: Plugins
In reply to: [WP REST API (WP API)] End point for custom post type in v2Wow, thank you! I will definitely give this a shot!
Forum: Plugins
In reply to: [WP REST API (WP API)] End point for custom post type in v2I think you are actually using v1, which would explain why you don’t need the v2 namespace. I actually dropped back down to v1 due to not being able to work with custom post types in v2.
v2 is looking awesome, but it may need more time to cook and/or more documentation. It seems to be still in beta after all.
As for v1, this is how you get custom post types according to my understanding
/wp-json/posts?type=post-type-slug
, so you are doing it correctly.