Forum Replies Created
-
AuthorPosts
-
July 1, 2020 at 6:58 am in reply to: Stop Genesis from using first attached post image if no featured image #499788pxfortiParticipant
Thanks for the response.
I figured out how to get the original code to work. In case anyone else has this problem, I removed the if statement, which says to ignore the code if it's an archive. Not sure why that's in there since that's the reason for the code:
Below is the revised code:
add_filter( 'genesis_get_image_default_args', 'prefix_stop_auto_featured_image' );
/**
* Stop Genesis archives from using first attached image as fallback when no featured image is set.
*
* @param array $args Default image arguments.
*
* @return array Amended default image arguments.
*/
function prefix_stop_auto_featured_image( $args ) {
$args['fallback'] = false;
return $args;
}
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantHi Victor,
Thanks. I already know how fonts work. But arial is not the same as helvetica.
Yes, they are both sans serif, but they are not the same font.Since most of the studeopress themes use google fonts, I was surprised they went back to the old ways of depending on the users system fonts. Sure, it loads faster, but you don't get to specify a specific font.
I guess I'll replace it with a google font.
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantI don't think Helvetica Neue is default on windows is it? If not, then why is studeopress using Helvetica Neue in a theme without including it?
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantThanks. That will work. Now I'll get the links in. I will post final code when I get it done.
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantHi, Thanks for the reply. Both date functions work. The problem I am having is that I want to remove the genesis feature image on new post using
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
But that removes all genesis featured images. I only want to remove the genesis featured image from the new post and instead useadd_action( 'genesis_before_loop', 'featured_post_image', 1 ); function featured_post_image() { global $post; //if (strtotime($post->post_date) >= strtotime('2017-08-01') and ( is_singular( 'post' ) or is_category() or is_home() ) ) { $date = '2017-08-01'; if ( get_the_date('Y-m-d', $post->ID ) >= $date and ( is_singular( 'post' ) or is_category() or is_home() ) ) { the_post_thumbnail('large'); echo get_the_date('Y-m-d', $post->ID ); remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); } }
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantIf you want a landing page for your home page, remove the home page widgets and the template will use the landing page (you don't have to rename the home page template). When you assign the home page widgets, then the template is programmed to use the home page template. That's pretty common.
Also, you can't have a landing page as a home page an also use the features of the template's home page. How could that work? A user comes to your site and the home page, whatever it is, displays.
With some php modifications, the home page template could be used on a sub page, but that would not be easy if you are not very familiar with genesis framework and php programing.
Maybe the magazine template is not for you. You can probably find a template that has a home page like you want.
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantsee http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page for more details
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantwhatever code you are using do display excepts, you can use is_page() to make is to make it conditional to page.
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantdo you have a link to your site / page so I can see an example?
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantpxfortiParticipantLooks like you figured it out? You can't really have a landing page (eg, nothing but the text) and widgets using the default metro template.
What, exactly, are you trying to do on home page? It looks fine to me. If you want more prominent lead generation, you could put a newsletter signup or something similar in home top widget area.
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantadd this to paralax functions.php:
<?php //* Do NOT include the opening php tag shown above. Copy the code shown below. //* Customize search form input box text add_filter( 'genesis_search_text', 'sp_search_text' ); function sp_search_text( $text ) { return esc_attr( 'Search my blog...' ); }
To modify search box style, find this your style.css file:
/* Forms --------------------------------------------- */ input, select, textarea { background-color: #fff; border: 1px solid #ddd; color: #000; font-size: 20px; font-weight: 400; padding: 16px; width: 100%; } input:focus, textarea:focus { border: 1px solid #999; outline: none; } input[type="checkbox"], input[type="image"], input[type="radio"] { width: auto; } ::-moz-placeholder { color: #000; opacity: 1; font-weight: 400; } ::-webkit-input-placeholder { color: #000; font-weight: 400; }
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantHave you tried using background-size: contain !important;
?
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantVictor, Thanks A LOT for that info. Works perfectly.
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantI learned it because I was validating a site on https://validator.w3.org
Here is the top section of http://demo.studiopress.com/metro/:
<!DOCTYPE html> <html lang="en-US"> <head itemscope itemtype="http://schema.org/WebSite"> <meta charset="UTF-8" /> <title>Metro Pro – Mobile Responsive for the Genesis Framework</title><meta name="description" content="Mobile Responsive for the Genesis Framework" />
Here is the top section of my site:
<!DOCTYPE html> <html lang="en-US" prefix="og: http://ogp.me/ns#"> <head > <meta charset="UTF-8" />
I don't really care if the schema.org stuff is in the <head> tag, but I don't want the space.
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantHi Victor,
Thanks for the response. I found that article, but it tells you how to create your own genesis_markup, but now how to edit the existing ones. There does not appear to be a filter for the genesis_markup in framework.php.
writeNowDesign
WordPress and Ecommerce Website DesignpxfortiParticipantMy question is does anybody know how to change it.
Thanks
writeNowDesign
WordPress and Ecommerce Website DesignSeptember 21, 2015 at 8:18 pm in reply to: How to add numeric archive pagination to single post pages #166290pxfortiParticipanttry this:
function wnd_navigation_links() {
if (!is_single())
return; ?>
<div class="adjacent-entry-pagination pagination"><div class="pagination-previous alignleft"><?php
previous_post('« %', 'Previous', 'no');?>
</div><div class="pagination-next alignright"><?php
next_post('% » ', 'Next', 'no'); ?>
</div></div> <?php
}add_action('genesis_entry_footer', 'wnd_navigation_links', 5 );
writeNowDesign
WordPress and Ecommerce Website DesignSeptember 21, 2015 at 8:03 pm in reply to: How to add numeric archive pagination to single post pages #166284pxfortiParticipantYou're welcome. And I agree with you; I link to have a previous / next link on the pages. I think that might encourage people to read more posts.
writeNowDesign
WordPress and Ecommerce Website DesignSeptember 21, 2015 at 7:20 pm in reply to: How to add numeric archive pagination to single post pages #166279pxfortiParticipantTry this:
function wnd_navigation_links() { ?> <div class="adjacent-entry-pagination pagination"><div class="pagination-previous alignleft"><?php previous_post('« %', 'Previous', 'no');?> </div><div class="pagination-next alignright"><?php next_post('% » ', 'Next', 'no'); ?> </div></div> <?php } add_action('genesis_entry_footer', 'wnd_navigation_links', 5 );
writeNowDesign
WordPress and Ecommerce Website Design -
AuthorPosts