Forum Replies Created
-
AuthorPosts
-
James DMember
I guess I was missing a brace.
Someone above says my 'ticks' are wrong. Sorry I don't know what a 'tick' is.
I was editing the code in dreamweaver 2015
jim
James DMemberThis is the last few lines of the php code. By the way, I am really out of my element with php. I can find my way through css without too much problem, but the php stuff loses me.
Here is the code as I pasted it in my file from the * Register Widget Area * on down:
//* Register widget areas
genesis_register_sidebar( array(
'id' => 'home-about',
'name' => __( 'Home - About','mpp' ),
'description' => __( 'This is the about section of the homepage.','mpp' ),
) );
genesis_register_sidebar( array(
'id' => 'home-portfolio',
'name' => __( 'Home - Portfolio','mpp' ),
'description' => __( 'This is the portfolio section of the homepage.','mpp' ),
) );
genesis_register_sidebar( array(
'id' => 'home-services',
'name' => __( 'Home - Services','mpp' ),
'description' => __( 'This is the Services section of the homepage.','mpp' ),
) );
genesis_register_sidebar( array(
'id' => 'home-blog',
'name' => __( 'Home - Blog','mpp' ),
'description' => __( 'This is the Blog section of the homepage.','mpp' ),
) );
function modify_query_order( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( 'orderby', 'title' );
$query->set( 'order', 'ASC' );
}
}
add_action( 'pre_get_posts', 'modify_query_order' );
I am getting errors in Dreamweaver on these 3 lines
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( 'orderby', 'title' );
$query->set( 'order', 'ASC' );
Jim
James DMemberuhmm. yeah... I added that code to the very end of my functions.php
function modify_query_order( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( 'orderby', 'title' );
$query->set( 'order', 'ASC' );
}
}
add_action( 'pre_get_posts', 'modify_query_order' );and it broke my site.
James DMemberOh boy, that is above my pay grade. I don't know what that means.
Just when I think I am understanding this stuff, I realize that I have no idea how most of this stuff works.
Jim
James DMemberSolved it! BAM!
#blog img, #portfolio img {
/* this tag controls the color and opacitiy of the feature image*/
margin-bottom: 16px;
opacity: 1;
margin-bottom: 1.6rem;
border: 4px solid #830E20;
}
#blog img:hover, #portfolio img:hover {
/* this tag controls the color and opacitiy of the feature image HOVER*/
opacity: .9;
border-image-width: 2px;
border: 4px solid #65B5F0;
}James DMemberThanks, that actually worked perfectly and it perfectly reversed the existing system.
Here is the code now:
embed, iframe, img, object, video, .wp-caption {
max-width: 100%;
}
img {
height: auto;
}
.featured-content img, .gallery img {
width: auto; /* IE8 */
}
#blog img, #portfolio img {
/* this tag controls the color and opacitiy of the feature image*/
margin-bottom: 16px;
opacity: 1;
}
#blog img:hover, #portfolio img:hover {
/* this tag controls the color and opacitiy of the feature image HOVER*/
opacity: .6;
}
/* GalleryIf I wanted to add a stroke to the border that would then change color on the hover, this is what I have tried that did not work:
##blog img, #portfolio img {
/* this tag controls the color and opacitiy of the feature image*/
margin-bottom: 16px;
opacity: 1;
border-image-width: 2px;
border-bottom-color: red;
}
#blog img:hover, #portfolio img:hover {
/* this tag controls the color and opacitiy of the feature image HOVER*/
opacity: .6;
border-image-width: 2px;
border-bottom-color: blue;
}
}Thanks
-
AuthorPosts