bvbaked
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Featured Image not working.port-image > iframe {
width: auto;
}
.port-image > iframe,
.port-image {
height: auto;
}
body .post_content .port-image > iframe,{
width: auto;
}
body .post_content .port-image > iframe,
body .post_content .port-image {
height: auto;
}I’m seeing this little snip of CSS added via an inline style that is causing your problem. The images are served via a CSS Background, therefore have no intrinsic height – setting that to auto means it collapses.
I’m guessing it was added because the iframes for the videos look a little odd at that height?
.port-image {
height: 150px;
}
.port-image > iframe {
width: auto;
}
.port-image > iframe {
height: auto;
}
body .post_content .port-image > iframe,{
width: auto;
}
body .post_content .port-image > iframe {
height: auto;
}If you change it to that, you’ll see your images showing again, but you may need to finesse the styles a little more.
Forum: Fixing WordPress
In reply to: How to Embed Form fields directly within HTML contentIf you’re asking about using the HTML content field and entering it that way, I don’t believe it works. The reasoning behind that is each form field gets processed by the plugin for inclusion in submission, adding to notifications, writing to the database, validation, etc…. Since you created a custom form input inside this section it missing all that processing
In theory, any input inside a form should get passed through during the submission process so you should be able to get at it somewhere. I don’t know which hook you’d use though but one of the submission one I expect are what you’re after. Once you find it though, it is mostly on you to write some code in order to handle this input and have it treated like the other fields
Sounds like you may have removed the hover state then?
What threadi suggested would only need to be applied to the first bit of your CSS
.menu-incident a:hover {
background-color: #ff8a42;
color: white;
}This can remain unchanged since it seems like that is working expected.
Your first selector was getting overwritten due to specificity though, so you needed to add a selector for the default state
I just tested this again, in case I was wrong. But I can confirm that function.php is not automatically added and included in a theme. functions.php however, is.
If you’re accurate with the naming, and your file is function.php – without the “s” – it isn’t working because your code is never being run. If you want to keep it in that file, you’ll need to have it included via an include or require statement from another PHP… it is easier just to name it properly though if this is the issue.
As a note, again I am not seeing either of those stylesheets included on the page so none of the enqueue calls you included in the code snip are working and none of them are getting added to the site
Forum: Localhost Installs
In reply to: Why so many media files?Does having a media library of that size, when we’re only using maybe a hundred or so of the images on the site, have any cost (e.g, slowing things down)?
As you are now aware, when you want to move the media library around it does.
For the front-end experience though, it should make things faster or have little effect. As mentioned previously, they are created in order to serve a proper image size for the space it is presented in. So if it is done correctly the images displayed will be the of the optimal size and should result in smaller files getting servedOf course, it might not be done correctly and you still just serve the full image. Having the files and not using them wouldn’t slow the site down though, it’s just a lot of extra files
Just to test, I confirmed that your script is in the place you’re likely expecting it to be and the contents are what you also posted above, so it looks to be the correct file.
The thing is though, I don’t even see the ‘parent-style’ CSS handle. It is enqueuing ‘webdesign-style’ which may be coming from the parent theme?
Just a shot in the dark, but you say it is in function.php – if that is the correct filename, it should actually be functions.php (with an ‘s’) so is it that your functions are not even running because of the filename?
Forum: Fixing WordPress
In reply to: composer 8 errorBased on the context, it sounds as if you are updating a plugin and the environment is just not supporting it. If plugins are managed via composer, and you are getting this error, they may be missing due to an incomplete run of your composer install.
You should really check and update your PHP version though if this is failing. even PHP 8.0 is end of life and 8.1/8.2 are on their way out. I’d recommend getting it up to PHP 8.3 so you actually are running a supported version which should also in turn fix his error and get your plugin installed
Forum: Fixing WordPress
In reply to: I don’t understand: “this response is not a valid json response”Is this happening on all pages or only one?
While “this response is not a valid json response” is vague as to what the error is, the cause is just as it says – you’re getting an improperly formatted response. JSON does need very particular formatting, and I’ve often seen this when there is a WordPress error reporting in a process that returns a JSON response. There is an error message in the return and a ” cuts off the object getting returned which ruins the formatting
If you’re comfortable with the console and network tab in your browser, you might get a bit of insight. That may give you a peek into the response that is causing the error, and if you can view it on a staging site and turn on WP_DEBUG it may even give you the error message, if one is being thrown, by looking into the network response
Forum: Fixing WordPress
In reply to: Adding a paid-post optionThe first thing that jumps to mind would be to make the post private or password protected. Both options would prevent the general public from viewing the content but give a slightly different experience.
With a private post, you’d require a login to view and therefore you can control member accounts via a paid option. Pros: You’d have control over who can see these pages over time, like a subscription service, where users can come and go. Cons: You’s need to have additional member accounts created and the page would just 404 instead of alerting that it is paid content for non-members
For a password protected page you don’t necessarily need member accounts but this would involve some other method of receiving payment and distributing a password. Pros: The public could still see there is a page at any of these links, but they need to pay to view it. Cons: You’d need to distribute passwords and they’d likely all have to be the same. This could lead to errors by making a typo and restricting access when it should be granted. This also means you wouldn’t be able to turn off access in the future to specific users
I’m sure there are other ways, but these would be a couple of options to consider
Forum: Fixing WordPress
In reply to: Missing page redirects to my blogI’m guessing it is not a redirect problem, but rather a lack of a 404 template
https://www.relaxingmassagetherapy.co.uk/aafd
I’m going out on a strong limb to say you don’t have a page title aafd, and that displays your hompage – this is just following the WordPress template hierarchy and since there is no 404.php file, it falls back to use index.php (which I’m guessing is likely also what your homepage uses).
I’d recommend a 404.php template for displaying a not found error in this case.
As for the page, I can’t offer help as to where it went but possibly it is drafted, marked private, or in the trash. There is also the possibility or a spelling error, as I’ve sadly made that mistake plenty of times
Forum: Fixing WordPress
In reply to: Adding a DIV only in the mobile versionThat page in particular should be using archive.php, but it is likely not where you’d want to add that div.
You should have a header.php file instead where the actual header gets added – that way you would have this div on every page and not just your archives. You would then hide the div with css, using a media query, on screensizes you don’t want it to display
.your-div {
@media ('min-width: 768px') { display: none; }
}That should suffice to keep it off anything larger than a tablet, but you can decide what size you’d like.
If you’re in doubt of where to look, see if you can search for where the masthead or site-branding elements are added since those are in your header element and about where you’d want to place this div
Forum: Developing with WordPress
In reply to: Query recent postsA couple of things to note here:
$allcats = get_categories('child_of='.get_query_var('cat'));This is expecting a query parameter to narrow down your categories by a parent, which I’m not quite sure you’re looking to do. The url in this case would look like http://www.grandmashousediy.com/?cat=5 that actually pushes you to the category page, so you may want to just remove the string inside as it is functioning as you expect already – it gets all categories, then loops through each to get the 10 most recent to display
For the next ask of displaying the most recent only from specific categories:
That depends on how you’d like to select them. If you have the categories in mind and that won’t change, you can write another query similar to what you have already but only choosing certain ids.Something like
$args = [ 'taxonomy' => 'category', 'include' => [ 3, 4, 5 ] ];
$categories_to_show = get_terms( $args );Repeat the loop on your $customInCatQuery loop replacing it with the result here and posts_per_page with 1 instead of 10 – this would then be giving you the first in each of those categories.
Place that where you’d want the output, and I think you’re good.
Let me know if I misunderstood though 🙂
Forum: Developing with WordPress
In reply to: Modern Block Themes — Attributes not saving:shrug:
Maybe you fixed it already, but it seemed to work when I tested it