Jonathan Bossenger
Forum Replies Created
-
Forum: Localhost Installs
In reply to: PHP missing the MySQL extensionWould you be able to copy the full output of the phpinfo() file and share it with me with a Gist or some other file content sharing service?
Forum: Fixing WordPress
In reply to: How to unlock media pages (attachments)?@sdax I tested the code for the search on my local development environment before sharing it with you, it did work as expected. (See the screenshot of the two images in my media library in the search results https://tinyurl.com/22996kjp).
Can I check with you, how you have enabled the code in your site, and are you using the standard WordPress search function?
Forum: Developing with WordPress
In reply to: website healthBased on what you are telling me, I would say that this plugin you disabled might be the problem. I would suggest reaching out to the plugin developer to see if they can help.
Forum: Developing with WordPress
In reply to: To change “password protected page” textNo problem, there are multiple ways to achieve the same result, I’m glad you found something that works for you.
If your question has been answered, we would love if you would mark this topic as resolved in the sidebar. This helps our volunteers find the topics that still need attention and more people will get helped, possibly like you did.
Forum: Developing with WordPress
In reply to: connecting more variablesSo what you will need to do there is place the Euro symbol inside single quotation marks as well, to indicate it’s a string (text).
$pulizia_esc = '<div class="pulizia_esc">' . $pulizia_esc . '€' . '</div>';Anything with a $ in front of it in PHP is a variable, so you don’t need quotation marks, but any text strings need quotation marks.
Forum: Everything else WordPress
In reply to: Archive Title Change to BlogNo problem, glad I could help.
If your question has been answered, we would love if you would mark this topic as resolved in the sidebar. This helps our volunteers find the topics that still need attention and more people will get helped, possibly like you did.
Forum: Everything else WordPress
In reply to: Archive Title Change to BlogIndeed you could, as long as the theme will never be updated by the theme author, or it’s a custom theme you’ve built yourself. If there is a chance the theme might be updated at some point in the future, then there’s a chance you will loose any changes, which is why the child theme option is suggested. As I don’t know the status of your theme, I went with the safest option.
Forum: Everything else WordPress
In reply to: Archive Title Change to BlogHello @ptrulli
There are a coupe of ways you can achieve this, but the most straightforward would be to make a copy of this file in a child theme, and make the required changes there.
The process required is to create a child theme, and then make a copy of the
archive.phptemplate file, making sure to place it in the same location in the child theme as it exists in the parent theme. Then, in that copy of the template file, replace the following code:the_archive_title( '<h1 class="entry-title">', '</h1>' );With the something like this
echo '<h1 class="entry-title">' . 'Your Custom Title' . '</h1>';Replacing Your Custom Title with whatever you want.
Then enable the child theme.
This will hardcode the new title into the child theme’s
archive.phpand that title will be displayed on the archive page.The other way to do it is to use the get_the_archive_title filter in a custom plugin or themes functions.php, but for this use case, I’d recommend the child theme route.
Forum: Fixing WordPress
In reply to: One of my posts shows as mobile version on desktopAre you able to share the link to your site, as well as links to the posts in question?
Forum: WordPress Mobile App
In reply to: implement custom post typesHello @glamglowing16
I assume you are using the WordPress mobile app to manage a self-hosted WordPress site, and not one hosted on WordPress.com?
To implement custom post types on a self-hosted site, you either have to create them yourself using PHP and the register_post_type function, or there are plugins that you can install on your WordPress site, that will allow you to create custom post types.
You can find them by searching the plugin repository here for the keywords custom post types
Forum: Fixing WordPress
In reply to: Add Post (Add New) page not showingI just tested this out on my local WordPress install, and it works as expected. That -1 that you’re seeing on the screen indicates there might be a bug in your theme or one of your plugins.
Are you able to disable all plugins, switch to a default theme, and see if the problem persists?
Forum: Developing with WordPress
In reply to: To change “password protected page” textHello @rosco666
If you have a way to add some custom PHP code to the site (either a theme functions.php or a custom plugin) this can be achieved using the the_password_form filter hook.
add_filter( 'the_password_form', 'reitclubvonnordheim_custom_function_the_password_form' ); function reitclubvonnordheim_custom_function_the_password_form( $output ) { $output = str_replace( 'This content is password protected. To view it please enter your password below:', 'Dieser Inhalt ist passwortgeschützt. Um es anzuzeigen, geben Sie bitte unten Ihr Passwort ein:', $output ); return $output; }(Please excuse the German text if it is incorrect, I used Google Translate)
Forum: Networking WordPress
In reply to: Blog_id issues on Multisite NetworkThanks @hilgo
Have you tried doing a plugin and theme conflict check? So set up a copy of the site locally, disable all plugins and activate one of the default themes across all sites, and see if the problem persists?
Forum: Developing with WordPress
In reply to: connecting more variablesAh. In that case, you can concatenate a string of text with a number using
.$pulizia_esc = get_the_author_meta( 'pulizia_esc', $post->post_author ) . get_post_meta( $post->ID, "function_pulizia", true ) ;As PHP is generally expecting to output text to a browser, it will juggle the type of the number to a string when concatenating it to another string.
If you want to make sure the int is a string, you can use strval or string casting.
It’s worth noting that the meta data value in the database is possibly stored as a string anyway, even if you’ve set it as a number, as the data type for that field is
longtext.With regards to using
empty, there are some arguments to be made that one should not use it, and rather use something else more specific, but that’s up to each developer to decide.I hope this is all helpful.
Forum: Developing with WordPress
In reply to: Second query loop on Front PageHi @bixfrankonis.
where the most I can get to display seems to be the post title and the post date.
I want to make sure I’m understanding your question, so both query loops work, but in the first query loop, where you want to show the content for the most recent post, only the post title and post date are showing.
Are you editing the page via the Site Editor, or via the Page Editor?
Then, if you click on the List View (or Document Overview) button (they’re called different things in either editor) can you tell me what blocks make up the Post Template for the first Query Loop?