[Support request] Displaying a category title and description for download pages.

Home Forums Support Displaying a category title and description for download pages.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1395346
    Michael

    I hope you can help me, getting nowhere fast at WP download manager support. When I list categories of downloads (in reality custom post types) the title of the category isn’t displayed, nor the description. This is if I use their global “template” if I use their custom template (which allows styling of the download titles (post titles)) I still don’t get a title or description for the category page. The only way I can get a title and description is by using their “do not apply” template option. Which reverts to the generatepress method which gives me what I need.

    I’ve been back and forward with them trying to explain the problem. It’s pretty standard I would’ve thought to display a title of a page and description. All they’ve suggested is I customise the template, but all that does is style the links and not the title or description, or give any option to show those.

    Finally today they offered something to add to the functions.php file.

    add_action("wpdm_before_category_page_content", function ($cat){
        ?><h2><?php echo $cat->name; ?></h2><?php
    });

    I’m no php expert but that doesn’t look right. It does however give me a page title for the categories at least, but not a description.

    Back to Generatepress, I saw a solution in these forums for echoing a category description using an element, unfortunately I can’t seem to get the php file editing to be allowed to use that function. I saw another post where it created a shortcode here. So I added the function to create the shortcode, then added that to the element ticking the box, and specifying where it should go. Nothing happened.

    It’s been really frustrating to get what in reality is basic functionality

    The website link I’ve added is to show you an example page of what I’m getting at the moment. I realise it’s 3rd party software, but I thought there may be some way in Generatepress to get what I’m after, other than using the default blog post layouts.

    #1395442
    David
    Staff
    Customer Support

    Hi there,

    within that Hook function they provided you can try calling the category_description()

    eg. this line after the $cat->name line.

    <?php echo category_description(); ?>

    #1395447
    Michael

    Thanks David.. really pulling my hair out with them over this. They’re blaming GP theme, but if I don’t use their “templates” then GP does show title and description.

    “Default category pages are mostly controlled from the theme, and most themes show category title by default. But, as generatepress is not showing category title for default category page when using custom template”

    Be interested to know if it is GP which I doubt that’s the issue.

    #1395536
    Michael

    Oh and thanks, that works like a dream. Would be nice to get it to only activate if it was in that area ie in an element where location could be specified. Am not quibbling though, it works and it stops me going crazy.

    #1395615
    David
    Staff
    Customer Support

    There not wrong in regards to category template – GP uses the archive template.
    If it works – then don’t change it 🙂

    You can of course use a Hook Element.

    <h1><?php single_cat_title(); ?></h1>
    <p><?php echo category_description(); ?></p>

    Then select Hook > Custom Hook and add wpdm_before_category_page_content to the field.
    Check execute PHP and set your Display Rules.

    #1395626
    Michael

    Thanks again David, I’ll do that once I work out why I can’t execute the PHP because file editing disallowed. Changed to false in wp-config but still saying not allowed, once I find the culprit for that I’ll do it via elements.

    #1396244
    David
    Staff
    Customer Support

    Check if you have any security plugin settings blocking it or Mod-sec server rules.

    Glad to be of help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.