This probably has to do with the custom query – it’s preventing other queries from working properly.
Setting a logo as a post seems an odd approach. Media attachments are already posts in and of themselves. Additionally, WP has a nice logo feature – custom-logo
. I would add the logo that way and then just call the theme mod for the logo. That way you’re not adding an extra query that throws off other queries.
In theme’s functions.php:
<?php add_theme_support('custom-logo'); ?>
In theme’s header.php:
<?php the_custom_logo(); ?>
Related Posts:
- How to get the active theme’s slug?
- Which hook callback has priority if both plugin and theme use the same hook?
- How to send “Location” header on plugin form submit event?
- Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin
- send_headers don’t work on wordpress multisite
- add_meta_box (Will display only in specific page admin WordPress)
- WordPress Redirect Not Working – AJAX Callback Response Not Picked Up
- All sites themes functions.php have been changed
- Why namespaces are rarely used in WordPress plugins?
- how can I do something on new user registration?
- Get ‘Headers already sent’ error for the plugin I am creating when I try to login
- Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection
- Use $variable from file1.php in file2.php (different file paths)
- How to make a dynamic css class whose name changes every visit to confuse scraper
- I receive taxonomy id
- How to include files relative to a file’s directory
- speed up pagination for huge database
- Inserting Plugins Into Blank Space of Externally Designed WordPress Theme
- Plugin Admin panel checkbox unchecked after submit
- uncaught TypeError: Cannot read properties of null (reading ‘classList’) custom plugin
- Custom Plugin scripts from admin working in frontend
- WordPress Cache delete on plugin uninstall
- Replace old theme that understand old css (vcex_icon_box css_animation)
- Prevent WordPress from sending set-cookie http header
- Remove a div class with condition
- Hooking into the HTML header container
- How to get a post views count using ‘WordPress popular posts’ plugin
- Modifying server’s response to API endpoint
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- I want add repository theme folder
- Things that saved lose when logout
- Woocommerce: deleted single-product.php, everything still works. How is it possible?
- What is the process for reimplementing a back up WordPress?
- Template from scratch: Sidebars not showing widget
- Display static pages instead of category, in code
- wordpress illegal string offset ‘parameter’ error
- Two sites one PC
- Real estate schema markup not showing up on Rich Results test
- Preserve custom URL parameter on more pages
- if plugin is active? check if plugin is enabled or not?
- Change My Basket text in the header of WooCommerce Artificer theme
- shortcode doesn’t work
- dequeue not work
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- Translating plugin inside the theme [closed]
- Unable to install theme recommended plugins on Multisite
- More than one text-domain is being used because of the included templates for plugins
- Apple push notification doesn’t work
- Hooking in to replace the Sidebar/Widget areas
- Conditional attributes and logic per product category
- Using Wishlist Member and I need to access a user’s status
- PHP Error When a plugin is active
- Creating a CSV with PHP inside the plugin directory
- pagination on data fetched using SQL query
- Check if variable is set in filter
- Basic gallery plugin suggestion [closed]
- Access a particular field in an array
- How to write “alt” tag in image for wordpress code?
- JQuery prepend a function
- I am trying to make a field show and save from quickedit screen
- Send email with list of active plugins upon activation/deactivation
- Add the_post_thumbnail_url to a shortcode in function.php
- Adding a Tag Parameter / Filter to My Shortcode
- Modify pages widget and make a plugin?
- How do I fill the Home Description?
- Edit all $wp_scripts at once to $in_footer = false
- Ajax call not working in wordpress through a plugin
- How to add custom plugin data to the cart in woocommerce using custom button on product page?
- How to create admin setting for this small plugin
- Cookie value changes back to previous value after changing
- Allowed memory size of 134217728 … wp-includes/wp-db.php on line 1989
- Undefined offset: 0 in WordPress after latest version upgrade [closed]
- Hide Plugin Custom Post Type Menu Link
- Can you add a shortcode to a custom post type that gets the post_title, post_content, etc. and then passes that to a plugin function?
- How to create algorithm for ordering posts in WordPress?
- How to use WordPress header function and footer function and not load word press database
- wp-admin/admin-ajax.php 400 (Bad Request) plugin
- Set up new WordPress domain using unclear files
- Genesis Child Theme – Customize body
- Unable to activate themes on localhost
- Flexslider empty slide
- Conditional Fields depending on checkboxes
- Soflyy WP All Import Custom File Download Issue
- Update (a function) post’s featured image as soon as $image_url changes
- why my wordpress dont have toolbar like, plugin, themes and other?
- Using activated_plugin to run code
- How to order users alphabetically by name? in plugin UPME
- Media Playlist Plugin
- WordPress Background Audio – Continous AutoPlay
- How use Dynamic hyperlink on each wordpress post?
- Why do I get this “peer’s certificate issuer not recognised” error when trying to install a theme?
- How to execute init or woocommerce_init only for checkout page
- how to restore wordpress backup(.rar) manually?
- White Screen When Includding A Folder With PHP Files
- wordpress jquery is not defined because the head tag is empty
- Any plugin/theme available which suits my requirement? [closed]
- PHP if url extension action=discussion condition use [closed]
- Am having issues intergrating this api into my wordpress site, any help please?
- How to get URL param for pagination in shortcode?
- Is there any WordPress Plugin that provides video editing from front end side? [closed]