Forum Replies Created
-
AuthorPosts
-
September 26, 2017 at 5:30 pm in reply to: Modifying visible elements in "Video" Post Format on Mindstream theme #211881
erh
MemberVictor! I must thank you again, I think you lead me to the right answer.
I commented the IF clause, and the brackets of the ELSE clause, causing the "add_actions" to run every time, no matter what. That seemed to not break my blog, and it also enabled all the titles (et al) on the video post format post.
I cleaned it up and commented the poop out of it so I remember what changes I made.
You probably know more than I... are changes to the themes functions.php file permanent? Am I going to lose all these next time I updated wordpress?
Final function:
function mindstream_remove_elements() { /*** EDIT 9/26 - this section removes post title (et al) from non default post formats *** It was commented out to disable the removal of these attributes. BUT, the "else" *** clause is what enables them for all posts. A copy of the contents of the "else" clause *** has been added below. To revert, delete the three "add_actions" immediately after this *** comment block, and uncomment this block *** // Remove if post has format if ( get_post_format() ) { remove_action( 'genesis_post_title', 'genesis_do_post_title' ); remove_action( 'genesis_before_post_content', 'genesis_post_info' ); remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); } // Add back, as post has no format else { add_action( 'genesis_post_title', 'genesis_do_post_title' ); add_action( 'genesis_before_post_content', 'genesis_post_info' ); add_action( 'genesis_after_post_content', 'genesis_post_meta' ); } *** THE "add_action" lines below were duplicated from the "else" clause above */ add_action( 'genesis_post_title', 'genesis_do_post_title' ); add_action( 'genesis_before_post_content', 'genesis_post_info' ); add_action( 'genesis_after_post_content', 'genesis_post_meta' ); }
September 26, 2017 at 5:28 pm in reply to: Modifying visible elements in "Video" Post Format on Mindstream theme #211880erh
MemberVictor! Thank you so much for doing this, I really appreciate your help!
I'm afraid that didn't quite work though. When I commented out that line, I got this error when loading the blog:
Parse error: syntax error, unexpected '}' in /home/practi59/public_html/wp-content/themes/mindstream/functions.php on line 56
I had to rollback.
Line 56 is the closing bracket of the
mindstream_remove_elements
function:function mindstream_remove_elements() { // Remove if post has format if ( get_post_format() ) { remove_action( 'genesis_post_title', 'genesis_do_post_title' ); remove_action( 'genesis_before_post_content', 'genesis_post_info' ); remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); } // Add back, as post has no format else { add_action( 'genesis_post_title', 'genesis_do_post_title' ); add_action( 'genesis_before_post_content', 'genesis_post_info' ); add_action( 'genesis_after_post_content', 'genesis_post_meta' ); } } <--- this is line 56 I'm beginning to think the removal of line 33 prevented the "add_action" calls in the "else" clause in the function before to not run, and that is what caused the error... hrmmm..
September 19, 2017 at 5:21 pm in reply to: Modifying visible elements in "Video" Post Format on Mindstream theme #211645erh
MemberIt was added from the beginning when I downloaded / applied the theme. I did not do anything special to "enable" the formats.
I did find this in my
themes/mindstream/functions.php
file:/** Add support for post formats */ add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' ) ); add_theme_support( 'genesis-post-format-images' );
Is that relevant?
erh
MemberHi Christoph, thanks for the suggestion. I've tried that one, and it didn't allow multiple testimonial 'groups', just one slider with all the testimonials. Which won't work if I want to keep each products' testimonials separate.
Got any others in mind?
erh
MemberAlso:
-Must have navigation buttons to forward through to next quote, or click back to a certain quote.
November 16, 2015 at 11:27 pm in reply to: Exclude post Category from showing up in blogroll #171321erh
MemberBrilliant, that did it perfectly. Thanks BradDalton!
Here is the code I used if anyone else comes across this from a search. I added it to my functions.php through this plugin:
https://wordpress.org/plugins/add-actions-and-filters/function exclude_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'cat', '-17' ); } } add_action( 'pre_get_posts', 'exclude_category' );
(17 was the ID of the category I wanted excluded).
erh
MemberThe link no longer works. I could use a feature like this. Anyone know if this is possible? Although, I'm using the Mindstream theme.
erh
MemberBump. Can anyone help point me in the right direction?
I found the folder where the "post format" images are located, and can easily change the icon to look like what I need it. But I'm still not sure how to customize what gets displayed on the blog page (title, comments, categories, etc).
-
AuthorPosts