Chee Studio
Forum Replies Created
-
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Snippets not created from Custom Fields?Well I had this working but for some reason when I upgraded and then used the code Davidn posted, I get:
Warning: Missing argument 2 for my_relevanssi_excerpt_content()
Its in reference to this line:
function my_relevanssi_excerpt_content($content, $post, $query)
Am I supposed to modify this in any way?
Sorry to be a pain. I’m still learning PHP the hard way (trial and error).
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Snippets not created from Custom Fields?Awesome, that worked for me!
One last question…how would I go about passing multiple post types to this filter along with their corresponding custom fields? Or do I need to repeat this filter for each set of post types/custom fields?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Snippets not created from Custom Fields?I’ll give that a shot.
I meant a custom post type of Article, with a custom field called “Article Text.”
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Snippets not created from Custom Fields?Hey David, I’m having some issues getting this filter to work correctly (I keep getting invalid arguments when it tries to implode).
If its not too much trouble, can you show me a pastebin of what it should look like if my Post Type is “Article” and the custom field is “Article Text”?
I so greatly appreciate this!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Snippets not created from Custom Fields?Awesome, Davidn! Would you be able to create a pastebin so I could see the code you are using?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Snippets not created from Custom Fields?Well I tried this same technique on another site and same thing occurs…I’m wondering if it possibly has to do with that I am using Custom Field Template to create my custom fields, since that’s the only plugin that these two sites have in common.
What do you use when you create your custom fields?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Snippets not created from Custom Fields?Hmm…so does this mean it should be working? Not sure if my code came through, but here is the Pastebin:
I also tried using relevanssi_the_excerpt(), no go either.
But from what I gather from your posts, if the search result exists within a Custom Field, it will not build or display an excerpt or snippet of any kind, even if I use relevanssi_the_excerpt()?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Snippets not created from Custom Fields?Also, to give you a little more information:
One of the Custom Fields I have is called ‘Description’. If I call that into the Search Template, hoping that it would just return the highlighted portion, it returns the entire custom field, rather than a snippet.
Just thought I’d mention that. I didn’t expect it to work, but just in case you might suggest it.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Snippets not created from Custom Fields?Interesting…well, here is what I have in my search template:
[Code moderated as per the Forum Rules. Please use the pastebin]
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Snippets not created from Custom Fields?Here is a screenshot if need be:
Forum: Fixing WordPress
In reply to: Why doesn't this Custom Select Query work?I know somebody knows this ??
Forum: Plugins
In reply to: Creating Sortable ColumnsActually, I figured this out! I just needed to register the column as Sortable, since the way I configured the columns seemed to be working great.
So, using the above example, I added this right below the above code:
‘// Register the column as sortable
function sort_column_register_sortable( $columns ) {
$columns[‘Sort’] = ‘Sort’;return $columns;
}
add_filter( ‘manage_edit-testimonial_sortable_columns’, ‘sort_column_register_sortable’ );’Working great now! Hopefully this will provide a comprehensive code snippet from start to finish for somebody else trying to get sortable columns going! ??