WordPress.org

Ready to get started?Download WordPress

Forums

Hueman
[resolved] Alx tabs alternative (5 posts)

  1. yoshimitsu1234
    Member
    Posted 7 months ago #

    This theme has widget called alx tabs which shows top pages, posts and comments on the site. Is there any alternative for this so that i could use similar feature on some other theme as well?

  2. Alexander Agnarson
    Member
    Theme Author

    Posted 7 months ago #

    Hi there, you could load the custom widget file via functions.php in the other theme:

    load_template( get_template_directory() . '/widgets/alx-tabs.php' );

    And add the file in widget folder in the theme. Then add the required javascript from scripts.js and the CSS from the theme.

  3. miri
    Member
    Posted 7 months ago #

    What if, instead, I want to use alx tabs, but tweak the layout a bit in a way that can't be easily done via just editing CSS* and instead want to change the heml. I know I cannot use the above and then upload a copy of the widgets file in my child directory because then there are function name conflicts.

    *for example, in the comments tab, I want the commenter name and the comment title to display on the same line. I can set them to display: inline, but then there's no space between them. I can keep them as divs and float them, but that's just a mess. Right now I've fixed it by displaying them inline and then putting a :after pseudo-element on the class in the name tag, but again, it seems like it would be cleaner/easier if I could edit the html and change the divs to spans.

  4. Alexander Agnarson
    Member
    Theme Author

    Posted 7 months ago #

    Copy over the whole alx_load function to the child theme's functions.php.

    Then modify

    get_template_directory

    To:

    get_stylesheet_directory

    For any files you wish to load from the child theme instead.

  5. miri
    Member
    Posted 7 months ago #

    Thank you so much. I'll work on doing this. I really appreciate how responsive you are in the support forums.

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.