Builder Blocks: Audio - Example Customizations
(Created page with "== How to Assign a Layout to Audio Archive page == By default, Audio archive page, http://yoursite.com/audio/ will use <code>Full Width</code> layout (unless the default View...") |
|||
Line 165: | Line 165: | ||
} | } | ||
</pre> | </pre> | ||
+ | |||
+ | =See also= | ||
+ | *[[Builder_Restaurant_Block:_Customizations|Builder Restaurant Block]] | ||
+ | **[[Builder_Blocks:_Restaurant_-_Example_Customizations|Customization Examples]] | ||
+ | *[[Builder_Church_Block:_Customizations|Builder Church Block]] | ||
+ | **[[Builder_Blocks:_Church_-_Example_Customizations|Customization Examples]] | ||
+ | *[[Builder_Events_Block:_Customizations|Builder Events Block]] | ||
+ | **[[Builder_Blocks:_Events_-_Example_Customizations|Customization Examples]] | ||
+ | *[[Builder_Audio_Block:_Customizations|Builder Audio Block]] | ||
+ | **[[Builder_Blocks:_Audio_-_Example_Customizations|Customization Examples]] | ||
+ | |||
+ | |||
+ | <br /> | ||
+ | [[:Builder|← Back to Builder Codex Home]] |
Latest revision as of 09:37, July 30, 2013
How to Assign a Layout to Audio Archive page
By default, Audio archive page, http://yoursite.com/audio/ will use Full Width
layout (unless the default View Builder ships with is deleted). This comes from the Archives
view at My Theme -> Layouts & Views -> Views. This View can be edited and another layout selected which will work for all archive pages including the Audio archive page.
However if you wish to apply a layout just to the Audio archive page, follow this.
Add this code at the end of child theme's functions.php
:
function custom_filter_audio_layout( $layout_id ) { if ( is_post_type_archive('it_bb_audio') ) return '4f30b1482cde8'; return $layout_id; } add_filter( 'builder_filter_current_layout', 'custom_filter_audio_layout' );
In the above, change "4f30b1482cde8" to the ID of layout that you wish to assign to Audio archive page.
To find the ID for a Layout, go to the Layouts listing, copy the edit link for the desired Layout, paste the link somewhere, and grab the text after the last equal sign. For example, consider the following link:
http://yoursite.com/wp-admin/admin.php?page=layout-editor&editor_tab=layouts&layout=4f30b1482cde8
The Layout's ID for the above is 4f30b1482cde8.
How to Assign a Layout to Every Single Entry page of Audio CPT
Method 1
Use Post Type - Audio
View at My Theme -> Layouts & Views -> Views to assign a layout to every single Audio entry page.
Method 2
Add the following in child theme's functions.php
:
function custom_filter_audio_single_layout( $layout_id ) { if ( is_singular('it_bb_audio') ) return '513f60026cf01'; return $layout_id; } add_filter( 'builder_filter_current_layout', 'custom_filter_audio_single_layout' );
In the above, change "513f60026cf01" to the ID of layout that you wish to assign to single Audio pages.
How to Add Start and End times to Events archive page
1. Install and activate Advanced Custom Fields plugin. Note: At the time of writing this, this plugin that's available in wordpress.org/extend/plugins is not functional and must be downloaded only from the plugin author's site.
2. Go to Custom Fields -> Custom Fields and add Start Time and End Time custom fields per screenshot below (click for bigger view).
3. Edit wp-content/themes BuilderChild-Noise/archive-it_bb_event.php
Below
<h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
add this code.
4. Add the following at the end of child theme's style.css
(WP dashboard -> Appearance -> Editor):
.entry-meta.start-time, .entry-meta.end-time { display: inline-block; float: left; /*margin-right: 2em;*/ padding-top: 0.25em; /*width: 15%;*/ } .builder-template-archive-it-bb-event .builder-module .entry-title { float: left; width: 25%; clear: none; }
5. When creating/editing events, enter the event's start and end times. These (both fields or a single one) can be left empty.
When viewing the Events archive page in Calendar view, the buttons to switch to Previous and Next months won't be visible in Firefox. It's fine in other browsers.
To fix this, add the following at the end of child theme's style.css
(WP dashboard -> Appearance -> Editor):
.loop-calendar { clear: both; }
How to make entry box below post titles look simpler
Before:
After:
Note: The below steps are for making the changes per above sample screenshots in Posts page. For making similar changes in other listing views like archives or category pages or search results pages, appropriate template files need to be edited and CSS adjusted.
1) Create a file named content-index.php
in child theme directory having this code.
2) Edit child theme's index.php
.
Change
<?php get_template_part('content', get_post_format()); ?>
to
<?php get_template_part('content-index', get_post_format()); ?>
3) Add the following at the end of child theme's style.css
(WP dashboard -> Appearance -> Editor):
.blog .entry-meta.author-gravatar-wrapper { display: none; } .blog .left-entry-meta { margin-left: 0; } .blog .meta-wrapper { background: none; } .blog .meta-wrapper { padding-left: 0; padding-right: 0; } .blog .hentry .entry-meta.categories { display: inline; } .blog .hentry .entry-meta.categories a { background: none; border: none; padding-left: 0; padding-right: 0; } .blog .hentry .entry-meta.categories a:hover { color: #EFEFEF; }
See also
- Builder Restaurant Block
- Builder Church Block
- Builder Events Block
- Builder Audio Block
- Customization Examples