Drobb

Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • in reply to: Styling Pagination Buttons #141818
    Drobb
    Power User

    Ok I’m psyched. Just sharing the css I’m going to go with:

    .pagination span.current {
    border-radius: 5px;
    font-family: Littlebit-Dotty2;
    color: black;
    background-color: #eedddd;
    border: 1px solid #CCC;
    font-size: 1.5em;
    line-height: 1.8em;
    height: 1.9em;
    width: 1.9em;
    }

    .pagination a.inactive {
    border-radius: 5px;
    font-family: Littlebit-Dotty2;
    color: #0d85cc;
    background-color: #e1e5e4;
    font-size: 1.5em;
    line-height: 1.8em;
    height: 1.9em;
    width: 1.9em;
    }

    .pagination a.inactive:hover {
    border-radius: 5px;
    font-family: Littlebit-Dotty2;
    color: black;
    background-color: #ec9929;
    font-size: 1.5em;
    line-height: 1.8em;
    height: 1.9em;
    width: 1.9em;
    }

    A few notes:

    The first block is the current active page, the second targets the inactive pages, and the third is the hover state. line-height, height, and width are only necessary if you want to tweak the font-size; if you tweak the font-size without setting these other parameters, the box size will change as well.

    Thanks again for a great theme!

    Website: davidweiss.net/blog

    in reply to: Styling Pagination Buttons #141771
    Drobb
    Power User

    Hi Zed — Sorry, just to close the loop on this one, I visited that page several times and I just couldn’t follow it. Then I returned some bare-bones troubleshooting and realized that everything I posted above is working just fine. That color I used, #eedddd, looks “processed/filtered” just because that’s the way this color looks. I tried with many other colors and everything works as expected. So, others may be able to use the code above to customize their pagination buttons as they see fit.

    in reply to: Customize Mobile-Menu Functionality? #120039
    Drobb
    Power User

    Thanks Darlene — I’m fine with SlickNav for the time being.

    in reply to: Customize Mobile-Menu Functionality? #118812
    Drobb
    Power User

    Hello Cryout! I guess I’m not the only one who’s stumped. ; )

    After struggling with plug-ins I found one that works (SlickNav). So anyone working on this would see that implemented on my site. But over here on my testing site, http://www.testing.davidweiss.net, I’ll leave it with the default Mantra mobile-menu. On that site, it’s “Page the First” that is the parent menu. I would still ideally like to customize this on my regular site (www.davidweiss.net) if possible rather than using a plug-in.

    Website: www.testing.davidweiss.net

    • This reply was modified 3 years ago by Drobb.
    • This reply was modified 3 years ago by Drobb.
    in reply to: Customize Mobile-Menu Functionality? #118336
    Drobb
    Power User

    Oh:

    There’s no way for a visitor to close a menu if they don’t like what they see there.

    They can tap the menu icon again and the whole menu, including open submenu(s), will close. So this is really not a big deal.

    But if there were a snazzy way to let users just open and close a submenu without visiting a new page, as is possible with a mouse, I would still very much like to learn that.

    in reply to: Margins and Padding on Different Types of Pages #117451
    Drobb
    Power User

    Thanks Zed!

    Drobb
    Power User

    Ok! Cryout gave me the custom code for this, through priority support and the customization team, and they said I could post it here. Presumably this can be tweaked for different layout templates, but it’s specific to Mantra.

    So, first create a child theme (see the tutorial link above).

    Then put this into your functions.php file, between the opening and closing tags, as described in the tutorial:

    /* custom functionality for layouts */
    function child_custom_layouts( $options = array(), $option_name = '' ){
        /* possible layout values are:
            - 1c = one column
            - 2cSl = two columns, sidebar left
            - 2cSr = two columns, sidebar right
            - 3cSl = three columns, both sidebars left
            - 3cSr = three columns, both sidebars right
            - 3cSs = three columns, sidebars on each side */
        // custom layout for the blog section, wherever that may be
        if (is_home()) $options['mantra_side'] = '2cSr';
        return $options;
    }
    add_filter( 'option_ma_options', 'child_custom_layouts', 11, 2 );

    Thank you Zed, and Cryout Customization! : )

    Drobb
    Power User

    Ok never mind my last post; I am working on changing the behavior of the “Posts Page,” (set in WP Settings > Reading) not the Archive Page.

    Drobb
    Power User

    Ok I’m still working on this! By the way, in this post I’ve been saying “Posts Page,” because that’s what it’s called in the WP interface, but I just learned that the technical term for the page I’d like to have a different layout from the rest is my Archive Page.

    So I took a look at archive.php, and I changed these lines

    <?php
         /* Include the Post-Format-specific template for the content.
         * If you want to overload this in a child theme then include a file
         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
         */
         get_template_part( 'content/content', get_post_format() );
    ?>

    to this:

    <?php
         /* Include the Post-Format-specific template for the content.
         * If you want to overload this in a child theme then include a file
         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
         */
         get_template_part( 'content-twocolumns-right.php', get_post_format() );
    ?>

    And then I took templates/template-twocolumns-right.php, renamed it content-twocolumns-right.php, and placed in my child theme folder along with the other files.

    But this had no effect.

    Can anyone tell me what I’m doing wrong, or if I’m even on the right track in solving this problem?

    Many thanks!

    Drobb
    Power User

    Thank you, Zed! I’m trying to figure this out. As for detecting the site section, this should simply be the page ID, since I’m interested in overriding the theme’s computed layout on that one page in particular, the wordpress-designated Posts page.

    What baffles me is that I can add this line to my child-theme’s functions.php file:
    update_post_meta( N, '_wp_page_template', 'templates/template-twocolumns-right.php' );
    where N = any page except the Posts page, and it will work.

    However, I can go to Mantra > Layout Settings, and change my Posts page to whatever layout I want, as long as I change every single other page on the site along with it. So the Posts page should be able to conform to any of these layouts on its own, shouldn’t it?

    But the Posts page behaves differently than the others, in that unlike all the others, it’s not possible to change this page individually.

    Is that behavior governed by the code in includes/custom-styles.php and sidebar.php?

    Drobb
    Power User

    I added a child theme, using this excellent tutorial, but I’m still at a loss at how best to implement this. Thanks much!

    Drobb
    Power User

    Thank you Zed! I’ll look into shortcodes. By the way, the other theme (Atahualpa) didn’t use the expressions [current year] and [website name] as such; sorry, I should have said {current year} and {website name}, to indicate that those were variables. So the actual statement I have there currently is

    Copyright © 2021 davidweiss.net – All Rights Reserved
    Powered by WordPress & Atahualpa

    I don’t know how Atahualpa updates the year automatically, and I can not longer access the theme’s settings (One of the recent WordPress updates “broke” the theme), to try to figure it out. I suppose I can search through the source files.

    But in terms of implementing something similar in Mantra, shortcodes sounds like a good way to do that, since they’re supported in the footer text field. But if there’s a better way, since I don’t necessarily have to use shortcodes, let me know!

    in reply to: Hide the page title on certain pages? #115655
    Drobb
    Power User

    Ok feeling sheepish. I get it now, that the page id will change from theme to theme, as will many of the terms; makes sense. This works:

    .page-id-61 .entry-title {
        display: none;
    }
Viewing 13 posts - 1 through 13 (of 13 total)