cookingwithlei
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Founder] HomepageThanks Ben. I disabled all the sticky status and it works now.
Forum: Themes and Templates
In reply to: [Founder] HomepageHi Ben:
It doesn’t work even I have the setting right. I wonder if it is to do with my settings. I setup all the posts as sticky as it seems to be the way to make them appear on the homepage. someone on web was talking about the infinite scrolling, I am not sure if it is related.
Thanks,
Lei
Forum: Themes and Templates
In reply to: [Founder] thumbnails of images in the postHi, Ben:
It is all working so well. Thanks you for your prompt and wonderful support! ??
Lei
Forum: Themes and Templates
In reply to: [Founder] thumbnails of images in the postThanks, Ben. The “popular posts” text now is overlaying the social icons.
The sidebar on the main page works perfect without any adjustment tho. I wonder if it is to do with the overlaying instead of padding.
Lei
Forum: Themes and Templates
In reply to: [Founder] thumbnails of images in the postThe sidebar in the posts is center align, how can I change to left align?
Lei
Forum: Themes and Templates
In reply to: [Founder] thumbnails of images in the postIt works like a charm! Thanks so much! Ben.
To sum up for everyone else who wants to make the similar changes. Here are the steps.
1, To only output the sidebar in the header if it is on the homepage.
Copy the header.php file to the child theme, replace get_sidebar(‘primary’) on line 33 by
<?php
if ( is_home() ) {
get_sidebar(‘primary’); } ?>2, To make the sidebar show up below the post content.
Copy content.php into the child theme and add
<?php get_sidebar( ‘primary’); ?>
before the closing </article> tag
3, Install and configure the WordPress widget to display the top popular posts in the sidebar ( I am using “Top 10” for now)
4, add the codes below to style.css file in the child theme:
/*to remove the arrow button needs to be clicked to show the widgets*/
.singular .sidebar-primary-content {
max-height: none !important;
}
.singular .toggle-sidebar {
display: none;
}/*to position the widgets into two rows*/
.singular .sidebar-primary .widget {
width: 100% !important;
margin: 0 12px !important;
}/*To putting the recent post images into rows instead of a single column */
.singular .sidebar-primary .widget li {
display: inline-block;
margin-right: 6px;
width: calc(20% – 10px);
}
.singular .sidebar-primary .widget li img {
width: 100%;
}/* to make the sidebar area display on posts for the mobile interface */
.singular .sidebar-primary-content {
display: block;
}/*to hide the whole section with the categories and prev/next post links */
.post-after {
display: none;
}Forum: Themes and Templates
In reply to: [Founder] thumbnails of images in the postsuper! It works so well. I change to 20% so it can display 5 posts in a row. But all these changes can’t be seen on the phone interface, anything I need to add in the theme?
Can we remove two rows above too?
Published in Uncategorized
Previous Post Return to BlogThanks for your wonderful support!
Lei
Forum: Themes and Templates
In reply to: [Founder] thumbnails of images in the postThanks, Ben. I only used the second block of the codes as the position on the right of the posts is very hard to adjust. But now, it looks like this:
https://cookingwithlei.com/mango-lassi/
Can we adjust the display of the sidebars to two rows instead of two columns? So they display horizontally instead of vertically?
Thanks,
Lei
Forum: Themes and Templates
In reply to: [Founder] thumbnails of images in the postBrilliant! Now it is under the post. Can you give me more details about this part?
“You can then float it to the right or position it “absolutely” using CSS.In addition, you can copy sidebar-primary.php over and add “open” to the classes on the aside element. This will keep the sidebar open at all times so the dropdown button does not need to be clicked.”
Sorry I know Java but am not familiar with PHP and the theme structure.
Thanks,
Lei
Forum: Themes and Templates
In reply to: [Founder] thumbnails of images in the postHi, Ben:
I put
<?php get_sidebar( ‘primary’ ); ?>
before </article> in content.php in the child theme, but nothing is changed.
for the change in header.php, do you mean changing the code to?
<?php get_sidebar( ‘primary’, ‘is_home()’ ); ?>
Thanks,
Lei
Forum: Themes and Templates
In reply to: [Founder] thumbnails of images in the postHi, Ben:
I am not using pro version. I have a customized child theme and am alright with coding if you give me the instructions.
Thanks,
Lei
Forum: Themes and Templates
In reply to: [Founder] thumbnails of images in the postThanks, Ben.
Is it possible to have the sidebar moved to the right hand side of the posts but stayed on the top on the homepage?
Lei
Forum: Themes and Templates
In reply to: [Founder] Ads positionBrilliant! Thanks, Ban.
Forum: Themes and Templates
In reply to: [Founder] Ads positionWonderful, Ben. The “advertisement-container” works very well. Is it possible to set the same ads for all posts?
Lei
Forum: Themes and Templates
In reply to: [Founder] page linkIt works. Thanks, Ben!
Lei