cleancoded
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How do I get State and City menu category in PostCity and state are not native functionality for WordPress posts, how are you adding them? It looks like you’re probably using a plugin to add custom post categories, but it’s not clear which one.
Forum: Fixing WordPress
In reply to: Combine 2 Search forms.Add this snippet in functions.php file and change the database query according to your requirements.
Note: Please take functions.php backup before working on it because a simple mistake can affect the whole site.
Forum: Fixing WordPress
In reply to: Can i add wordpress blog in google webmaster ?In general, adding a WordPress website to Google Search Console is the same process as adding any other website. You need to add the site to your account, verify ownership, and then you can optionally submit a sitemap and update site-specific settings.
Here’s a great tutorial for adding your WordPress site to Google Search Console using the Yoast SEO plugin:
https://kb.yoast.com/kb/how-to-connect-your-website-to-google-webmaster-tools/
Forum: Fixing WordPress
In reply to: Change Font and Font SizeThis is probably doable, but without an example site, it’s hard to provide specific CSS that will make the updates you want.
Generally, my approach to this issue would be to review the sites to see if there are common elements or classes being used that you can override with global CSS.
To review this, in Google Chrome, open the page with the text you want, right click on the text that you want to update, and click “Inspect.” Take a look at the code around the text to see if the text elements are using the same elements or classes, then create some custom CSS utilizing the fonts and sizes you want.
Forum: Networking WordPress
In reply to: Multisite, disabling plugin for certain sitesPlugins do not need to be “network enabled” for all sites in WordPress multisite.
While logged in as a super admin user, add the Divi builder plugin at My Sites » Network Admin » Plugins.
Then go to the site dashboard that you want to use Divi, and enable it there, only on that site.
If WPBakery is network enabled, deactivate at the network level and activate only on the sites that require it.
Forum: Fixing WordPress
In reply to: Combine 2 Search forms.You can modify the search query at searching time. Please try with this hook function and query :
add_action('pre_get_posts', 'modified_search'); function modified_search($query){ global $wp_query; if($query->is_search){ global $wpdb; $original_query = get_search_query(); $modified_query = preg_replace("/(s|S)/", "$", $original_query); $new_query = " SELECT $wpdb->posts.ID FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND (($wpdb->posts.post_title LIKE '%$original_query%') OR ($wpdb->posts.post_content LIKE '%$original_query%') OR ($wpdb->posts.post_title LIKE '%$modified_query%') OR ($wpdb->posts.post_content LIKE '%$modified_query%')) ORDER BY $wpdb->posts.post_date DESC LIMIT 0, 10 "; $results = $wpdb->get_results($new_query); $post_ids = array(); foreach ($results as $post_id){ $post_ids[] = $post_id->ID; } $query->set('post__in', $post_ids); } }- This reply was modified 7 years, 7 months ago by Steven Stern (sterndata).
Forum: Fixing WordPress
In reply to: Yoast troubleThere are a few ways to redirect pages from http to https — at the server level, with a plugin, or my favorite — with page rules, like with Cloudflare-hosted DNS.
Here are some of the most common ways to redirect pages from http to https:
Forum: Fixing WordPress
In reply to: Yoast troubleAnd your site URL is set to a https version of your domain?
If yes, can you try disabling and reenabling XML Sitemap? From WordPress backend, go to SEO > Sitemap XML and disable, save, then reenable and save.
Forum: Fixing WordPress
In reply to: Yoast troubleYoast creates the XML sitemaps dynamically. As long as your site URL is using https, the links in your sitemap_index.xml from Yoast should reflect this. You can always try saving permalinks, even if you make no changes, and then try refreshing your sitemap.
Forum: Fixing WordPress
In reply to: video is section showing weird ‘carousel’ under vid.I have found the carousel, it’s from YouTube.
Your homepage is embedding an iframe code from YouTube:
<iframe id="mbYTP_onetone-youtube-video" class="playerBox" style="position: absolute; z-index: 0; width: 1587px; height: 893px; top: 0px; left: 0px; overflow: hidden; opacity: 1; user-select: none; margin-top: 0px; margin-left: -50.5px; transition-property: opacity; transition-duration: 1000ms;" frameborder="0" allowfullscreen="1" allow="autoplay; encrypted-media" title="YouTube video player" width="640" height="360" src="https://www.youtube.com/embed/U-eevbYmugc?modestbranding=1&autoplay=0&controls=0&showinfo=0&rel=0&enablejsapi=1&version=3&playerapiid=mbYTP_onetone-youtube-video&origin=https%3A%2F%2Fwww.sea-trek.com&allowfullscreen=true&wmode=transparent&iv_load_policy=3&html5=1&widgetid=1" unselectable="on"></iframe>The YouTube URL is adding a div when the video pauses, which can happen for a variety of reasons. I found it’s easiest to recreate this issue when right clicking and clicking “Inspect” in Chrome, the video pauses, and you can consistently see the carousel.
The div looks starts like this:
<div class="ytp-pause-overlay ytp-scroll-min ytp-scroll-max" data-layer="4" style="">So, theoretically, you just need to display: none; that div, but it’s in your iframe. And not the same domain, so that will be challenging.
Perhaps there is a setting from YouTube that you can disable the “more videos” pause overlay?
Otherwise, this appears to be the right path for resolving this issue — I tried a variety of suggestions I found here, and they didn’t work by forcing styles into Chrome’s inspect tool, but you likely have more control at the page level than I do on the front end:
Forum: Fixing WordPress
In reply to: problems with site after httpsWhen you updated the URL, you did it from the WordPress backend, from Settings > General (/wp-admin/options-general.php) right? This just updates two tables in your database, if you can access your database (usually via your host), you can easily update your URL back to the http version. From your host, you’re looking for something like phpmyadmin.
Forum: Fixing WordPress
In reply to: WordPress is hanging and Editor is being cut offLoading fine here — tried loading your site in Safari, Chrome, Firefox and Opera on a Mac, and Chrome, Firefox and IE on a PC.
If you deactivate any of the new plugins you installed, do the images revert to their normal, intended sizes? If you are noticing this issue right after installing plugins, it’s almost certainly related to that. Try deactivating plugins one by one, and load the homepage in an incognito window and refresh to see if the images display as intended.
Forum: Fixing WordPress
In reply to: Logo mobile problemTo hide your logo image on screen sizes 600px wide and smaller, add this custom CSS (Appearance > Customize):
@media only screen and (max-width: 600px) { img.custom-logo {display: none;} }To change the toggle navbar color, add this custom CSS:
.navbar .navbar-toggle {background-color: red;}Updated display should look like this:
Forum: Fixing WordPress
In reply to: header.php malicious codeYour link above doesn’t seem to work. If you can access the header.php file from the theme editor (from the WordPress backend, go to Appearance > Editor), you can scroll down to see the code you need removed, remove it, and save changes. If you do not have access to the File Editor, you may need to access your theme files via FTP (root > wp-content > theme folder > header.php) and remove the code, upload the updated version to replace the current version.
You can also do a bit of scanning and review of any malicious code in your theme files with the Wordfence plugin, have a look at https://ww.wp.xz.cn/plugins/wordfence/