• I’m using genesis framework and I would like to add some html markup inside my widget area

    genesis_register_sidebar( array(
            'id'            => 'page-header',
            'name'          => __( 'Page Header', '$domain' ),
    	'description'   => __( 'This is the page header of the homepage.', '$domain' ),
            'before_title'  => '<h1>',
            'after_title'   => '</h1>',
        ) );

    this widget I created gives an html markup such as this below:

    <div class="home-left widget-area">
    	<section id="text-19" class="widget widget_text">
    ?
    		<div class="widget-wrap">
    			<h4 class="widget-title widgettitle"></h4>
    			<div class="textwidget">
    			</div>
    		</div>
    	</section>
    </div>

    But what I want to achive is something like the code below:

    genesis_register_sidebar( array
           'id' => 'home-blog',
           'name' => ‘Home - Blog',
           'before_title' => '<h2>',
            'after_title' => '</h2>',
     ) );

    HTML mark up created the widget above:

    `<div id=”blog” class=”section”>
    <div class=”wrap”>

    <div class=”copy clearfix”>
    <div class=”one-half first”>
    <section id=”text-5″ class=”widget widget_text”>
    <div class=”widget-wrap”>
    <h2>The Blog</h2>
    <div class=”textwidget”>
    <h6>Some text here</h6>
    </div>
    </div>
    </section>
    </div>
    <div class=”one-half right”>
    <a href=”/blog” class=”button”>Some text here</a>
    </div>
    </div>

    <div class=”blog-posts clearfix”>
    <article class=”post-69535 post type-post status-publish format-standard has-post-thumbnail category-building-your-brand category-business-blogging-2 category-business-growth entry” itemscope=”itemscope” itemtype=”https://schema.org/BlogPosting”&gt;

    <header class=”entry-header”>
    <h2 class=”entry-title” itemprop=”headline” style=”height: 140px;”><a href=”https://www.chrisducker.com/create-promote-blog-post-process/&#8221; rel=”bookmark”>How to Create and Promote a Blog Post ‘Perfectly’ Every Time [Youpreneur Process Blueprint]</a></h2>
    </header>

    <div class=”entry-content” itemprop=”text”>
    <p>Important Note: The ‘Process Blueprint’ featured in this post is one of our monthly deliverables at Youpreneur.com. These workflow process documents, along with other exclusive content, as well as our private (…) <a class=”more-link” href=”https://www.chrisducker.com/create-promote-blog-post-process/&#8221; rel=”nofollow”>Continue Reading</a>
    </p>
    </div>
    <footer class=”entry-footer”>
    </footer></article>

    <article class=”post-69537 post type-post status-publish format-standard has-post-thumbnail category-building-your-brand category-business-growth category-1-entrepreneurship category-personal entry” itemscope=”itemscope” itemtype=”https://schema.org/BlogPosting”&gt;
    <header class=”entry-header”>
    <h2 class=”entry-title” itemprop=”headline” style=”height: 140px;”><a href=”https://www.chrisducker.com/bringing-your-community-together/&#8221; rel=”bookmark”>The Importance of Bringing Your Community Together in Person [Youpreneur Chit-Chat]</a></h2>

    </header>
    <div class=”entry-content” itemprop=”text”>
    <p>Important Note: The ‘Chit-Chat’ video interview clip featured in this post is one of our monthly deliverables at Youpreneur.com. These training videos, along with other exclusive content, as well as (…) <a class=”more-link” href=”” rel=”nofollow”>Continue Reading</a></p>

    </div>
    <footer class=”entry-footer”>
    </footer></article>

    <article class=”post-69538 post type-post status-publish format-standard has-post-thumbnail category-building-your-brand category-business-blogging-2 category-business-growth entry” itemscope=”itemscope” itemtype=”https://schema.org/BlogPosting”&gt;
    <header class=”entry-header”><h2 class=”entry-title” itemprop=”headline” style=”height: 140px;”><a href=”https://www.chrisducker.com/understanding-your-customers-motivations/&#8221; rel=”bookmark”>The Power of Understanding Your Customers Motivations! [Youpreneur TTT Archive]</a></h2>
    </header>

    <div class=”entry-content” itemprop=”text”><p>Important Note: The ‘Tropical Think Tank’ clip featured in this post is one of our deliverables at Youpreneur.com. These live training videos, along with other exclusive content, as well as our private (…) <a class=”more-link” href=”https://www.chrisducker.com/understanding-your-customers-motivations/&#8221; rel=”nofollow”>Continue Reading</a></p>
    </div>
    <footer class=”entry-footer”></footer></article>

    </div>

    You will notice that it adds a div class inside it such us <div class=”copy clearfix”> <div class=”one-half first”> <div class=”one-half right”> <div class=”blog-posts clearfix”> <header class=”entry-header”> etc.

  • The topic ‘Add HTML wrapper around widget content’ is closed to new replies.