Forum Replies Created
-
AuthorPosts
-
Ben Siegfried
ParticipantWonderful, thanks.
Ben Siegfried
ParticipantYes, thank you for checking back. The solution is above.
Ben Siegfried
ParticipantSince the sidebar doesn't include any editor allowing you to create a custom form, you will still create a custom form using the form builder in a post or page. You can then copy the generated shortcode that appears in your editor, and paste it in a new Text widget under Appearance > Widgets in your dashboard.
Ben Siegfried
ParticipantThanks Brad!
Ben Siegfried
ParticipantAnita, how do you get jetpack form builder to work in the sidebar? I see how you create on in a post or page but how do you get that into the primary sidebar? Jetpack is really cool.
Ben Siegfried
ParticipantWhat jetpack are you talking about. I went to plugin search and up came jetpack this, jetpack that, jetpack all over the place. Now which jetpack are you talking about?
Ben Siegfried
ParticipantThanks cdils that works. You saying "You could change the conditional from is_singular to is_archive if you need to target the archive page instead," is what tipped off my solution. I'm actually commenting out lines of code in the home.php of Agency to bring in the blog posts on that page.
<code>//remove_action( 'genesis_loop', 'genesis_do_loop' );
//add_action( 'genesis_loop', 'agency_home_loop_helper' );
//add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );</code>So, in my situation I targeted "is_home" and installed that into the functions.php file.
<code>
/**
* Filter Genesis H1 Post Titles to add <span> for styling
*
*/
add_filter( 'genesis_post_title_output', 'ac_post_title_output', 15 );function ac_post_title_output( $title ) {
if ( is_home() )
$title = sprintf( '<h2 class="entry-title"><span>%s</span></h2>', apply_filters( 'genesis_post_title_text', get_the_title() ) );return $title;
}</code>
Ben Siegfried
ParticipantThanks Robin, I see what points you are making. At first when I tried Bill's code I was using the post IDs and not the cat IDs. I got it to work excluding the category I wanted using the cat ID, using the code below in the functions.php file.
<code>
add_action( 'pre_get_posts', 'be_exclude_category_from_blog' );
/**
* Exclude Category from Blog
*
* @author Bill Erickson
* @link http://www.billerickson.net/customize-the-wordpress-query/
* @param object $query data
*
*/
function be_exclude_category_from_blog( $query ) {if( $query->is_main_query() && $query->is_home() ) {
$query->set( 'cat', '-4' );
}}
</code>This http://www.wordpress.org/extend/plugins/display-posts-shortcode/ also works very well. I played around with it for a while, but wouldn't work in my situation because I'm altering the home.php file.
Ben Siegfried
ParticipantUsing the WP query code here in Bill's tutorial (http://www.billerickson.net/customize-the-wordpress-query/), what code would I add into my home.php (code below) to exclude a category or post IDs? Bill Erickson's code is shown to go into the functions.php file but that didn't seem to work for what I'm trying, or maybe I did it wrong. I don't understand enough about php to figure out what to do with the query code.
add_action( 'genesis_meta' , 'agency_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function agency_home_genesis_meta() { if ( is_active_sidebar( 'home-welcome' ) || is_active_sidebar( 'home-slider' ) || is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-right' ) ) { //remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_after_header' , 'agency_home_welcome_helper' ); //add_action( 'genesis_loop', 'agency_home_loop_helper' ); //add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); add_filter( 'body_class' , 'add_body_class' ); function add_body_class( $classes ) { $classes [] = 'agency' ; return $classes ; } } } function agency_home_welcome_helper() { if ( is_active_sidebar( 'home-slider' ) ) { echo ' <div id="home-slider">'</div> ; dynamic_sidebar( 'home-slider' ); echo ' <!-- end #home-slider -->' ; } if ( is_active_sidebar( 'home-welcome' ) ) { echo ' <div id="home-welcome">'</div> ; dynamic_sidebar( 'home-welcome' ); echo ' <!-- end #home-welcome -->' ; } } function agency_home_loop_helper() { if ( is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-right' ) ) { echo ' <div id="home">'</div> ; echo ' <div class="home-left">'</div> ; dynamic_sidebar( 'home-left' ); echo ' <!-- end .home-left -->' ; echo ' <div class="home-middle">'</div> ; dynamic_sidebar( 'home-middle' ); echo ' <!-- end .home-middle -->' ; echo ' <div class="home-right">'</div> ; dynamic_sidebar( 'home-right' ); echo ' <!-- end .home-right -->' ; echo ' <!-- end #home -->' ; } } genesis();
Ben Siegfried
ParticipantI mean exactly this, disable <a href="">Post Title</a>, which would, I guess affect all post titles, and I don't mind this because I'm only using one page and don't need archive, etc.
Ben Siegfried
ParticipantWell thanks for looking around Susan.
This post is still unresolved. Anyone know how to disable the <a href=""></a> for the Post Title?
Ben Siegfried
ParticipantI should have known better that CSS wouldn't do anything but change it's styling.
There is no single.php page in the Editor for the Child Theme. There is in Genesis but we aren't supposed to alter the Genesis core, only the Child Theme. I understand that it requires removing the <a href=""></a> tag and attribute, but I don't know how to do that without finding it first. So, where would I find that in Agency's theme?
Ben Siegfried
ParticipantOk, I get the redirect idea now. I just redirected it to the url it is already on, so the page just recycles to the same url—this does stop the title link from going to the post's individual page. I'd like to just turn off the title link altogether. I'll try that with CSS.
Ben Siegfried
ParticipantWell I think you showed me something different than what I wanted. I want to disable the post title link. The is hoverable and links to the page for that individual post. I want to disable the link from going to the post's individual page. In other words, I want to use posts to add new posts on the list of posts but I don't want any of them to link to their individual pages—I want to disable their title text links.
Ben Siegfried
ParticipantThe main Blog page.
I also would like the main Blog page to become the homepage and not have the main domain name direct to home.php.
I can exclude post IDs from the Blog via Genesis Theme Settings but that only excludes them on the Blog page, not the home.php page, where I have the responsive slider set up currently.
Ben Siegfried
ParticipantRobin,
In the Genesis Theme Settings panel you can choose display/exclude by a single category and/or exclude by post ID but this only works on the Blog page. It worked but only for the Blog page. I need it for the home.php page where I have posts showing under the responsive slider.
I'd use the Blog page as the homepage of my site if I could know how to make the main URL not bring up the home.php page and also be able to install the responsive slider above the blog posts on the Blog page.
Ben Siegfried
ParticipantYah, but can I have the same arrangement with slider above the blog and have that be the homepage, I guess, not even using the home.php page at all, but having this template page be the homepage?
Ben Siegfried
ParticipantI appreciate your help.
http://www.siegfriedmedia.com/rivasrocks is the site. I have some stand-in posts, they are two categories. I want only one of the categories to show.
Here's the home.php code:
add_action( 'genesis_meta', 'agency_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function agency_home_genesis_meta() { if ( is_active_sidebar( 'home-welcome' ) || is_active_sidebar( 'home-slider' ) || is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-right' ) ) { //remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_after_header', 'agency_home_welcome_helper' ); //add_action( 'genesis_loop', 'agency_home_loop_helper' ); //add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); add_filter( 'body_class', 'add_body_class' ); function add_body_class( $classes ) { $classes[] = 'agency'; return $classes; } } } function agency_home_welcome_helper() { if ( is_active_sidebar( 'home-slider' ) ) { echo '<div id="home-slider">'; dynamic_sidebar( 'home-slider' ); echo '</div><!-- end #home-slider -->'; } if ( is_active_sidebar( 'home-welcome' ) ) { echo '<div id="home-welcome">'; dynamic_sidebar( 'home-welcome' ); echo '</div><!-- end #home-welcome -->'; } } function agency_home_loop_helper() { if ( is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-right' ) ) { echo '<div id="home">'; echo '<div class="home-left">'; dynamic_sidebar( 'home-left' ); echo '</div><!-- end .home-left -->'; echo '<div class="home-middle">'; dynamic_sidebar( 'home-middle' ); echo '</div><!-- end .home-middle -->'; echo '<div class="home-right">'; dynamic_sidebar( 'home-right' ); echo '</div><!-- end .home-right -->'; echo '</div><!-- end #home -->'; } } genesis();
Ben Siegfried
ParticipantOk cool, Yoast has it, it is just in a tabbed UI on each page. Maybe that will a solution for me.
Ben Siegfried
ParticipantI'm using SEO by Yoast, is that the same as a 301 redirect?
-
AuthorPosts