Community Forums › Forums › Archived Forums › Design Tips and Tricks › Custom Post Type
- This topic has 6 replies, 2 voices, and was last updated 6 years, 9 months ago by sunnypapabear.
-
AuthorPosts
-
July 30, 2017 at 3:25 pm #209732sunnypapabearMember
I'm using XHTML Prose Theme and added a Plugin called Mooberry Book Manager (I'm an Author so this is important and the Genesis Author Pro plugin was missing a lot of stuff). While the Plugin works really well, the one issue I have is that it doesn't have the Sidebar Selection option so I can't change the Sidebar for the Book Pages. The plugin creates pages for each book and series in a subdirectories called "book" and "series" respectively. The Add/Edit Page uses a template that looks very similar to Post or Pages. It supposedly shows all the Page Templates available in my theme, however, even though I am using my default Template (even tried Landing, Post, Archive templates as well), the book page that comes up when I pick Add New or Edit, is missing the Sidebar Selection option in the template.
When I questioned the developer he wasn't familiar with the Sidebar Selection option and thought it might have to do with my theme template. They suggested I see if there was a way to add a Custom Post Type to the Theme Settings so that the Sidebar Selection option would show up when I tried to Add/Edit a book or series.
Is there a way to do this?
http://petercruikshank.com/devJuly 31, 2017 at 7:01 am #209754Victor FontModeratorI don't know what you mean by sidebar selection either. Are you talking about the Genesis Author Pro - Featured Book widget?
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?July 31, 2017 at 8:14 am #209756sunnypapabearMemberNo, the Genesis Author Pro plugin didn't work well for me. This is the Mooberry Book Manager. What I am talking about is when you create a Post or a Page, there is an option to Select which Sidebar you want to use for that Post/Page (see the image below). This option does not show up on the Add a new Book page in Mooberry. They have most of the other options in the standard Post/Page, but not this one. The Mooberry developer suggested I find out if there was a way to add a Custom Post Type to the Theme Settings (a Type in addition to Post and Page) so it would show up in the "Book" Post Type.
July 31, 2017 at 9:05 am #209761Victor FontModeratorSidebar selection is not a feature that's built into the Genesis Framework or any of the child themes, at least, the pro themes. I can't speak specifically for XHTML themes. I don't have any of them installed on my development site, and haven't had them installed for a long time. They're too old to bother with.
That being said, the sidebar selection is most likely coming from one of your plugins. Do you have Genesis Simple Sidebars activated by any chance? Genesis Simple Sidebars installs a sidebar selection area on posts and pages.
If so, the custom post types that your Mooberry Book Manager plugin creates is probably not compatible with the Simple Sidebars plugin without modifying the plugin. If you're not a developer, you're pretty much out of luck.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?July 31, 2017 at 8:28 pm #209790sunnypapabearMemberThanks Victor, I shot the question over to the StudioPress Help Desk and see if they can provide the necessary code to add the Post Type "book" so it will be recognized by Genesis Simple Sidebars. Worth a try.
Your really knowledgeable so I thought you might know the answer to the following question:
I added code to the Function.php that would enable HTML in an Excerpt (in my case specifically with the Featured Page Advanced plugin). Everything works great except the line spacing between paragraphs is excessively large. You can see what I'm talking about at http://PeterCruikshank.com/dev at the bottom right of the front page. Maybe you can look at the below code and tell me what I might be doing wrong?
function custom_wp_trim_excerpt($text) {
$raw_excerpt = $text;
if ( '' == $text ) {
$text = get_the_content('');
$text = strip_shortcodes( $text );
$text = apply_filters('the_content', $text);
$text = str_replace(']]>', ']]>', $text);
$excerpt_length = apply_filters('excerpt_length', 80);
$excerpt_more = apply_filters( 'excerpt_more', ' ' . '[…]' );
$words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);
if ( count($words) > $excerpt_length ) {
array_pop($words);
$text = implode(' ', $words);
$text = $text . $excerpt_more;
$text = force_balance_tags( $text );
} else {
$text = implode(' ', $words);
}
}
return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
}August 1, 2017 at 8:22 am #209832Victor FontModeratorThere's nothing wrong with your code. Line spacing is controlled by CSS. Since you have minified your CSS, I can't tell you where to make the change, but the line spacing is controlled by the margin-bottom in this code:
page-widget p { margin-bottom: 24px; text-align: left; padding: 10px; font-size: 14px; }
You'll have to find this on your own. If it's in the widget CSS, you may have to override it in style.css.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?August 1, 2017 at 11:23 am #209841sunnypapabearMemberThanks, that resolved the issue.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.