Where are the actions defined? (10 posts)

  1. SebvandenBerg
    Posted 1 year ago #

    Hi Richie,
    I am still tweaking your wonderful Theme, Mesocolumn.

    Just a quick question: in which file are your actions defined (such as "do_action( 'bp_head_before_title' )", etc.)? I have looked through most files, but couldn't figure it out until now.

    Thanks in advance.

  2. Richie KS
    Theme Author

    Posted 1 year ago #

    it is a hook action. nothing hook into yet.
    for example if you add something like to your custom function

    function hello_text() {
    echo 'hello world';
    //here's the hook come in handy

    then the 'hello world' text will appeared in before <title> without touching the header.php

  3. SebvandenBerg
    Posted 1 year ago #

    Thanks for your reply, Richie.

    I do understand how add_action and do_action work.
    My problem is: WHERE do you define your add_action's?

    The reason why I need this: I need to modify files such as page.php, where I want to change some of the lay-out, for instance I need to modify the content of:
    <?php do_action( 'bp_after_page_content' ); ?>

    I just can't find where you define 'bp_after_page_content' and the other actions. :-)

  4. Richie KS
    Theme Author

    Posted 1 year ago #

    there's nothing hook into all the action hook. unlike any wp framework that hook the html into the action_hook. this theme did not so currently there's nothing defined inside any of the do_action() hook.

    also recon you add any new functions in lib/functions/custom-functions.php rename it from custom-functions-sample.php first.

  5. SebvandenBerg
    Posted 1 year ago #

    Thanks again for your quick reply.

    I am so confused now. If I understand you correctly, you are saying that none of your 'bp_*' actions are defined at the moment. Is that correct?

    And I could define those in a custom-functions.php? Which is quite a neat feature that you have built in.

    My confusion is that I thought I understand your code, but apparently I don't. :-O

    Let me give you an example of a more basic question that I am trying to resolve. On a post page, you allow for social buttons, an advert, tags, and links to related posts, all below the actual article. I would like to change the order of these additional features, maybe also change their appearance.

    Where (and how) do I do that?

    Thanks, Richie.

  6. Richie KS
    Theme Author

    Posted 1 year ago #

    yes, i'm affraid you will need to edit them in single.php, they were coded inside single.php template not action hook. maybe try child theme approach.

  7. SebvandenBerg
    Posted 1 year ago #

    Thanks Richie,
    that really helped.

    I also am now in the process of converting my changes to a child theme.

    Previously I had hard coded the dutch language into your PHP files. I have now undone that and created nl.NL language files, which works fine.

    On the converting to the child theme: that seems to behave strangely. So, I have a clean mesocolumn installation now, and added the child-theme by copying your mesocolumn-child folder to the folder where all the themes are, so besides the mesocolumn folder.

    If I then switch to the child theme in wordpress, there are a few problems:
    1) for the normal site (wider screen) to primary menu is all messed up. One menu item is missing, the order of items has changed and the category colors that I had defined are no longer there.
    2) the mobile site (so screen width <770px) has also a problem with the menu: the 'select page' and 'select menu' options on top have disappeared. There is still a orange bar, but it is not as high as it should be.

    Other than that the child theme works.

    Any thoughts?

    (If you want the put the previous topic down as 'resolved', then that is fine with me. I can then raise the child theme issue in a now topic.)

    Thanks again.

  8. Richie KS
    Theme Author

    Posted 1 year ago #

    could you check your child theme style.css, some bug with the template name from latest version 1.6.1

    Template: mesocolumn-plus
    should be
    Template: mesocolumn

    you might need to resave the custom menu location for the menu to show in mobile.

  9. SebvandenBerg
    Posted 1 year ago #

    Hi Richie,
    I had done all that already. Unfortunately that does not solve the issue.

    Naturally, I had changed the Template, by deleting the '-plus'.

    I feel I have tried all I can. I resaved all mesocolumn settings, just in case the child theme needs that reset. But the issue remains.

    I really don't feel like setting up the whole site from scratch, just so I can use the child theme. The main theme, with some of my own mods works perfectly. But I will get into trouble once there is a theme update of course.

  10. Richie KS
    Theme Author

    Posted 1 year ago #

    not sure why but the child theme did inherit parent styles and menu in my end. is it cache issue?

    if you saved the theme options, cat or page color using child theme and resave the menu location etc, did any of the save optons work?

    must some template in parent theme that you previous edits that were not sync with latest version.

    try backups/moved your edited version of mesocolumn(dutch)
    download latest version 1.6.1 (no edit)
    and try the child theme settings theme option, cat,page color again.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic