Forum Replies Created
-
AuthorPosts
-
Carlo
MemberHi Benjamin. I hope I understand what you mean. try this code:
.header-image .site-title>a { background-size: contain; }Add it to the bottom of your theme stylesheet.
Carlo
MemberHi Patrycja. Try...
#text-2 { width: 60%; float: right; } #text-2 .textHolderRight { width: inherit; }Add the code to the bottom of your theme stylesheet.
January 10, 2015 at 5:44 am in reply to: Executive Pro theme: Contact Form in Post Excerpt on Slider #136844Carlo
MemberHi Keirsten. Can you post a link to your site, so it's clearer what you need?
Carlo
MemberHi Aaron. That can definitely be done. You can use the RSS widget that is built into WordPress, and put it into a widget area on your static site (I assume it's a WordPress site).
In the first text box in the widget configuration, enter your blog address with /feed/ at the end. Examples:
http://yourblog.com/feed/, or
https://yourblog.com/feed/, or
http://www.yourblog.com/feed/, or
https://www.yourblog.com/feed/You probably want to set it to display 1 item and display the item content.
This will display your latest post from your blog as a widget on your static site.
Or, do you want the latest post from your blog to appear as its own page on your static site? That's doable too, but it will take a bit of code. Let me know if that's what you want.
Carlo
MemberYou can have the meta tags only show on the front page. You'd use something like this:
add_action( 'wp_head', function() { if ( is_front_page() ) echo '<meta name="" content="">'; } );
Carlo
MemberSometimes it can be your Internet connection blocking uploads. Are you on a public Internet connection?
January 10, 2015 at 5:13 am in reply to: genesis_title showing outside tag with Simple Hooks #136834Carlo
MemberI don't know why it says the hook executes between the title tags, because that's not how it works.
However, you can replace the post title in your post editing screen under 'Custom Document Title'.
Or, if you want to use a hook, you can use the
wp_titlehook like this, in your theme functions:add_filter( 'wp_title', function() { return 'My Replaced Title'; }, 20 );or if you want to keep the title but add content to it, this should work:
add_filter( 'wp_title', function( $old_title ) { return sprintf( 'My Old Title was %s', $old_title ); }, 20 );
Carlo
MemberThe reason it doesn't work is that you're hooking too late. The
genesis_before_entryhook has already been and gone once your content is processed for shortcodes.You will need to use Advanced Custom Fields, create a text or wysiwyg field. Then in your theme functions you might have something like this:
add_action( 'genesis_before_entry', function() { the_field( 'your_field_name' ); } );
Carlo
MemberSometimes that happens with custom post types. Get them to try doing a hard refresh, which is ctrl + F5.
Carlo
MemberSo my question stands. What is the ‘pro’ way to incorporate Genesis hooks and filters, etc., in a plugin.
Great question. I recently encountered this problem myself.
To be clear, we actually can use Genesis hooks and filters in a plugin, because the way actions and filters work is that the code doesn't get run until later on.
What we can't use is Genesis functions, because plugin code is run before Genesis functions are defined.
The solution is to wrap your function call in one of the appropriate actions or filters. The action
after_setup_themeworked for me.example:
add_action( 'after_setup_theme', function() { genesis_register_layout(); } );That way the code does not get run until after Genesis is setup.
-
AuthorPosts