Forum Replies Created
-
AuthorPosts
-
Ren VenturaMember
Hi balto,
You'll need to execute a custom WP_Query to output the actual posts. Have you done this?
Also, here's a slightly more compact version of David's code:
if ( is_singular( 'post' ) && in_category( 'sport' ) ) { // your code }
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
Ren VenturaMember@Andrei It's supposed to be a content-oriented look so I wanted to go with a bold font-size. This one incorporated a lot of my personal design tastes and I love a liberal font-size.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
August 22, 2014 at 9:26 pm in reply to: Noticed a few code symbols appeared top of my background header graphic #120587Ren VenturaMemberJenny,
I understand that my answer may not have been extremely specific but I was operating under the assumption that you would have an idea of what code to look at (i.e. header functions).
I do have to disagree that someone is not responsible for how something they write is perceived. There is plenty a person can do to imply a tone in written communication and I'm not the only one to have interpreted your response as rude. Personally, I take a lot of time when writing something to ensure that I'm conveying the proper tone so that a potential misunderstanding like this is avoided. Although it does seem that your first response was not very friendly, you do have my apologies if indeed that was not the case.
Regarding your Genesis trouble, you will need to post some more specifics so that someone can provide a more accurate response for resolving it.
Ren
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
August 22, 2014 at 4:38 pm in reply to: Noticed a few code symbols appeared top of my background header graphic #120551Ren VenturaMemberSo that's how you thank someone who offers FREE help just because you don't understand what they mean? You could say thank-you and politely ask for additional help or clarification rather than saying I have offered no solution (I actually did). Without seeing your code, no one can know exactly where the problem is. Good luck.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
Ren VenturaMemberI see what you're saying: you want to remove the posts completely from the entire post navigation rather than remove the post navigation from the posts. I haven't tested the code but that would be logical. You may want to go with a custom post type because this is breaking the flow of your normal blog posts and seems like a pretty big hack. If someone else can chime in with a solution I'm not thinking of, awesome. My suggestion, though, is to create a custom post type. Is this something you're comfortable doing?
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
Ren VenturaMemberYes, it would go in your functions.php and you'd use it with the appropriate conditionals. For example:
add_action( 'genesis_entry_footer', 'rv_remove_post_nav_cat', 999 ); function rv_remove_post_nav_cat() { if( has_category( 44 ) ) { remove_action( 'genesis_entry_footer', 'genesis_prev_next_post_nav' ); } }
You could also find where your child theme is adding the genesis_prev_next_post_nav and add
if( !has_category( 44 ) )
to only add the single post navigation if the post does NOT have a category ID of 44. Personally, this is the route I'd take because it's cleaner.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
Ren VenturaMemberThis is strange. Since it isn't really a Genesis issue, you may want to post a topic on the WordPress support forum.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
August 22, 2014 at 10:13 am in reply to: Noticed a few code symbols appeared top of my background header graphic #120491Ren VenturaMemberIt is unlikely to be a CSS problem. It looks like you have incorrect (extra) HTML in one of your functions for where it's being outputted.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
Ren VenturaMemberUsually, the class is just .sticky and is a class assigned by WordPress. Regarding alternate ways to keep a post at the top of your blog page, setting it to sticky is the way to go.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
Ren VenturaMemberIf you're trying to keep eveything in this category separate, perhaps a custom post type might be ideal. Just a suggestion.
This should do the trick, though:
remove_action( 'genesis_entry_footer', 'genesis_prev_next_post_nav' );
http://my.studiopress.com/snippets/entry-content/
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
Ren VenturaMemberGlad you like it!
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
Ren VenturaMemberGive the items you don't want displayed a special class and use display: none for the class in your stylesheet's media queries.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
August 13, 2014 at 12:16 pm in reply to: Keeping the 'Private' prefix on filtered page titles #118614Ren VenturaMemberThis may be of some help:
http://codex.wordpress.org/Function_Reference/post_password_required
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
August 12, 2014 at 11:51 pm in reply to: Keeping the 'Private' prefix on filtered page titles #118515Ren VenturaMemberWell, using the WordPress filters does not mean that "Private" and "Protected" would automatically be added because you're filtering the entire title. Since you are not using the default $title in the genesis_post_title_text filter but rather returning something completely new, you'll need to account for the prepended words normally included by WordPress (Private and Protected). That said, you can probably use whichever filters you want; I would assume that you could use the general WordPress hooks or the Genesis specific hook with conditionals to achieve the same results. For example, the two following snippets should be equivalent (I've modified your snippet somewhat):
add_filter( 'private_title_format', 'custom_page_heading' ); function custom_page_heading( $format ) { if ( is_page() ) { $PageHeading = get_post_meta( get_the_ID(), 'page-heading', true ); if( !empty( $PageHeading ) ) { return 'Private: ' . wptexturize( $PageHeading ); } } }
add_filter( 'genesis_post_title_text', 'custom_page_heading' );
function custom_page_heading( $title ) {
if ( is_page() ) {
$PageHeading = get_post_meta( get_the_ID(), 'page-heading', true );
if( !empty( $PageHeading ) && get_post_status () == 'private' ) {
return 'Private: ' . wptexturize( $PageHeading );
}
}
}
`I stand to be corrected if I'm wrong on this.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
August 12, 2014 at 7:10 pm in reply to: Keeping the 'Private' prefix on filtered page titles #118478Ren VenturaMemberI initially thought this may have been what you were talking about but, after re-reading it, I then thought you were having trouble getting the value of $PageHeading to display. Since you're filtering the content of genesis_post_title_text, you should be able to solve this by concatenating the word you want to display onto your $PageHeading variable and returning it under the proper conditionals (i.e. get_post_status).
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
August 12, 2014 at 4:45 pm in reply to: Keeping the 'Private' prefix on filtered page titles #118468Ren VenturaMemberIt appears you're returning the $title variable without tying it to the if statement. This means that you're always returning $title to the filter. Add an else before returning the $title:
function custom_page_heading( $title ) { if ( is_page() ) { // Retrieves the stored value from the database $PageHeading = get_post_meta( get_the_ID(), 'page-heading', true ); if( !empty( $PageHeading ) ) { return wptexturize( $PageHeading ); } // If $PageHeading is empty, then return the regular title else return $title; } } add_filter('genesis_post_title_text', 'custom_page_heading' );
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
August 11, 2014 at 10:30 pm in reply to: Keeping the 'Private' prefix on filtered page titles #118328Ren VenturaMemberYou can further customize the titles using the get_post_status() function and some extra conditionals.
http://codex.wordpress.org/Function_Reference/get_post_status
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
Ren VenturaMemberUsing the enqueue method is the recommended way. If you need more information on the wp_enqueue_script method, visit this link:
http://codex.wordpress.org/Function_Reference/wp_enqueue_script
Wrapping the wp_enqueue_script() in the is_page_template() conditional tag will give you what you want. This means that the script will only be loaded if the temp1.php page template is being displayed. Your code should look something like:
add_action( 'wp_enqueue_scripts', 'my_custom_scripts' ); function my_custom_scripts() { if ( is_page_template( 'temp1.php' ) ) { wp_enqueue_script( 'script-handle', get_stylesheet_directory_uri() . '/js/example.js', array(), '1.0.0' ); } }
Note that this would add the script to the header of your site. If you want to add it to the footer, you can add the fifth parameter of true to the wp_enqueue_script function.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
Ren VenturaMemberAre you comfortable with using a FTP client (i.e. Filezilla)? You will need to download your functions.php file to fix the syntax error and then reupload it to the server.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
Ren VenturaMemberHmm. I'm not sure but this may have something to do with your child theme perhaps not displaying page titles. However, using the blog page template isn't something that is highly recommended. Here's a good post on why:
http://www.billerickson.net/dont-use-genesis-blog-template/
If you're trying to create a page that includes posts from a certain blog category, you should use a custom page template.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
-
AuthorPosts