-
AuthorPosts
-
March 29th, 2021 at 02:34 #116059myob9aPower User
Kahuna Plus using a child theme.
I am looking to use a Featured Box (3) on the Landing Page but don’t want a sticky post to show against a specific category. Is there a way to (script etc) to enable me to avoid the sticky post showing in the box?
Website: dickson.org.au
March 29th, 2021 at 06:45 #116060myob9aPower UserBy the by – I tried the solution in https://www.cryoutcreations.eu/forums/t/offset-on-featured-posts only to have the functions.php advice of
Uncaught Error: Call to undefined function cryout_localize_cat() in wp-content/themes/kahuna-plus-child/functions.php:34
Stack trace:
#0 wp-settings.php(528): include()
#1 wp-config.php(106): require_once(‘/home/draorg/pu…’)
#2 wp-load.php(37): require_once(‘/home/draorg/pu…’)
#3 wp-admin/admin.php(34): require_once(‘/home/draorg/pu…’)
#4 wp-admin/theme-editor.php(10): require_once(‘/home/draorg/pu…’)
#5 {main}
thrownWebsite: dickson.org.au
April 4th, 2021 at 21:53 #116284ZedCryout Creations mastermindHi,
The example code is part of the theme and lists the default parameters of the function call retrieving the featured boxes content. To customize the content you’d need to write your own custom function that filters the necessary parameters (not copy that code as-is).
Sticky posts are already ignored in the retrieval query, as dictated by the
ignore_sticky_posts' => 1
parameter. However, this only excludes the sticky posts from being included at the beginning of the list – sticky posts are also regular posts and are included in the results according to their publish date.
To exclude specific posts entirely, you’d need to make use of thepost__not_in
parameter by adding it using the filter.If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic. -
AuthorPosts
The topic ‘No Sticky Post in Featured Box’ is closed to new replies.