- This topic has 13 replies, 3 voices, and was last updated 4 years, 9 months ago by
Joe Geoffrey.
Hello,
How do I add a text description at the top on the category archive page?
I got help by adding the code below to the class.Package.php file;
the_archive_description( ‘<div class=”taxonomy-description”>’, ‘</div>’ );
Thank you !!!
Glad to hear this your problem has been resolved
thanks
Hi Joe,
How and where did you add it? I tried several locations and only get error messages.
Best regards,
Oliver
Oliver,
My apologies for the wrong update. Please open the toolbar.php file in download-manager/tpls/shortcodes/toolbar.php.
Add this code to the_archive_description( '<div class="taxonomy-description">', '</div>' ); to the toolbar.php file right above the //Show toolbar on post type archive comment.
Hoping this makes sense and let me know when it works.
Hi Joe,
Thanks for the quick answer. However, in my files are no comments. Again, I tried unsuccessfully with a few locations: Here is the beginning of my file.
Best regards,
Oliver
<?php
/**
* Base: wpdmpro
* Developer: shahjada
* Team: W3 Eden
* Date: 6/6/20 09:48
*/
if(!defined(“ABSPATH”)) die();
list($sr, $ob, $od, $bt) = [6,2,2,2];
if(isset($tbgrid)){
list($sr, $ob, $od, $bt) = explode(“,”, $tbgrid);
}
if(is_post_type_archive()) $toolbar = 1;
if ($toolbar) {
?>
<form method=”get” class=”<?php if(isset($async) && (int)$async === 1) echo ‘__wpdm_submit_async’; ?>” data-container=”#content_<?php echo $scid; ?>” id=”sc_form_<?php echo $scid; ?>” style=”margin-bottom: 15px”>
<?php
if ($toolbar !== ‘skinny’ && $title !== ”) {
Paste this code the_archive_description( '<div class="taxonomy-description">', '</div>' ); between these two if statements below;
if(isset($tbgrid)){
list($sr, $ob, $od, $bt) = explode(",", $tbgrid);
}
and
if(is_post_type_archive()) $toolbar = 1;
Your code should be looking like this below;
if(isset($tbgrid)){
list($sr, $ob, $od, $bt) = explode(",", $tbgrid);
}
the_archive_description( '<div class="taxonomy-description">', '</div>' );
if(is_post_type_archive()) $toolbar = 1;
Thanks so much for guiding me, Joe! This works.
Do you happen to know how can I activate a slider on the category page like on my other pages? See https://www.hoyaoptics.eu/download-category/downloads
Best regards,
Oliver
-
This reply was modified 4 years, 9 months ago by
Oliver Pust.
Use this CSS class taxonomy-description to format the text.
To add a slider to the category page, add the slider embed code just right above this code the_archive_description( '<div class="taxonomy-description">', '</div>' which you added a little while ago.
So if the slider is Slider Revolution, the code embed code should look like this <?php add_revslider('category_slider'); ?> where category_slider is your slider alias, replace the slider alias with yours.
I use Smartsilder, and the code echo do_shortcode('[smartslider3 slider="2"]'); did the job. However, extra space is added below the menu, and consequently the slider covers the category description…
Just play around with the CSS file otherwise it’s easier to help if am provided with the website logins so that I can help better.
Just found out that I can set negative margins per slider in the Smartslider settings. That did the trick. Thanks again for your help and patience!
Awesome. You’re welcome!
The topic "Add description to publication category" is closed to new replies.
