-
AuthorPosts
-
January 23, 2023 at 12:17 pm #1394762
Hello,
I want to remove the “category” showed on blog post, please see our website link:
https://www.yundianseo.com/google-seo/
picture show:
I know the css to hide the category:
span.blog-categories.minor-meta {
display: none !important;
}But in the html code of the page, it is still there, how to remove it totally not only on page but also in the code?
Thanks
January 23, 2023 at 12:23 pm #1394765or, just leave the category text, but remove its link totally on page and in code
January 24, 2023 at 2:50 am #1394855Hi,
Thank you for the inquiry.
The code is located in the includes > loop-index.php file, look for this code around line 348 and remove it.
if( ! empty( $cats ) ) { $cat_output .= '<span class="blog-categories minor-meta">'; $cat_output .= trim( $cats ); $cat_output .= '</span>'; $cats = ''; }
Best regards,
IsmaelJanuary 24, 2023 at 4:00 am #1394861Thanks,
How to leave the category text, but remove its link totally on page and in code?
January 24, 2023 at 6:58 am #1394871Hi,
If you want to keep the text and remove the link, look for this code:
$cat_output .= trim( $cats );
Replace it with:
$cat_output .= strip_tags( $cats );
Best regards,
IsmaelJanuary 24, 2023 at 7:13 am #1394872Hi, I found the code:
if( ! empty( $cats ) )
{
$cat_output .= ‘<span class=”blog-categories minor-meta”>’;
$cat_output .= $cats;
$cat_output .= ‘</span>’;
$cats = ”;
}But, there isn’t $cat_output .= trim( $cats );
January 24, 2023 at 8:01 am #1394875The same problem for grid post, how to totally remove the category:
and add a box shadow around the single post clumn
January 24, 2023 at 7:34 pm #1394988Hi yundian,
The code is in line 350 (it’s in the middle of the code posted by Ismael):
if( ! empty( $cats ) ) { $cat_output .= '<span class="blog-categories minor-meta">'; $cat_output .= trim( $cats ); $cat_output .= '</span>'; $cats = ''; }
The same problem for grid post, how to totally remove the category:
Please try to add this filter in your child theme’s functions.php file:add_filter("avf_postslider_show_catergories", function($display) { $display = "no_show_cats"; return $display; }, 10, 1);
and add a box shadow around the single post column
Please add this CSS code in Enfold > General Styling > Quick CSS:#top .avia-content-slider .post-entry { box-shadow: rgb(149 157 165 / 20%) 0px 8px 24px; padding: 0 20px 20px; } #top .avia-content-slider .post-entry .slide-image { margin-left: -20px; margin-right: -20px; width: calc(100% + 40px); max-width: none; }
Hope it helps.
Best regards,
NikkoJanuary 25, 2023 at 5:22 am #1395051Hi,
I use the css, but there are some problem, the top, left, right sides are blank
and there isn’t gad in mobile view
January 25, 2023 at 5:22 am #1395052you can check this page:
January 25, 2023 at 7:44 am #1395065Hi yundian,
For box-shadow issues, please add this CSS code:
#top .avia-content-slider, #top .avia-content-slider-inner { overflow: visible; }
For the mobile issue, please add this:
@media only screen and (max-width:767px) { .responsive #top #wrap_all .avia-content-slider-odd .slide-entry.first, .responsive #top #wrap_all .avia-content-slider-even .slide-entry.slide-parity-odd, .responsive #top #wrap_all .avia-content-slider-odd .slide-entry.slide-parity-even { margin-bottom: 40px !important; } }
Hope this helps.
Best regards,
NikkoJanuary 25, 2023 at 8:49 am #1395083Thanks, it do the work, please close
January 25, 2023 at 8:59 am #1395085Hi yundian,
I’m glad that we could help you :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘How to remove post category not only on page, but also in code’ is closed to new replies.