Forum Replies Created

Viewing 15 replies - 76 through 90 (of 103 total)
  • Forum: Fixing WordPress
    In reply to: Lost My Website

    If this occurred by activating plugins it looks there there is either an error in the plugin or a conflict.

    Your best bet of resolving this would be to contact your hosting provider to see if there is a method of restoring a backup from before you made edits. It is possible to deactivate plugins through WP CLI, so if it is available your host may be able to support that way to deactivate the plugin causing the issue.

    This error should be logged, if logging is enabled. That should give you a clue as to the plugin that caused it which you should avoid or raise with the plugin developer

    Hi there,

    This is actually a case of applying the wrong fonts.

    Some elements are getting a bold style to them, but it looks like that is correct. However you also have a medium weight font applied with an !important rule on it across the site.

    Doing this means you’re not letting the proper fonts and weights render based on the font-weight styles, but just putting medium (font-weight 600) on everything. You’ll need to remove that line of css and use proper weights, or switch it to a variable font so the rules actually apply

    • This reply was modified 1 year, 1 month ago by bvbaked.

    Can you elaborate on what you mean by it doesn’t work? I copied that style and saw the padding added on screens below 769px in width, so it seems to be working for me.

    I’m just adding this in browser, so my guess is if you aren’t seeing it your styles are getting added before the theme/plugin that is setting them therefore it is overwriting. A few options to fix this could be:

    • Increase your specificity to have them apply
    • Use !important in your style (I tend to stay away from this, but it is an option)
    • Change the ordering. Doing this would depend on how the styles get added. If it uses the wp_enqueue_style() function, you can add a dependency to ensure it loads after another stylesheet or change the priority of the action to make it run later

    This sounds like something very outside the scope of this forum, but I would suggest you look at plugins first as that would be your easiest method of implementing something like this

    Sounds like you just need a spam filter for your site. I’d look into a recaptcha option for your theme or form plugin to get some extra protection on the form submissions.

    My guess is that none of these submissions are actual people going to your site to fill out the form, so likely to be coming from bots and that would hopefully get rid of most of them

    Hi @hebhansen

    There is no reset button. Every time you navigate to the Permalinks page in the Settings menu (/wp-admin/options-permalink.php), your htaccess file is written with the correct structure, even if you just visit the page and do nothing else.

    In the screenshot of the original post, the permalinks are being set. However, in order to actual take effect WordPress needs to add a set of rules to properly manage the redirection based on the settings you choose.

    This needs to be done every time they change or when new ones are added, otherwise the new rules will show as a 404 since it is still expecting a different format

    Hope that clears it up

    Since the links looks like they are generating correctly, it is worth trying to reset permalinks by visiting the Permalinks page in the Settings menu.

    If permalinks are ever added or modified, the rewrite rules also need to be updated. Visiting that page will do so – no save or other interaction required.

    You should start by checking your wp-config.php file to ensure the constant ABSPATH is not being defined twice.

    /** Absolute path to the WordPress directory. */
    if ( ! defined( 'ABSPATH' ) ) {
    define( 'ABSPATH', __DIR__ . '/' );
    }

    /** Sets up WordPress vars and included files. */
    require_once ABSPATH . 'wp-settings.php';

    This is what I have at the end of mine. Based on the error message, there may be a second line defining this constant and the conditional check may be missing here, so it gets defined twice. The other errors my be caused by this, so start with this and see if it fixes anything

    Just doing some in-browser testing, the padding-top is the culprit here. That forces all of the content down since you added the spacing at the top. Changing it to padding-bottom gives you the same effect, but the content is at the top instead.

    However, with the images you are using they stack as the image of the script is very wide forcing it across three lines (logo/script/nav)

    I think this is a reasonable approach to the problem, and a workable solution as without adjusting the actual block functionality for styles/variations there aren’t specific breakpoint options available for blocks

    Heya,

    You’re very close with everything, just there is one margin that is still causing problems

    .site-branding,
    .site-search,
    .site-header-cart,
    .site-logo-anchor,
    .site-logo-link,
    .custom-logo-link {
    margin-bottom:1.41575em;
    }

    This is where it is coming from in your styles.css file, specifically the .site-branding selector here. That adds extra spacing under your site site, making it a little larger than it should be so the vertical align is off

    I don’t know what the others effect, but would be worth testing out if removing the first selector works to fix your issue while keeping everything else as you want

    1. They are important if you plan on making any edits. If you’re using a theme as-is though, no they are not important
    2. You do not need them for any site, regardless of size, unless you intend on making an edit to the theme

    The benefit that a child theme provides is that you can extend or customize an existing theme while still keeping all of the other functionality of it. If these edits were to be made in the parent theme, then you update it, they would be lost. By using a child theme, you can update the parent and get all the updates, along with keeping your edits to it intact.

    If you’re looking at themes that haven’t been updated in a long time, there is a chance they may not be getting one and there is no active maintenance on it. I would recommend staying away from themes like that since there could be vulnerabilities introduced at some point that never get fixed.

    As you mentioned, there is a possibility that an update to the parent theme causes a problem with the additions you make in a child theme. The likeliness of that depends on the extent of the changes – adding a CSS file should be fairly unlikely to cause any major problems, but if a class gets changed you may need to rework it slightly to have it apply. If you were to try and write a bunch of custom templates or change existing ones though, you could run into a lot of problems after an update… it all depends

    If your additions of the CSS file are not working, I suspect there may just be a problem with how it was done and not because it is added through a child theme.

    This is all done in the Full Site Editor under the Appearance > Editor menu item.

    There you can create templates which consist of template parts like the header and footer that frame your content. Patterns can be a part of this – they are other reusable pieces of content that you can create to include in templates or just on other pages.

    When creating a template, you’ll see the ‘Content Block’ which represents the dynamic bits of your post. This is what will change, and the only part of your template you’ll see when editing a post.

    You’ll see the template that is being used in the sidebar in the post information tab

    To get information from a user, there are two possible methods. The first would be to use the WordPress get_user_meta() function since the ACF fields get written into the usermeta table. This is fine for simple meta fields like a text field or select. If it is something more involved, you may want to use the ACF specific functions instead as they offer an extra layer of formatting. In this case you would want to prefix the user id with ‘user_’ which then targets usermeta.

    $text = get_user_meta( 1, 'text', true );
    $text = get_field( 'text', 'user_1' );

    Those would be an example of the two methods for getting the value of a field called ‘text’ from the user with the ID = 1

    Sounds like you’d be getting a post ID (or IDs) of a company post type, which you can then modify your query to get the assigned companies only. As @bcworkz mentioned prior, this would need to be added to a pre_get_posts hook on that specific query. You can find/edit the queryId by viewing the code editor view of your page. The block will start something like

    <!-- wp:query {"queryId":18, "query": {...} -->

    Hope this helps some

    The code you are seeing are shortcodes – they are used in the Classic Editor to enable various bits of PHP code to be run and added to a page. If they aren’t properly handled though, they just get output as text

    In Gutenberg there is a specific shortcode block that handles this as adding them into a paragraph block would treat them as if they are just text. While I’m not overly familiar with WP Bakery, since it is a page builder I assume you are running into a similar problem. If they have a shortcode option, you may need to move all those little code pieces into a one of those instead so they get treated as shortcodes instead of text.

    The WP Bakery support may also be able to help with this

    Sure, there are a couple of different ways to make them the same.

    You could make the videos wider to match the images by removing these lines (that should result in them having width: 100%;)

    .port-image > iframe {
    width: auto;
    }
    body .post_content .port-image > iframe,{
    width: auto;
    }

    The other option would be to make the images smaller to match the videos by adding the following lines

    .port-image {
    height: 150px;
    aspect-ratio: 2 / 1;
    margin-inline: auto;
    }
Viewing 15 replies - 76 through 90 (of 103 total)