Forum Replies Created
-
AuthorPosts
-
September 6, 2017 at 3:58 am in reply to: How move sidebar-widget to top of content in mobile version? #211136Dan-cerMember
Hi Brad,
I risked to register for a new month to get the code. But I can't find how to control it in Widgets-Control.
Have I to implement something special into the css-code? As you did for enows-widget?
`.sidebar-primary .enews-widget {
grid-area: enews;
float: none;
width: 100%;
margin-top: 40px;
}September 4, 2017 at 10:50 am in reply to: How move sidebar-widget to top of content in mobile version? #211097Dan-cerMemberOK, fine!
September 4, 2017 at 10:45 am in reply to: How move sidebar-widget to top of content in mobile version? #211095Dan-cerMemberAs I have already a lot of plugins I'm interested i a solution without using another plugin.
But - to make it more clear - at the moment I want to move just my ebook-widget (for getting leads) above content at mobiles and tablets. Not the other widgets I have on the primary sidebar.Will that work easily, too?
kind regards,
Dan-cerSeptember 4, 2017 at 10:34 am in reply to: How move sidebar-widget to top of content in mobile version? #211093Dan-cerMemberHi Brad,
I got already the solution mentioned above to display widget areas above content. And I'm very happy with it.
Before I register to your new solution I want to ask you whether this solution is working for each template.
I don't find the php-file for the standard-template of my child theme. So I can't modify it.kind regards,
Dan-cerSeptember 4, 2017 at 9:40 am in reply to: How move sidebar-widget to top of content in mobile version? #211091Dan-cerMemberHi Erika,
my site is self-hosted.
I installed the plugin, and it works. Great! But at the moment I can't use it because the template is not working for this.
As it is a static homepage, I'm using the standard template that is not providing a top widget area.
By the way: I'm using a Genesis child theme.
For my blog-page I have a modified template with several widget areas above content. On this page I checked the new plugin, and it's working fine!In the past I tried to get a code for my homepage too, to have a widget area above content, but without blogpost-loop.
Have you - are anybody else here - a new idea how to get this?
kind regards,
Dan-cerJuly 24, 2017 at 7:40 am in reply to: How get CSS for content-box with background-color or -image? #209528Dan-cerMemberYes, frome there I got my content-boxes that I'm using already.
I will build on these codes now.July 24, 2017 at 6:39 am in reply to: How get CSS for content-box with background-color or -image? #209526Dan-cerMemberDoing it any other way is an awful lot of work.
Yes Victor, you're right. I would need a plugin for it to have a placeholder for different background-options.
Is there such a plugin available?
Dan-cerMemberHi there,
the Content Aware Sidebars are great, and I'm using the plugin now.
I still need the right hooks for a static page. As I wrote above this static page should have widget areas on top, middle and bottom of content, like the category-template I showed there.
But it shoudn't have loop/posts on that static template. Instead of posts just space for any content.
I tried already to get the right code, but up to now I failed.
Here is an example:<?php /** * Template Name: Seminare */ add_filter( 'body_class', 'seminare_body_class' ); function seminare_body_class( $classes ) { $classes[] = 'seminare'; return $classes; } remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_before_entry', 'genesis_entry_content' ); function genesis_entry_content() { seminar-sidebar( 'we-seminar-am' ); } genesis();
Can anybody show me a useful code? I'm irritated that I can't find the standard-template within my theme. I googled it, but didn't find the code of that template.
Thank you in advance for your answers.
kind regards,
RainerDan-cerMemberYes, Marcy, you are most probably right. And now I come again to the point just to get a template for a static page, with the features I have already for custom blog pages.
These features are widget areas on top of blog posts. I give you an example belowe.
the only thing I have to change is avoid to start the loop with blog-posts.
Just a static page with a widget area before content, after header, and with a custom sidebar.
With such a template I am free to get the dynamic event-widget on top of the page, automatically refreshing the events.Here is the code of one of my individual blog-pages:
<?php /** * Template Name: Medien */ add_filter( 'body_class', 'ernaehrung_body_class' ); function ernaehrung_body_class( $classes ) { $classes[] = 'medien'; return $classes; } add_action( 'genesis_before_loop', 'before_loop_widget_medien' ); function before_loop_widget_medien() { genesis_widget_area( 'before-loop-medien', array( 'before' => '<div class="before-loop-medien entry"><div class="widget-area"><div class="wrap">', 'after' => '</div></div></div>', ) ); } remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'child_do_custom_loop' ); function child_do_custom_loop() { global $paged; // current paginated page global $query_args; // grab the current wp_query() args $args = array( 'category_name' => 'medien', // exclude posts from this category 'paged' => $paged, // respect pagination ); genesis_custom_loop( wp_parse_args($query_args, $args) ); } add_action( 'genesis_after_loop', 'after_loop_widget_medien' ); function after_loop_widget_medien() { genesis_widget_area( 'after-loop-medien', array( 'before' => '<div class="after-loop-medien entry"><div class="widget-area"><div class="wrap">', 'after' => '</div></div></div>', ) ); } genesis();
How is this code to modify to avoid the loop of the blog-posts?
Thank you for your answer!
kind regards,
RainerDan-cerMemberThank you Marcy, the Content Aware Sidebars are exactly what can serve my needs in an easy way!
Since I'm using Genesis Simple Sidebars already, I want to know:
Could I use both plugins parallel?
With Simple Sidebars I created already 20 Sidebars and don't to transfer them manually to the new plugin.May 18, 2017 at 10:46 am in reply to: How get features of custom frontpage to custom-blog-page? #206659Dan-cerMemberHey Victor, I could solve it! By following these instructions, mainly in the comments at the bottom of the thread.
In short: I renamed page_blog.php to home.php. Thats it!
May 16, 2017 at 11:05 pm in reply to: How get features of custom frontpage to custom-blog-page? #206578Dan-cerMemberNo, I cleared all cache often and also tried it out in another browser.
Is this the right code in the beginning of the file:
add_action( 'genesis_meta', 'blog_page_genesis_meta' );
May 16, 2017 at 10:11 am in reply to: How get features of custom frontpage to custom-blog-page? #206552Dan-cerMemberYes I have assigned the template blog page: The template is named Custom Blog and I could check it in quick edit. In normal editor I set the sidebar "Blog" which I created before, but then - in "Customize" - the standard sidebar ("Primary Sidebar") is shown.
So you are right - it is not being read. But why?May 16, 2017 at 7:59 am in reply to: How get features of custom frontpage to custom-blog-page? #206541Dan-cerMemberThank you Victor.
At the moment the blog page is displaying only the posts. When I click on "Customize" and >Widgets, only the main widget areas are displayed: Header Right, Primary Sidebar, Footer 1,2 and 3.
Missing are Blog Top, Blog Middle, Blog Bottom Left and Blog Bottom Right.I deleted the remove_action for the genesis_loop and modified the hook as you suggested.
Is there anything else wrong? Eventually the first code-lines:
add_action( 'genesis_meta', 'blog_page_genesis_meta' ); function blog_page_genesis_meta() { if ( is_active_sidebar( 'blog-top' ) || is_active_sidebar( 'blog-middle' ) || is_active_sidebar( 'blog-bottom-left' ) || is_active_sidebar( 'blog-bottom-right' ) ) { // Force content-sidebar layout setting add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); } }
Here is the current page_blog.php:
<?php /** Template Name: Custom Blog */ add_action( 'genesis_meta', 'blog_page_genesis_meta' ); function blog_page_genesis_meta() { if ( is_active_sidebar( 'blog-top' ) || is_active_sidebar( 'blog-middle' ) || is_active_sidebar( 'blog-bottom-left' ) || is_active_sidebar( 'blog-bottom-right' ) ) { // Force content-sidebar layout setting add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); } } add_filter( 'body_class', 'blog_page_body_class' ); function blog_page_body_class( $classes ) { $classes[] = 'custom-blog'; return $classes; } add_action( 'genesis_before_loop', 'blog_page_widget' ); function blog_page_widget() { genesis_widget_area( 'blog-top', array( 'before' => '<div class="custom-blog entry"><div class="blog-top widget-area">', 'after' => '</div>', ) ); genesis_widget_area( 'blog-middle', array( 'before' => '<div class="custom-blog entry"><div class="blog-middle widget-area">', 'after' => '</div>', ) ); if ( is_active_sidebar( 'blog-bottom-left' ) || is_active_sidebar( 'blog-bottom-right' ) ) { echo '<div class="blog-bottom">'; genesis_widget_area( 'blog-bottom-left', array( 'before' => '<div class="blog-bottom-left widget-area">', 'after' => '</div>', ) ); genesis_widget_area( 'blog-bottom-right', array( 'before' => '<div class="blog-bottom-right widget-area">', 'after' => '</div>', ) ); echo '</div>'; } } genesis();
Dan-cerMemberThat was not yet the best solution. I got another script using the nav-primary-menu bar.
jQuery(function( $ ){ $(window).scroll(function() { var yPos = $(window).scrollTop(); if(yPos > 200) { // show sticky menu after screen has scrolled down 200px from the top $(".nav-primary").addClass('sticky-nav'); } else { $(".nav-primary").removeClass('sticky-nav'); } }); }); /* CSS (kein Leerzeichen zwischen .nav-primary und .sticky!): .nav-primary.sticky { background: none; position: fixed; width: 100%; left: 0; z-index: 999; } .nav-primary.sticky .wrap { background-color: rgba(0, 0, 0, 0.5); } */ /*Function //* Enqueue sticky menu script add_action( 'wp_enqueue_scripts', 'custom_enqueue_script' ); function custom_enqueue_script() { wp_enqueue_script( 'sticky-menu', get_stylesheet_directory_uri() . '/js/sticky-menu.js', array( 'jquery' ), '', true ); } //* Reposition the secondary navigation menu remove_action( 'genesis_after_header', 'genesis_do_subnav' );
Dan-cerMemberI got an answer at http://wordpress.stackexchange.com:
"You have another div controlling the full width background. You need to alter the css of that one if you want the width to look. This css takes the background off the full width div you have and put the background on the wrap div that you have maxing at 1200px;"
.lifestyle-pro-blue .nav-secondary {background:none;} .wrap{background-color:rgba(0,0,0,0.5);}
This works!
January 26, 2017 at 7:27 am in reply to: How open a category page by clicking on category in widget? #200063Dan-cerMemberHi Victor,
I had created category pages with "Custom Blog"-template. Then I created a widget "Individual Menu" and linked it with a new menu I created for the 5 categories. This is working too.It was too difficult for me to create 5 category templates. But now the solution is working fine.
Dan-cerMemberThank you, Victor!
I corrected it today and now it works. Strange was that today the list-style had changed to numbers. Maybe there is an influence that disturbs the setting here coming from a plugin or script. I will observe it.January 26, 2017 at 6:24 am in reply to: How customize the column-width of Home-Bottom Left/Right – Widget? #200057Dan-cerMemberI got it finally. Can't reproduce it here, but generally spoken I investigated the elements in browser and changed the percentages and paddings of the content.
January 24, 2017 at 11:55 am in reply to: How customize the column-width of Home-Bottom Left/Right – Widget? #199944Dan-cerMemberThank you for your answer. I can't solve the problem by editing this line. When I increase the width a little bit, the right column goes down because not enough space between the left column and the sidebar. That would be strange because there is a lot of space, especially between the columns.
I suppose there is too much padding/margin for the columns.
We have to decrease this padding/margin. So far I can't find the location where to edit.Any ideas?
-
AuthorPosts