Tagged: x
-
AuthorPosts
-
August 19, 2016 at 9:35 am #1138340
necxelosParticipantAgain, before I start with questions, a little disclaimer:
a) I work on Localhost for now so I can’t show You my site directly. I’ll try to make my questions as detailed as possible.
b) I have Child Theme ready (I use the one downloaded from Your section instead of setting up my own).
c) Currently I’m working using Integrity Stack but this will probably change at some point so I’ll be gratefull for answers that are stack-independent whenever possible.(If possible, please answer to my questions using my post structure so I can easily find what is what.)
So here it goes:
1. How can I get rid of breadcrumbs? How do I move breadcrumbs somewhere else (for example to sidebar)?2. How can I get rid of “Read More” button? And how can I have text “To read more click the title!” instead of it (in the same place)? With featured image and article title serving it’s function, “Read More” button feels kind of obsolete (too many clickable objects in one post).
3. How can I get rid of “down-pointing” arrow-like symbol in main menu buttons that are expandable? How can I change this symbol to somewhere else (for example: can I have slightly different background-color on those buttons that are expandable than those that aren’t)?
4. How can I change default Category Archive Title and Subtitle? Right now title says “Category Archive” and subtitle says “Below you’ll find a list of all posts that have been categorized as CATEGORY”. I know there is an option to change blog title/subtitle in Your customizer, but I couldn’t find similar option for category archives.
I need instead the Title to be actual category title and subtitle to be category description or a custom text of mine (different for each category of course).
Thanks in advance for answers and good day to You all
August 19, 2016 at 3:50 pm #1138722
RadModeratorHi there,
Thanks for posting in.
1. It can be turn off At Admin > Appearance > Customizer > Header. About moving it, you’ll have to edit this file framework\views\integrity\wp-header.php and move this line
<?php x_get_view( 'integrity', '_breadcrumbs' ); ?>to this file framework\views\integrity\wp-sidebar.php after this line,
<aside class="<?php x_sidebar_class(); ?>" role="complementary">Please note that it’s stack specific.
2. Please add this code to your child theme’s functions.php
function no_excerpt_more( $more ) { return ''; } add_filter( 'excerpt_more', 'no_excerpt_more', 9999 );Not sure about your second question, the title should already clickable since it’s linked.
3. Is it the navigation? It’s very important especially in mobile where there is no hover and user had to click it to expand. But if you still wish to remove it on desktop view, then please add this CSS to Admin > Appearance > Customizer > Custom > CSS
.x-navbar .desktop .x-nav li>a>span:after { display: none; }or just change the icon by icon code (make sure that this is added on child theme’s style.css and not in customizer).
.x-navbar .desktop .x-nav li>a>span:after { content: "\f103" !important; }All other icon codes are available here http://fontawesome.io/cheatsheet/, example,
 = \f1704. It should be under this template framework\views\integrity\_landmark-header.php and you may edit it anytime.
Hope these helps 🙂
August 20, 2016 at 12:06 pm #1139580
necxelosParticipant1.
a) Turning off works, thanks.
b) There are absolutely no files inside my framework\views\integrity folder in child theme. But I copied those two files from main theme to child theme and then edited copies and it works. Is it proper way to do it?2.
a) Disabling works, thanks.
b) What I meant to do is to place a text similar to “To Read More click the title!” instead of a “Read More” button/link I have now. Same place (at the end of excerpt), just text instead of link.3.
a) Both disabling and changing the icon works, thanks.
b) Second part of my question was if I can mark expandable menu items in a different way. For example different color of a background under button that is expandable compared to non-expandable button.4. Same story as in point 1b: There are absolutely no files inside my framework\views\integrity folder in child theme. But I copied the file from main theme to child theme and then edited copy and it works. Is it proper way to do it?
I did manage to move the category Title into actual title instead of “Category Archive”. But I lack the code/command to load category description into subtitle. Custom text on a per-category basis could work too but I suppose it would be much more harder to achieve.
August 21, 2016 at 12:46 am #1140053
ChristopherModeratorHi there,
#1b & #4
Yes, that’s correct. There is no file inside x-child\framework\views\integrity. You should copy the file from parent theme to child theme in order to edit.#2b #3
Please provide us your site URL.Thanks.
August 21, 2016 at 7:42 am #1140293
necxelosParticipantSorry, can’t do. That’s why I took time to write disclaimer-ish part (where I mentioned I work on localhost for now) of my initial post 🙂
So:
1. Done, thank You 🙂
2. How to place a “To Read More click the title!” text (not link) in the bottom of excerpt instead of a “Read More” link?
3. How can I mark expandable main menu buttons apart from the arrow icon at the end? Having different background color would be best/prefered solution.
4. What code should I place in framework\views\integrity\_landmark-header.php to have category description as category archive subtitle instead of default text?Again, thanks in advance and good day 🙂
August 21, 2016 at 10:43 am #1140412
ChristianModerator2. Please add the code below in your functions.php
function remove_x_excerpt_string() { remove_filter( 'excerpt_more', 'x_excerpt_string' ); } add_filter('after_setup_theme', 'remove_x_excerpt_string'); function new_excerpt_more($more) { global $post; return '<div><strong>To Read More click the title!</strong></div>'; } add_filter('excerpt_more', 'new_excerpt_more');3. See http://www.wpbeginner.com/wp-themes/how-to-style-wordpress-navigation-menus/ to learn how to modify WordPress menus.
4. No customization is needed for this. Edit your category and fill-in the Archive Title and Subtitle field (see attachment).
Hope that helps. 🙂
August 21, 2016 at 12:02 pm #1140485
necxelosParticipant2.
Awesome, works like a charm!
Inline styling works with this too, so does styling via my own class added to this new div.
Great Thanks! 🙂3.
Thanks for that guide. After reading and few tries I found out I can target some of the dropdowns in main menu with css via the .x-megamenu. Sadly for targeting non-megamenu dropdowns I’ve got no idea…4.
Awesome, thanks! No idea why I didn’t see it before…
Just out of curiosity though: placing category title is done using:
'<strong>' . single_cat_title( '', false ) . '</strong>'
How would I place category description the same way?
This would allow me to avoid storing and editing the same text twice every time (once in category description field, once in subtitle field).Thanks for being patient and staying with me 🙂
August 21, 2016 at 3:36 pm #1140605
RadModeratorHi there,
2. Glad to hear that 🙂
3. How about
li :not( .x-megamenu )orli:not( .x-megamenu ), or just:not( .x-megamenu )4. Should be like this
<?php $queried_object = get_queried_object(); echo category_description( $queried_object->term_id ); ?>Hope this helps.
August 21, 2016 at 4:56 pm #1140639
necxelosParticipant3. All of those either affect all the buttons on the site or all the buttons in the main menu. I’ll try to explain more precisely if I can:
– I have several buttons (menu items) in my main menu.
– Some of them are dropdown (AKA expandable) with more menu items under them, but some are not.
– Some of those dropdowns use megamenu (when there are many items under them) and some do not.
= What I need is to stylize ALL DROPDOWN MAIN MENU ITEMS (the ones that trigger dropdown not the ones under them) separately from NON-DROPDOWN MAIN MENU ITEMS. What I aim at (if that matters, probably not) is having lighter color of a button for DROPDOWNS that will sugest hovering over them shows more menu items.
= So basically I need 2 separate classes to refer to in CSS: Main_Menu_Dropdown_Buttons and Main_Menu_Non_Dropdown_Buttons.4. Where exactly do I put this new line in my current code which looks like this:
<?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( '<strong>' . single_cat_title( '', false ) . '</strong>', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . ('<strong>' . category_description( $queried_object->term_id ) . '</strong>'; ?>(Category title is already edited in the code I posted, only subtitle left to go.)
August 21, 2016 at 8:51 pm #1140863
RadModeratorHi there,
3. In that case, you may utilize your two custom classes to select them instead of mega menu class. Is there a way I can see its current setup? How about mockup designs?
4. You don’t have to add that, you’ll have to update the existing codes in framework\views\integrity\_landmark-header.php to match that code. Or rather replace the existing code with that new one. There are product categories, post categories, archive, and so on, so it depends on what you wish to change and only apply that code to applicable place depending on your requirement.
Example, post and portfolio categories
<?php elseif ( is_category() || x_is_portfolio_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>“' . single_cat_title( '', false ) . '”</strong>'; ?>It will then become
<?php elseif ( is_category() || x_is_portfolio_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( '<strong>' . single_cat_title( '', false ) . '</strong>', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . ('<strong>' . category_description( $queried_object->term_id ) . '</strong>'; ?>It’s up to you 🙂
Hope this helps.
August 22, 2016 at 11:09 am #1141655
necxelosParticipant3. In theory I can add custom classes to the menu items I want but if I ever change menu layout (replace some things, remove/add some things or just move from one place to the other) it will be a mess to dig through. I know many things can be done via adding custom classes to everything but that just generates chaos.
I thought if there is a way to add a FONT AWESOME ICON to dropdown buttons only, then there is also a default way to target dropdowns with something else (like CSS). I mean You somehow “told” the Theme that FONT AWESOME ICON has to be added only to the buttons with dropdown right?
As for mockup designs I gonna be honest: I’ve got no idea what that is…
4. Code works (after either deleting redundant “(” or adding “)” on the other side).
BUT
For some strange reason this part category_description( $queried_object->term_id ) kills all the formating and forces the next line (twice). Screen in attachment to show exactly what happened.August 22, 2016 at 11:44 pm #1142592
LelyModeratorHi There,
3.) We can use this selector:
.menu-item-has-children > a
For example on this link:http://demo.theme.co/integrity-1/ it will target the main menu HOME, PAGES and SHORTCODES.Regarding mock up it a sample design/image of what you to achieve. This way we can help you better.
4.)We need to see the structure on your site. Please try to right click on some category description text and then inspect element. Give us a screenshot of those so we can check from the structure where it is coming from. If this doesn’t work, we really need your link. So it would be better if you can setup a staging link.
Hope this helps.
August 23, 2016 at 9:03 am #1143066
necxelosParticipant3. Awesome, that was the selector I was looking for. Big thanks to You sir 🙂
4. Inspected using FireBug, and it looks like this (screen attached). My wild guess: function Rad gave me have new line (before and after) as default.
For the record: I test every snippet from You guys on unedited site first (AKA I have one testing ground that I wipe out after every snippet testing). So no other code editions could interfere. To reproduce this issue all You need to do is use Rad’s code (and add or remove unpaired bracket). You need to have some category description filled in first though.
August 23, 2016 at 12:18 pm #1143447
LelyModeratorHi There,
You’re welcome and thank you also for the screenshot.
Plase try adding the following code on your child theme’s functions.php file.
remove_filter('term_description','wpautop');That will remove category description automatic paragraph tags.
Hope this helps.
August 23, 2016 at 2:18 pm #1143622
necxelosParticipantThank You very much
That did it. And I’m even more happy that my “wild guess” happened to be true – those next lines were the default behaviour 🙂
That’s all for this topic of mine, Love You guys!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1138340 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
