BriceLucas
Forum Replies Created
-
Hi Quelizinha!
Try removing the following line (line 161 i believe) from the custom-post-type-permalinks.php file:
$wp_rewrite->add_rewrite_tag( “%$taxonomy%”, ‘(.+?)’, “$taxonomy=portfolio_category” );
Then “save your permlinks” in the WP admin, and check your taxonomy archive pages.
I figured this out. The plugin folder needs to have 777 permissions. Also, if your theme is performing re-writes (as mine was, just open your theme-functions.php file and search “rewrite”). Then try removing all rewrites from the theme as well.
Note: Be sure to click the “save” button on the permalinks settings page in wordpress after setting your folder permissions to 777.
Hi Phil, this is fairly straightforward. You just have to modify the CSS for the forms using an HTML editor. I modified mine by selecting the “blue” theme, and modifying the file:
daves-wordpress-live-search_default_blue.css
Hope this helps!
Hi Futurepocket, can you post your post-type.php code here?
I am also having this issue, however would like to mention that I am running NGINX… which I feel may be part of the issue. Any help would be greatly appreciate, would be happy to pay for service as well.
actually, I fixed it (without using additional javascript)!
Okay, so I fixed this and wanted to update this post just in case someone else had a similar issue. The problem was with how I was getting the ID of the post, it was basically just pulling the ID of the first post only, instead of each result. I had to change “get_the_ID()” to “$result->ID”. Pretty silly how long it took me to realize that. At any rate, here’s the working code if you want to pull in other post-related info into the search results!
daveswordpresslivesearchresults.php code:
$meta_city = get_post_meta( $result->ID, '_museum_city', true ); $result->post_city = $meta_city;
daves-wordpress-live-search.js code:
renderedResult += '<p class="search_meta">' + searchResult.post_city + '</p>';
To add to this, please see below for my code. Any help that someone could provide me here would be very much appreciated.
daveswordpresslivesearchresults.php code:
$meta_city = get_post_meta( get_the_ID(), '_museum_city', true ); $result->post_city = $meta_city;
daves-wordpress-live-search.js code:
renderedResult += '<p>' + searchResult.post_city + '</p>';
Nice espider! This is the exact same problem that I am running into (the value is repeating for every result)! Can you please paste your entire code, or send me the source so that I can figure this out? I am trying to put your solution in, but am having trouble.
Here is my code (DavesWordpressLiveSearchResults.php):
//foreach($posts as $result) { // Get the ID of a given category $category_list = get_the_term_list( get_the_ID(), 'portfolio_category', "", " - " ); $category_link = get_category_link( $category_id ); $result->post_category = $category_edit; // Get the URL of this category function my_jquery_var() { global $post; if ( $meta_city = get_post_meta( $post->ID, '_museum_city', true ) ) { echo '<script type="text/javascript">var meta_city = "' . $meta_city . '";</script>' . "\n"; } } add_action( 'wp_head', 'my_jquery_var' ); // Add author names & permalinks
and the JS code:
renderedResult += '<p>' + meta_city + '</p>';
Hi espider, first you need to read the value in wordpress into a variable for jQuery:
Note: My meta-field key is “_museum_city” in the below case.
$meta_city = get_post_meta( get_the_ID(), '_museum_city', true ); $result->post_city = $meta_city;
Then, in your JS file:
if(searchResult.post_city != undefined) { renderedResult += '<p class="price">' + searchResult.post_city + '</p>'; }
Hope this helps!