- This topic has 6 replies, 2 voices, and was last updated 7 years, 5 months ago by Tom.
-
AuthorPosts
-
November 6, 2016 at 4:35 am #242113Maiko
Hi Tom!
Can i ask more question?
When i look at the search results page,
i can see a php code at the end of the page.
“add_filter( ‘generate_sidebar_layout’,’generate_custom_category_sidebar_layout’ ); function generate_custom_category_sidebar_layout( $layout ) { // If we are on a category, set the sidebar if ( is_category() ) return ‘no-sidebar’; // Or else, set the regular layout return $layout; }”
how can i delete it?My web site is
http://fun-sports.netand i think, I have deleted the php code on woocommerce.php by mistake, is following code OK?
<?php
// No direct access, please
if ( ! defined( ‘ABSPATH’ ) ) exit;/**
* Remove default WooCommerce wrappers
* @since 1.3.22
*/
remove_action( ‘woocommerce_before_main_content’, ‘woocommerce_output_content_wrapper’, 10);
remove_action( ‘woocommerce_after_main_content’, ‘woocommerce_output_content_wrapper_end’, 10);
remove_action( ‘woocommerce_sidebar’, ‘woocommerce_get_sidebar’, 10 );
add_action(‘woocommerce_sidebar’,’generate_construct_sidebars’);if ( ! function_exists( ‘generate_woocommerce_start’ ) ) :
/**
* Add WooCommerce starting wrappers
* @since 1.3.22
*/
add_action(‘woocommerce_before_main_content’, ‘generate_woocommerce_start’, 10);
function generate_woocommerce_start()
{ ?>>
<main id=”main” <?php generate_main_class(); ?>>
<?php do_action(‘generate_before_main_content’); ?>
<article id=”post-<?php the_ID(); ?>” <?php post_class(); ?> <?php generate_article_schema( ‘CreativeWork’ ); ?>><?php do_action( ‘generate_before_content’); ?><?php }
endif;add_filter( ‘generate_sidebar_layout’,’generate_custom_category_sidebar_layout’ );
function generate_custom_category_sidebar_layout( $layout )
{
// If we are on a category, set the sidebar
if ( is_category() )
return ‘no-sidebar’;// Or else, set the regular layout
return $layout;}
add_filter( ‘generate_sidebar_layout’,’generate_custom_search_sidebar_layout’ );
function generate_custom_search_sidebar_layout( $layout )
{
// If we are viewing search results, set the sidebar
if ( is_search() )
return ‘no-sidebar’;// Or else, set the regular layout
return $layout;}
add_filter( ‘generate_show_excerpt’,’generate_full_post_search’ );
function generate_full_post_search( $show_excerpt )
{
if ( is_search() )
return false;return $show_excerpt;
}About mobile css, i want to ask 3 question.
1. How do i need to make a css code like following pic?
http://fun-sports.net/images/sample1.png2.Can i delete red circle area on the only top page?
http://fun-sports.net/images/sample2.png3.When i add following css,
.separate-containers .inside-article, .separate-containers .comments-area,
.separate-containers .page-header, .separate-containers .paging-navigation,
.one-container .site-content, .separate-containers .widget.inner-padding {
padding: 25px 15px 20px 20px;
font-size:10pt;
}
there are too much space on the footer area…
http://fun-sports.net/images/sample3.png
where do i need to change a css?Sorry a lots of question…
November 6, 2016 at 11:17 am #242175TomLead DeveloperLead DeveloperIt looks like you added PHP to a template or something. You should remove what you added, and add that code using the instructions here: https://generatepress.com/knowledgebase/adding-php-functions/
1. Try this:
@media (max-width: 768px) { .generate-columns { margin-left: 10px; margin-right: 10px; } }
2. This is because you’re using the separate containers layout. You can remove that space on mobile like this:
@media (max-width: 768px) { .separate-containers .site-main { margin-top: 0; } }
3. You’re adjust the padding with that CSS. To stop it from adjusting the footer widget padding, remove this part:
.separate-containers .widget.inner-padding
Hope this helps 🙂
November 6, 2016 at 11:32 pm #242285MaikoReally great helps!!
Thank you Tom!!!
Sorry, i want more your help…
I’ve deleted following red area by mistake…
http://fun-sports.net/images/sample4.png
Could you tell me what was it?About mobile css,
1.How can i change a red square area that picture or text(size and color) or background color?
http://fun-sports.net/images/sample5.png2.How can i change a blue square area? (height)
http://fun-sports.net/images/sample5.png3. How can i change a footer and copyright text size?
Sorry, i am asking a lot…
November 7, 2016 at 12:15 am #242291TomLead DeveloperLead DeveloperLooks like a bunch of empty space – no problem deleting that.
1. The background color is adjusted in “Customize > Colors > Body”. The white area is “Customize > Colors > Content”.
2. You could try this:
@media (max-width: 768px) { .separate-containers .site-main .generate-columns-container > .generate-columns { margin-bottom: 20px; } }
3. Using the Typography add-on in “Customize > Typography > Footer”.
November 7, 2016 at 6:17 pm #242514MaikoHi Tom!
I’ve deleted PHP what i add from woocommerce.php and made a new plugin then put in some add what i want.
http://fun-sports.net/images/sample6.png
But still i can see following php code on the end of the search results page.
“add_filter( ‘generate_sidebar_layout’,’generate_custom_category_sidebar_layout’ ); function generate_custom_category_sidebar_layout( $layout ) { // If we are on a category, set the sidebar if ( is_category() ) return ‘no-sidebar’; // Or else, set the regular layout return $layout; }”
What can i do else?1.I see, I want to change a title area only, Can i do it?
Also, can i change a padding?2.Great works! Thank you!!
3.Ummm, it didn’t change…
At the moment, following CSS what i add on Simple CSS.
@media screen and (max-width: 768px) {
.separate-containers .inside-article, .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content {
padding: 25px 15px 20px 20px;
font-size:10pt;
}
.generate-columns {
margin-left: 10px;
margin-right: 10px;
}
.separate-containers .site-main {
margin-top: 0;
}
.separate-containers .site-main .generate-columns-container > .generate-columns {
margin-bottom: 11px;
}
.inside-header {
position:relative;
}
.site-logo {
position: absolute;
bottom: 8px;
left: 10px;
}
.header-image {
height: 32px;
width: 171px;
}
}November 7, 2016 at 8:09 pm #242534MaikoHi Tom again!
1.I could find a way!
Just, can i change a padding?November 7, 2016 at 8:46 pm #242540TomLead DeveloperLead DeveloperThe code in your plugin wouldn’t display down there – you probably have that code written somewhere else in your installation.
1. Padding for what?
3. You’re talking about the copyright font size, correct?
-
AuthorPosts
- You must be logged in to reply to this topic.