Forum Replies Created
-
AuthorPosts
-
Terry
MemberHi Russ,
One way to move the category description below the title is to change the priority in the add_action call (assuming you're using the link to Brad's page)
from
add_action( 'genesis_before_loop', 'display_category_archives_description');
to something like
add_action( 'genesis_before_loop', 'display_category_archives_description', 15);
It may be something different than 15. 15 works for the most recent Magazine Pro, 3.5.1.
Hope that helps!
Terry
MemberThanks Brad! 🙂
Terry
Member@braddalton To share my head banging the other day... I'm possibly not using the query_args correctly but now (WP 5.3, Genesis 3.2.1, Genesis Sample 3.2.1) the custom fields approach works for a page that is populated with posts (say with AB Posts and Pages Grid block) but not on a page titled "Blog" that is set as Posts Page.
Tried both query_args 'cat=-5'(no quotes in field) as well as 'category__not_in'(no quotes in field) on the Blog page, neither successful. However, action hook (as above) was successful.
Terry
MemberMorning Nick,
If you're still looking, try adding some space to the height of your image. An image 360x70 vs the current 360x41 with no other changes in a clean Altitude Pro v1.1.3 looked good.
Hope this helps.
TerryTerry
MemberLastly, you don't need both conditions but it helps me for understandability/readability
$query->is_main_query() && $query->is_home()
Terry
MemberThe
! is_admin() &&
tests for admin to distinguish main query.Terry
MemberRight, the
$query->is_main_query()
filters those specified categories from the main query which is what you're displaying on the posts page (Blog).It looks like you have a number of post listings on your site.
Are you trying to filter ob the blog and other locations? Add a test for that page:
`// Exclude categories from blog archive.
add_action( 'pre_get_posts', 'exclude_categories_blog_archive' );
function exclude_categories_blog_archive( $query ) {
if ( ! is_admin() && $query->is_main_query() && $query->is_home() ) {
$query->set( 'cat', '-61,-62,-50' );
}elseif ( is_page(whatever_the_page_id)) {
// for single category 5
$query->set( 'cat', ‘-5’ );// for multiple categories 3 & 4
//$query->set( 'cat', '-3, -4' );
}`
Terry
MemberSorry, try this...
<script src="https://gist.github.com/maroon-tlc/da29a24d22ce827a29072852d92714b0.js"></script>
Terry
MemberHi,
Try (this example uses category ids 30 & 29)
function exclude_category_blog( $query ) { if ( $query-&gt;is_home ) { $query-&gt;set( 'cat', '-30' ); //multiple categories replace '-30' with '-30 -29' to exclude categories 29 &amp; 30 } return $query; } add_filter( 'pre_get_posts', 'exclude_category_blog' );
Hope this helps.
October 8, 2019 at 7:10 am in reply to: Altitude Pro – Eliminate space between header and top of page #493921Terry
MemberHi,
It looks like that space is a result of how you removed the page titles.
Brad has a post here about different ways to remove page & post titles.
Hope this helps,
TerryTerry
MemberHi,
To set a content limit via the Customizer ("Customize" in top menu bar when logged into WP Admin and viewing site front end or via WP Admin "Appearance"=>"Customize")...
Navigate to "Theme Settings"=>"Content Archives"
Set to "Entry Content" and enter value to "Limit content..."
PublishSelecting an appropriate featured image size should also help.
Happy WordPressing...
Terry
MemberIs it possible that you're using the same image for the featured image and the first image in your posts? That's what it looks like.
You can either select a different image for the body of your post or disable the featured image in the "Theme Settings" => "Content Archives"
Terry
MemberHi ML,
It looks like your images are displaying twice in the blog roll. The content looks OK.
Is that the issue?Terry
Terry
MemberHi Marci,
You can change the Home menu item to a link by navigating to Appearance=>Menus in the WP Admin or Customize=>Menus.
Select the menu you wish to change.
Add the new Home menu item by selecting a "Custom Link" and add the link to your home page(https://driftlessprairies.org/), Link Text = Home & then select "Add to Menu."
You'll see the new Home item at the bottom of the menu list.
So it doesn't get confusing, delete the current menu item.
Drag your new Home item to the desired location.
All set!Or... your logo is a link to your Home page, so a common convention is to remove the Home item from the menu.
Hope this helps!
TerryTerry
MemberAhhh yes, thanks Brad!
Sorry for the cut & paste omission.Terry
MemberIs it possible that you have an older version of Infinity Pro or that the footer has been customized? The code isn't what I would expect for the Infinity Pro footer versions I have. That may be why the snippets aren't working.
Terry
MemberWhen I load the site, the Home page has the footer with 4 widget areas(Get in touch, FB, download app, welcome back), as does every page. You possibly tried something else?
The code I provided worked in a clean Infinity Pro child theme.
Terry
MemberPlease share a link to your site.
Terry
MemberHi,
Depending on what you're trying to do, this may help...
add_action( 'genesis_footer', 'paulc_site_footer', 1 ); function paulc_site_footer() { if ( ! is_front_page() ) { remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); remove_action( 'genesis_footer', 'genesis_do_footer' ); remove_action( 'genesis_footer', 'genesis_do_subnav', 5 ); remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); }
-
AuthorPosts