Home Forums Pro Themes Education Hub Pro How to move home content above new and events widget.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #34407
    me_marketing
    Participant

    How to move home content above new and events widget.

    #34528
    wensolutions
    Keymaster

    Hello @me_marketing,

    To move the new and events widget under home content you have to create and activate the child theme.

    Below is the link of the plugin you can use to create and activate the child theme.

    https://wordpress.org/plugins/wp-child-theme-generator/

    After creating and activating the child theme, in your child themes functions.php paste below given code.

    function education_hub_pro_child_custom_sections_movement() {
    remove_action( 'education_hub_action_before_content', 'education_hub_add_home_news_event', 8 );
    add_action( 'education_hub_action_after_content', 'education_hub_add_home_news_event');
    }
    add_action('init', 'education_hub_pro_child_custom_sections_movement');

    Hope this helps.

    if you have any confusion further, please let us know.

    Best Regards!!

    #34639
    me_marketing
    Participant

    Is there any way to do this without using child themes? When I tried to use the plugin, it didn’t work. Thank you.

    #34640
    me_marketing
    Participant

    To be more specific, I am using the free version of education hub, not the pro version. I cannot use child themes due to some issues so is there anyway to do this without them? Also when I try to copy paste the code you have given me into functions.php, then there is a news widget under home content but there is also a news widget above home content.

    #34673
    wensolutions
    Keymaster

    Hello @me_marketing,

    Please do not directly modify your original theme file as you will lose all the modification . So you should always go through the child theme approach while making any modification in the theme.For creating the child theme you can refer to below link.

    https://codex.wordpress.org/Child_Themes

    And as we had mentioned in the earlier replies, the code we have given will only work for the Pro version of the theme.
    So for the free theme use below Code in your Child themes functions.php file

    function education_hub_child_custom_sections_movement() {
    
    remove_action( 'education_hub_action_before_content', 'education_hub_add_home_news_event', 7 );
    add_action( 'education_hub_action_after_content', 'education_hub_add_home_news_event');
    }
    add_action('init', 'education_hub_child_custom_sections_movement');

    Hope this helps .

    Best Regards!!

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