Forum Replies Created
-
AuthorPosts
-
asterbirdMember
@aprilgregory, go to Settings > Reading to change that.
asterbirdMember@thanhlm85, have you done any php? This post might help: http://www.studiopress.community/topic/change-permalink-listings-to-apartments-in-agentpress/
Or, you may want to use a translation file to convert all strings to your language. You can use this plugin to make the edits right in the wp backend: http://wordpress.org/plugins/codestyling-localization/
April 30, 2013 at 1:27 pm in reply to: How to remove default sidebar text when sidebar is unregistered #38615asterbirdMemberThanks so much! That worked perfectly!!
March 14, 2013 at 4:44 pm in reply to: [AgentPress] How to display all search terms in a custom taxonomy archive title #26875asterbirdMemberOh, my! Are you using AgentPress?
March 14, 2013 at 2:38 pm in reply to: [AgentPress] How to display all search terms in a custom taxonomy archive title #26515asterbirdMemberDo you know if this will work on another page besides searchform.php? The AgentPress theme has search results showing on taxonomy.php
March 14, 2013 at 12:51 pm in reply to: [AgentPress] How to display all search terms in a custom taxonomy archive title #26274asterbirdMemberI haven't gotten anywhere on this issue. I've searched but found nothing, and I too would still like to know.
February 28, 2013 at 10:57 am in reply to: How to remove default sidebar text when sidebar is unregistered #23305asterbirdMemberOkay, I put my custom sidebars outside the #sidebar div, and now I can use display none on the #sidebar div. That works great, except for the ugly code still left in the html. Ah, well, guess I'll have to go with this.
Thanks so much for your help, Brad!
February 28, 2013 at 10:35 am in reply to: How to remove default sidebar text when sidebar is unregistered #23302asterbirdMemberI thought about using Genesis Simple Sidebars, but that doesn't take care of the primary sidebar. That only does the legwork for adding new/custom sidebars in the admin. Unless I missed something...
February 28, 2013 at 10:18 am in reply to: How to remove default sidebar text when sidebar is unregistered #23299asterbirdMemberI'm not sure how grabbing the page id's will help, as the empty primary sidebar has no unique classes to grab. Using the following code will also get rid of my custom sidebars:
.page-id-330 .widget_text { display: none; } or
.page-id-330 .widget { display: none; }
The warning was caused by fiddling around in my functions.php file - I fixed it.
Maybe I should rename the primary sidebar and use it. I'm not sure how to rename it or display it only on a certain page, so that's why I was trying to get rid of it.
February 28, 2013 at 9:29 am in reply to: How to remove default sidebar text when sidebar is unregistered #23280asterbirdMemberI would like to remove it from the apartments child pages, the properties child pages, and the contact page.
Firebug shows that it has no special class, only the regular ones like .widget, .widget_text and .textwidget. These classes will affect my custom sidebars.
Maybe I'm not adding my custom sidebars right. I use the genesis_register_sidebar function and then hook into the sidebar with this code:
add_action( 'genesis_before_sidebar_widget_area', 'my_custom_sidebar' );
function my_custom_sidebar() {
... my stuff...
}
So I want a sidebar, just not the primary sidebar...
February 27, 2013 at 8:18 pm in reply to: How to remove default sidebar text when sidebar is unregistered #23222asterbirdMemberFebruary 19, 2013 at 3:41 pm in reply to: Change permalink '/listings/' to '/apartments/' in AgentPress #21465asterbirdMemberActually, that was a different issue. I used the code found here to unregister genesis layouts.
But I noticed that in the Listings admin screen, there is a heading that says "Listing Title" I still need to change that, but it's an admin ui thing. Anyone know how to do this?
February 18, 2013 at 7:27 am in reply to: Change permalink '/listings/' to '/apartments/' in AgentPress #20975asterbirdMemberThanks, I was able to change all the labels. I see that I can decide what to support, which is great as I wanted to take out the genesis-layouts for the apartments.
How to do that? I tried this:
$args['supports']['genesis-layouts'] = FALSE;
But the genesis layouts still show in the edit screen.
February 13, 2013 at 10:13 am in reply to: Change permalink '/listings/' to '/apartments/' in AgentPress #20079asterbirdMemberThanks, Jen! That worked.
But document title still shows 'Listings' Where do I change that?
asterbirdMemberSave your permalinks settings again and refresh.
February 8, 2013 at 9:50 am in reply to: Display custom taxonomy descriptions in sidebar (AgentPress 2.0) #18938asterbirdMemberI found a way to do this, but it's probably a poor way to do it. I use both genesis_post_meta and genesis_post_info to display post meta in two places.
I moved the genesis_post_meta to the sidebar which displays terms from the taxonomy Attractions. And I used the genesis_post_info to display terms from the taxonomies Price, Beds, and Baths.
Here's what works for me finally:
/** * Use the post info function to display post meta instead */ add_filter( 'genesis_post_info', 'sarah_post_meta' ); function sarah_post_meta($post_info) { $post_info = '[post_terms before="" taxonomy="properties"][post_terms before=" | " taxonomy="price"][post_terms before=" | " taxonomy="bedrooms"][post_terms before=" | " taxonomy="bathrooms"]'; return $post_info; } /** * Move the post meta function to sidebar */ remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); add_action( 'genesis_before_sidebar_widget_area', 'genesis_post_meta' ); /** * Modify the post meta function to display attractions taxonomy meta only */ add_filter( 'genesis_post_meta', 'sarah_attractions_meta' ); function sarah_attractions_meta( ) { $terms = get_the_terms( $post->ID, 'attractions' ); if ( $terms && ! is_wp_error( $terms ) ) : $attraction_terms = array(); echo "<h4>Attractions Near " . get_the_title() . "</h4>"; foreach ( $terms as $term ) { echo '<li><a href="' . get_term_link($term->slug, 'attractions') . '">' . $term->name . '</a></li>'; echo '<li>' . $term->description . '</li>'; } $attractions = join( ", ", $attraction_terms ); endif; }
Hope it helps someone else too!
asterbirdMemberThis works now. I found the code here, and customized it.
Now it echos the list of terms (for a taxonomy called attractions) associated with the post.
add_filter( 'genesis_post_meta', 'sarah_attractions_meta' ); function sarah_attractions_meta( ) { $terms = get_the_terms( $post->ID, 'attractions' ); if ( $terms && ! is_wp_error( $terms ) ) : $attraction_terms = array(); echo "<h4>Attractions Near " . get_the_title() . "</h4>"; foreach ( $terms as $term ) { echo '<li><a href="' . get_term_link($term->slug, 'attractions') . '">' . $term->name . '</a></li>'; echo '<li>' . $term->description . '</li>'; } $attractions = join( ", ", $attraction_terms ); endif; }
asterbirdMember@vajrasar, thanks! that was a great article, but I'm not sure if it works for custom taxonomies.
I am able to display the description nicely using the following code in my theme functions.php file.
/** * Sarah Edit - Customize the post meta function */ add_filter( 'genesis_post_meta', 'sarah_attractions_meta' ); function sarah_attractions_meta( $mix_venue ) { $terms = get_terms( "attractions" ); $count = count($terms); if ( $count > 0 ) { echo "Attractions Near " . get_the_title(); // post title for heading foreach ( $terms as $term ) { echo "<li>"; // taxonomy title with custom link to its single page echo "<a href='" . home_url() . "/attractions/" . $term->slug . "' title='See " . $term->name . " - an attraction nearby'>" . $term->name . "</a>"; echo "<br>"; echo "<span>" . $term->description . "</span>"; echo "</li>"; } } }
However, this displays all the attractions, not just the ones associated with the post. Maybe I should do a loop? I'm not sure how to do that.
February 5, 2013 at 11:57 pm in reply to: Move Post-Info from above title to above Post-Meta in Executive #18386asterbirdMemberYes, that is probably affecting it. Try putting all that code in comments, and see how it changes the frontend. Commenting it out is better than deleting, especially until you are finished developing the website.
Hopefully some others can chime in and help, because I don't know enough to even explain all that code. 🙂
-
AuthorPosts