• Resolved CravingGod

    (@cravinggod)


    I have the default content enabled on the Lavish Theme (because I want it on my homepage) however, I don’t want it on my other pages (about, blog, etc.)

    How can I remove the default content from all pages but the home page?
    My website is https://cravinggod.com/

Viewing 15 replies - 1 through 15 (of 17 total)
  • In the dashboard menu (on the left), go to “Pages”, click on a Page and delete the content inside the visual/text editor (the large window).
    Press “Update” button on the right.
    Content should be eliminated.
    Do not erase the title, though. If you would like to change the title, there is a way of doing it correctly.
    Be careful, there may be a Page named “Home”, which may be your home page content.

    You should probably browse through the WordPress Codex : Learn How to Use WordPress. Very clear instuctions and alot of info.

    Thread Starter CravingGod

    (@cravinggod)

    There is nothing in the visual text/editor to delete.

    Go to Appearance > Customize. The theme must have pre-built options in there.

    Thread Starter CravingGod

    (@cravinggod)

    I’ve done that. There is a checkbox to remove the Default Content Setting. But that also removes the default content from the Home page of the theme and I don’t want it removed there… Just on any new pages I create.

    Appearance > Customize > Basic Settings > Default content setting
    Hide default content from theme

    I am using the Lavish Theme. I thought that’s what this forum was for…

    I am using the Lavish Theme. I thought that’s what this forum was for…

    It is for the WordPress core files and the free themes and plugins, but not everybody knows everything about all the themes and plugins. We all are just volunteers who spend some free time assisting others with what knowledge we have on WordPress subjects.

    Overall, there are approximately 10,000 themes available for WordPress, including commercial ones, so we can’t know everything about all of them.

    Thread Starter CravingGod

    (@cravinggod)

    Thank you! Hopefully someone will know!

    You could try copying the default content from the Home page, Hide default content from theme, then paste the Home page content back in and save it.
    It may work.

    Hi there,

    You can use is_front_page() conditional tags to show only on home page. Be sure you have used child theme to customize parent templates.@SEE for referenceis_front_page

    Note: Please use child theme to customize parent templates so your changes will not lost on theme update.

    Thanks

    Thread Starter CravingGod

    (@cravinggod)

    Thank you! I haven’t used child theme. The only file I’ve edited was the sidebar-cta to edit the text on the default content bar.

    Is there a resource I can find about setting up and using a child theme that you recommend?

    Creating a Child Theme. If you need assistance with this, just ask. ??

    Thread Starter CravingGod

    (@cravinggod)

    Thank you so much NeoTechnomad! I’m sure I will!!!

    Thread Starter CravingGod

    (@cravinggod)

    Can you help me on this one? What and where should I add the is_front_page() conditional tags?

    <?php
    /**
     * The Call to Action Sidebar
     * @package lavish
     * @since 1.0.0
     */
    $default_content = get_theme_mod('hide_default_content', '0');
    if ( ! is_active_sidebar( 'cta' ) && (!$default_content)):?>
    	<div class="lr_widgets_cta" >
    	<div class="container">
            <div class="row">
               	<div class="col-md-12">
               		<div class="align_center" style="padding: 0rem 25%">
    <h2><?php echo __('What Do You Crave Most?', 'lavish');?></h2>
    <p><?php echo __('What do you think about first thing in the morning? What do you
    	think about most throughout the day? Our mission is to help you answer
    	 those questions with the one thing that matters most... God. Sign-up for email encouragement to help you seek (and enjoy) His word every day.', 'lavish');?></p>
    <a href="https://eepurl.com/bNRgXf" class="btn"/>Subscribe</a>
    </div>
            	</div>
            </div>
        </div>
    </div>
    <?php elseif(is_active_sidebar( 'cta' ) ):
    ?>
    <div class="lr_widgets_cta <?php if ( !has_header_image() && is_front_page() ) { echo "lavish_header_none"; } ?>" >
    	<div class="container">
            <div class="row">
               	<div class="col-md-12">
               		<?php dynamic_sidebar( 'cta' ); ?>
            	</div>
            </div>
        </div>
    </div>
    <?php else:
        return;
    endif;
    ?>
    Thread Starter CravingGod

    (@cravinggod)

    It looks like is_front_page() is in there… but it’s not working. ??

    When you say “default content”, do you mean the section whose header is “What Do You Crave Most”?

    If you created a child theme, in its style.css, paste this:

    .lr_widgets_cta {
    	display: none;
    }
    
    .home .lr_widgets_cta {
    	display: block;
    }
Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Removing Default Content from New Pages’ is closed to new replies.