paultp
Forum Replies Created
-
That link shows how to display the excerpt in the custom post type by clicking excerpt in display options.
I don’t want to have to write a custom excerpt for every post of a custom post type.
If you register the custom post type correctly using the argument “supports” and including the option “excerpt” a standard excerpt will automatically be created for each post of that custom post type.
I am looking at the defaults, I’m looking at the code in your plugin that sets all the “supports” options to default to false. There isn’t anywhere to set them to true. Display Sections doesn’t do it (I’ve tried ticking excerpt there and as far as I can see it determines what displays in the editor screen) and Options should do it (it includes most of the other arguments but not “supports”) but doesn’t.
I don’t know why you set them all to false as that is the default anyway for every option apart from title and editor according to the codex.
I think I’m going to test this just to make sure by declaring a custom post type using your plugin and then declaring one exactly the same but including the “supports” argument by coding it directly using register_post_type. I’ll do it on a test site so I can post the results up here so you can see it in black and white.
Nobody is going to pay me to do this so I’ll have to wait until I have the time.
I’ve explained it clearly enough to be honest.
register_post_type provides a “supports” section in the arguments where you can declare support for excerpts and various other things. Your plugin does not provide anywhere to declare the “supports” argument.
If you read this:
https://codex.ww.wp.xz.cn/Function_Reference/register_post_typeYou will see this in the list of arguments:
supports
(array/boolean) (optional) An alias for calling add_post_type_support() directly. As of 3.5, boolean false can be passed as value instead of an array to prevent default (title and editor) behavior.
Default: title and editor
‘title’
‘editor’ (content)
‘author’
‘thumbnail’ (featured image, current theme must also support post-thumbnails)
‘excerpt’
‘trackbacks’
‘custom-fields’
‘comments’ (also will see comment count balloon on edit screen)
‘revisions’ (will store revisions)
‘page-attributes’ (menu order, hierarchical must be true to show Parent option)
‘post-formats’ add post formats, see Post FormatsIn your plugin code you set all these options to false (see post above) but there isn’t anywhere in the admin section to set them to true so they are always falso so a custom post type registered through your plugin does not support excerpts.
If a theme tries to display an excerpt from a custom post type registered with your plugin, because it doesn’t support excerpts (as they cannot be declared) what gets passed is the full content of the post (unless you set a custom excerpt).
What I think you should do is add a part to the Options section that allows people to declare the elements for the “supports” argument.
I don’t think it could be any clearer.
“Display sections” determines what is displayed when you edit a new custom post type after declaring it.
Why am I having to explain to you how your plugin works? If you don’t know how it works why are you telling me it can do something when it can’t?
As I’ve already said “register_post_type provides a “supports” section in the declaration where you can declare support for excerpts. Your plugin does not provide anywhere to declare “supports” elements.”
Why don’t you check this ^^^ then add it to your plugin so it works properly?
Already looked there.
The options part allows you to set some of the arguments for register_post_type, such as “show_in_menu” and “hierarchical” but not all the available arguments are there. One of the arguments that it doesn’t allow you to set (as far as I can see) is the “supports” argument which is of the form of an array.
If it does please show me where it does as I can’t see it, I’m tempted to put up a screen shot.
I quite understand the template hierarchy thanks.
Archive.php produces a page of posts related to a particular tag, the WordPress settings are set up to show the post excerpts, normal posts display an excerpt correctly, posts of custom post type display the full post but with formatting removed.
The issue is that the plugin does not allow full declaration of custom post types so an excerpt is not correctly produced.
register_post_type provides a “supports” section in the declaration where you can declare support for excerpts. Your plugin does not provide anywhere to declare “supports” elements.
https://codex.ww.wp.xz.cn/Function_Reference/register_post_type
This is a waste of time, this plugin is not being supported
How about replying to some other support issues now you’ve solved this tough one?
So, with still no sign of the plugin developer, we go digging into the plugin and find this:
/**
* set default support options
*/
$support_fields = array(
‘editor’ => false,
‘author’ => false,
‘thumbnail’ => false,
‘excerpt’ => false,
‘trackbacks’ => false,
‘custom-fields’ => false,
‘comments’ => false,
‘revisions’ => false,
‘page-attributes’ => false,
‘post-formats’ => false,
);
$data[‘supports’] = array_merge_recursive( $data[‘supports’], $support_fields );So as far as I can tell all the support options are set to false (including excerpts).
I can’t find anywhere in the plugin dashboard to set up the support fields for a custom post type?
HELLO ?!?
Is there any chance of an answer to this?
Normal posts are displayed correctly when you click on a tag, posts of custom post types are not; the whole content is shown.
As I understand it WordPress uses archive.php to display posts when the tag is clicked on if there is no tag.php so presumably it thinks that the whole ontent of the custom post is the excerpt?
Is that correct? Id that how it should be? Should your plugin not produce a correct excerpt?
An answer of some sort would be nice.
I shared the site url and told you that the share buttons were at the bottom of the posts.
I’ve sent you another email with a post url in it as you couldn’t seem to find a post when given the site url.
My customer reports that since adding your plugin the site has lost 90% of its traffic and your share buttons are causing 2400 302 redirect errors as far as google is concerned.
Please look at the problem.
Forum: Plugins
In reply to: [Slideshow Gallery LITE] Thumnails do not appearHi,
I have exactly the same problem.
I uploaded multiple files into a gallery and the thumbnails were not produced. I can’t see them when I use “Manage slides” or in the gallery in the post itself. The images show up in the gallery though.
A gallery produced with the old version of the plugin still works fine.
Thanks
PaulForum: Plugins
In reply to: [Weight Based Shipping for WooCommerce] Sorry, shipping is unavailableSorry, I’m in the wrong plugin as well. Doh!
I’m using this one (which you have fixed) AWD Weight/Country Shipping for WooCommerce
Many thanks and sorry again for wasting your time.
PaulForum: Plugins
In reply to: [Weight Based Shipping for WooCommerce] Sorry, shipping is unavailableYou can log into my site if you want, how do I contact you?
Drop the webmaster an email from yorkfamilyhistory.org.uk
Forum: Plugins
In reply to: [Weight Based Shipping for WooCommerce] Sorry, shipping is unavailableI have exactly the same problem “Sorry, shipping is unavailable to the United Kingdom (UK). If you require assistance or wish to make alternate arrangements please contact us.”
The website has been working fine until the last couple of WooCommerce updates (WC 2.1.4 & 2.1.5)
Thanks
PaulForum: Plugins
In reply to: [jQuery Vertical Scroller] Hide Title from shortcodeLooked in the plugin code now 🙂
showtitle=”false”