• Resolved blueoaks

    (@blueoaks)


    I’m using Elementor to create a Page template. It displays the page title and featured image but I’d like to also reference the OceanWP subheading as defined in the OceanWP Settings for the Page. Can anyone point me in direction to do this?

    Only alternative I know of is to use ACF to create a sub-heading custom field and add that to the elementor template. If I can use the OceanWP native subheading I would prefer that.
    thx

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    You can follow the link to add page subheading – https://docs.oceanwp.org/article/169-adding-the-page-subheading

    If it doesn’t help, then use the below code. Add it to the child theme’s functions.php and modify it as per your need –

    function my_remove_author_subheading( $subheading ) {
     
        // Set subheading to empty for author archive
        if ( is_page() ) {
            $subheading = 'your text';
        }
     
        // Return the subheading
        return $subheading;
        
    }
    add_filter( 'ocean_post_subheading', 'my_remove_author_subheading' );
    Thread Starter blueoaks

    (@blueoaks)

    Hello, I appreciate the reply but I don’t think either option here addresses my issue.

    I’ve added a subheading to a page via Edit Page -> OceanWP Settings -> Title -> Subheading.

    However, because I am using Elementor to create a custom Page template that overrides page.php I need an elementor widget that can call $subheading in the same way that Page Title can be called.

    There are a number of OceanWP custom fields that can be called via the Post Info widget, but subheading does not appear to be one of them. Hopefully this screenshot shows clearly what I mean…

    I understand. In that case, you need to use the custom field to display the subheading.

    Thread Starter blueoaks

    (@blueoaks)

    It would be great if OceanWP fields such as subheading were available to the elementor post info widget.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘use OceanWP subheading in Elementor template?’ is closed to new replies.