/r/Wordpress

Photograph via snooOG

The place for news, articles and discussion regarding WordPress.

Welcome to r/WordPress

The place for news, articles and discussion regarding WordPress.

Please don't post:

hover for details

Theme/Plugin/Services advertising This includes "how to" posts that recommend themes, plugins or services to do things. Consider reddit advertising instead.
Promotions Consider reddit advertising instead. This also includes trying to "sell" us WordPress. We're already using it so there's no point.
Hosting Discussion try /r/webhosting instead.
List posts: eg. Top 10 Plugins, Top 10 Themes try /r/WordpressPlugins and /r/WordPressthemes instead.
Url Shortening services Don't use bitly or similar when posting links or links within comments.
Affiliate links Yeah, don't do that.
Find my theme for me questions see the Theming WordPress section of the wiki.
I have been hacked. Read the Been hacked? Don't Panic! section of the wiki.
Generic CSS/HTML questions try /r/CSS or /r/web_design instead.
Site critiques /r/WordPress is for WordPress discussion not design
Code snippets that are lame a good example would be deprecated code.
Posts that are not specific to WordPress This is not the place to share your blog or talk about blogging in general. Try /r/blogging or /r/BlogExchange instead. Having a blog with WordPress.com in the url does not mean it is WordPress related. Content must be specific to WordPress.

» How to get help

» Important links

» Been hacked?

Please review the above links if you need help securing WordPress or cleaning malware.

» Our subreddit friends:

Notes

If you think your post got caught in the spam filter. Click here!

Distributing copyright material is against our community policy. Unless it is yours or you have the license stating that redistributing is allowed.

If you or your company has an interest in promoting a product or service please message the mods beforehand to clear it with us.

Your reddit account must be older than 1 month to submit LINK posts. Text posts are fine. This is because the majority of spam posts are coming from brand new users who have not read the posting rules listed above.

Message the moderators

/r/Wordpress

214,471 Subscribers

1

Admin Notices

https://preview.redd.it/2fcxd5r7r61d1.png?width=324&format=png&auto=webp&s=6e0a2bc3386ee3baa78bebf0f7ba7f41e2446b23

Hello!

Is there a way to edit the content of this message?

The message is shown when I update a cpt. Basically I would need to remove the link.

Thank you!!

2 Comments
2024/05/18
13:40 UTC

0

Image compression in theme

Hi, since some years I use tinyPNG for compressing my images (JPG, PNG, WebP) on upload to my Wordpress image library.

From begin I wonder that is no function in Wordpress. Now I made a small snippet for my theme. Did you think it is good enough?

function optimize_generated_image_sizes($metadata, $attachment_id) { $upload_dir = wp_get_upload_dir()['basedir']; // Basisverzeichnis des Uploads

foreach ($metadata['sizes'] as $size => $size_info) {
    $file_path = $upload_dir . '/' . $size_info['file'];
    $safe_file_path = escapeshellarg($file_path); // Sicheres Escaping des Pfads

    // JPEG-Optimierung
    if ($size_info['mime-type'] === 'image/jpeg') {
        $jpeg_command = "jpegoptim --strip-all --all-progressive --max=85 $safe_file_path";
        run_secure_command($jpeg_command);
    }

    // WebP-Konvertierung für JPEG und PNG
    if ($size_info['mime-type'] === 'image/jpeg' || $size_info['mime-type'] === 'image/png') {
        $webp_path = escapeshellarg($file_path . '.webp');
        $webp_command = "cwebp -q 80 $safe_file_path -o $webp_path";
        run_secure_command($webp_command);
    }
}

return $metadata;

} add_filter('wp_generate_attachment_metadata', 'optimize_generated_image_sizes', 10, 2);

function run_secure_command($command) { $descriptorspec = array( 0 => array("pipe", "r"), // stdin 1 => array("pipe", "w"), // stdout 2 => array("pipe", "w") // stderr );

$process = proc_open($command, $descriptorspec, $pipes);

if (is_resource($process)) {
    fclose($pipes[0]); // Schließen der stdin
    $stdout = stream_get_contents($pipes[1]);
    $stderr = stream_get_contents($pipes[2]);
    fclose($pipes[1]);
    fclose($pipes[2]);
    
    $return_value = proc_close($process);
    
    if ($return_value != 0) {
        // Fehlerbehandlung, z. B. Loggen der Fehler oder Benachrichtigung des Administrators
        error_log("Fehler bei der Bildoptimierung: $stderr");
    }
}

}

0 Comments
2024/05/18
13:01 UTC

1

Skilled WordPress Dev & Digital Marketer | Looking for Advice/Opportunity

I'm a passionate WordPress developer and digital marketing strategist with 10 years of experience crafting successful online experiences.

I have worked with domestic and international clients and have delivered 400+ websites, catering to diverse client needs.

Professionally I'm stuck in a loop of creating low value, shitty design websites and I really aspire to create something breathtaking, which I know I can, but don't have the opportunity!

I have to take on low value projects to maintain a lifestyle and am really struggling to find challenging projects or high ticket clients!

I've attached some work samples for your review:

Ongoing Projects: https://test.elebuilds.com/home/ https://smartmeble.com/ https://ciao-luna.com/ (Password:geeski)

Recent Websites: Podcast Website - https://multiplai.ai/ Digital Agency - https://gelocubed.com
IT Business - https://nandiniinfosys.com/ Consultancy Website - https://consultantforgem.in/
Pharmaceutical Manufacturer - https://lucentbiotech.com/ Recruitment Agency - https://alminternational.in/ Internet Business - https://tachyonbroadband.com/ Divorce Service - https://divorcenz.com/, https://audivorce.com.au/
Pizza Place - https://www.jzspizza.com Basketball Academy - https://ballerzunitedacademy.com/ Pilots Academy - https://pilotsacademy.co.in/
Dental & Eye Care Centre - https://sightandsmile.com/ Motor Oil Business - http://daljitgrp.com/
Import-Export Business - https://kenabraz.com/
Blogs - https://bbamantra.com/, https://elebuilds.com

Recent E-commerce Websites: Packaging Store - https://pacfo.flywheelsites.com/ E-commerce Store - https://www.kanzandmuhul.com/
Skincare Products - https://www.rejuuv.com/ Confectionary Store - https://snackstar.in/
Smoking Products - https://houseofvape.in/

Need help to either land a high paying job or some good projects!

My aim is to make $3k-$5k a month.

6 Comments
2024/05/18
12:57 UTC

1

issue with schema pro

hello there

i applied schema product by schema pro plugin

google shows me this error

Either 'offers', 'review' or 'aggregateRating' should be specified

i tried to apply custom schema text but not works

can anyone help me fixing that issue

0 Comments
2024/05/18
12:28 UTC

1

Getting the Dashboard Menu right for new Custom Posts

Good day good people.

I am working on my first WP personal plugin project and having a lot of fun. Very much learning as I go. Progress is slow but always moving forward.

Right now I have 5 custom post types and there will likely be 3-5 more.

Right now they each appear in their menu in the Dashboard - eg something like
[] Locations (All Locations, Add New)
[] Groups (All Groups, Add New)
[] People (All People, Add New)

Id like to organise them more like this:
[] Campaign Manager
--- All Locations
--- Add New Location
--- All Groups
--- Add New Group
--- All People
--- Add New People
etc

Edit: I probably dont really need the Add New everythings in there...

If its relevant the current register_post_type looks like this:

function create_locations_post_type() {

$labels = array(

'name' => _x( 'Locations', 'Post Type General Name', 'text_domain' ),

'singular_name' => _x( 'Location', 'Post Type Singular Name', 'text_domain' ),

'menu_name' => __( 'Locations', 'text_domain' ),

'name_admin_bar' => __( 'Location', 'text_domain' ),

'archives' => __( 'Location Archives', 'text_domain' ),

'attributes' => __( 'Location Attributes', 'text_domain' ),

'parent_item_colon' => __( 'Parent Location:', 'text_domain' ),

'all_items' => __( 'All Locations', 'text_domain' ),

'add_new_item' => __( 'Add New Location', 'text_domain' ),

'add_new' => __( 'Add New Location', 'text_domain' ),

'new_item' => __( 'New Location', 'text_domain' ),

'edit_item' => __( 'Edit Location', 'text_domain' ),

'update_item' => __( 'Update Location', 'text_domain' ),

'view_item' => __( 'View Location', 'text_domain' ),

'view_items' => __( 'View Locations', 'text_domain' ),

'search_items' => __( 'Search Location', 'text_domain' ),

'not_found' => __( 'Not found', 'text_domain' ),

'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),

'featured_image' => __( 'Featured Image', 'text_domain' ),

'set_featured_image' => __( 'Set featured image', 'text_domain' ),

'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),

'use_featured_image' => __( 'Use as featured image', 'text_domain' ),

'insert_into_item' => __( 'Insert into Location', 'text_domain' ),

'uploaded_to_this_item' => __( 'Uploaded to this Location', 'text_domain' ),

'items_list' => __( 'Locations list', 'text_domain' ),

'items_list_navigation' => __( 'Locations list navigation', 'text_domain' ),

'filter_items_list' => __( 'Filter Locations list', 'text_domain' ),

);

$args = array(

'label' => __( 'Location', 'text_domain' ),

'description' => __( 'Post Type Description', 'text_domain' ),

'labels' => $labels,

'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'categories' ),

'hierarchical' => false,

'public' => true,

'show_ui' => true,

'show_in_menu' => true,

'menu_position' => 11,

'menu_icon' => 'dashicons-star-empty',

'show_in_admin_bar' => true,

'show_in_nav_menus' => true,

'can_export' => true,

'has_archive' => true,

'exclude_from_search' => false,

'publicly_queryable' => true,

'capability_type' => 'post',

'show_in_rest' => true,

'taxonomies' => array('shared'),

);

register_post_type( 'locations', $args );

}

0 Comments
2024/05/18
12:18 UTC

0

What roadmap will you tell to a complete beginner to wordpress?

I need a solid advice/structure on learning wordpress on 2024 as fast and efficient as possible until I get a minimum knowledge acquired to get hired on internship/agency and build my experience from there. And a roadmap again for advanced wordpress devs

2 Comments
2024/05/18
12:07 UTC

1

How can I use the block editor inside a custom field?

Hi everyone, first post here!

Working for a client on a wordpress site, I have a custom post type with various custom fields, one of these fields needs to have some collapsible elements (think of an accordion) that my client will be able to add/edit on its own.

The content needs to be properly formatted and edited by someone who knows no markup or styling so I was thinking of adding the block editor inside a custom field and let the end user create accordion blocks in wordpress on its own.

How would I go about this? Is this even a good idea? Accepting suggestions as I'm at a loss of what to do.

3 Comments
2024/05/18
12:03 UTC

1

WordPress plugin for affiliate links management

Hello,

I'm looking for a simple WordPress plugin for affiliate links management, and I can't believe I still haven't found one with my simple requirements after months of looking :-(

Any suggestion?

Requirements:

  • Manage a list of affiliate links (redirects) with title, description, featured image, URL, slug
  • Possibility to use ACF to add: featured image if not natively in the plugin, a textarea "private notes", and a URL field "Affiliate program URL"
  • A Gutenberg/WP block to display the link as a product card, title+desc+image+button ("Product display")
  • Some monthly stats for the clicks on the link, nothing fancy
  • 0 to 60$/year
  • That's it

Link example:

  • Title: WordPress.com
  • Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ullamcorper mi eget varius fringilla.
  • URL: https://www.wordpres.com/aff=123
  • slug: wpcom (result: mysite.com/go/wpcom)
  • Private notes: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ullamcorper mi eget varius fringilla.
  • Affiliate program URL: https://www.wordpress.com/affiliate-program/

Worst case scenario, I can create the "Product display" block myself if it's missing (but I won't custom code the stats feature)

Not needed: automatically add affiliate links to the content, Amazon API or any API

I tried dozens of plugins, this is the result of my research:

Pretty Links
https://prettylinks.com
Nice, but the Product Displays feature is only available in the 500$/year offer

I use around 20 plugins in this project, and this link management is the smallest feature of the project, 500$/year for a simple block is a no-go

ThirstyAffiliates
https://thirstyaffiliates.com
Nice, but the Product Display feature is only available in the 500$/year offer

Lasso
https://getlasso.co/
Free version old UI: perfect, can add custom fields with ACF, but no stats, and no product display block
New UI: cannot add custom fields
Pro version: pricing 290-750$/year

AzonPress
https://azonpress.com
Great pricing 3$/month, but only for Amazon/eBay/Etsy, no custom links management

AnyTrack Affiliate Link Manager
https://wordpress.org/plugins/anytrack-affiliate-link-manager/
This has no features at all?

Dr Affiliate
https://wordpress.org/plugins/dr-affiliate/
10 installs, updated 10 months ago

URL Shortify
https://wordpress.org/plugins/url-shortify/
69$/year
No post type to add custom fields

Shopper – Affiliate Link Management
https://www.shopper.com/wordpress-pricing
99$/year
Link management on their own website, cannot do anything (like adding custom fields)

Click Whale
https://clickwhale.pro/
Updated 1 week ago, 100% positive reviews, looks perfect ...
But ClickWhale does not have a custom post type to use ACF

RankMath redirections
https://rankmath.com/kb/manage-affiliate-links/
Could do the trick, but only basic redirections of RankMath, no stats

Slim SEO Link Manager
https://wpslimseo.com/products/slim-seo-link-manager/
It seems it does not manage affiliate links, only internal links

Affiliate Links
https://wordpress.org/plugins/affiliate-links/
https://codecanyon.net/item/affiliate-links-wordpress-plugin-for-link-shortening-and-masking/16917669
Last Update 22 March 2021 on CodeCanyon, 5 months ago for the free one
Seems abandoned

Content Egg Pro
https://wordpress.org/plugins/content-egg/
Many bad reviews, last update 9 months ago, no answer to support for 5 months

Tasty Links
https://www.wptasty.com/tasty-links
No stats :-(

Auto Affiliate Links
https://wordpress.org/plugins/wp-auto-affiliate-links/
Specifically made to automatically add affiliate links everywhere - not what's needed here

Better Links
https://wordpress.org/plugins/betterlinks/
https://betterlinks.io/
No product display, not compatible with ACF (nice dev but slow to implement new features)

Easy Affiliate Links
https://wordpress.org/plugins/easy-affiliate-links/
Looks perfect, but no post type in ACF

Affiliate Butler
https://wpruby.com/plugin/affiliate-butler-pro/
Obsolete, Latest Release 09.12.2022
Links don't work, automatic insertion of links ... not what I'm looking for

AffiliateWP, Indeed Ultimate Affiliate Pro
To manage my own affiliation program, not what's needed here

Shorty
https://www.shortywp.com
No update on their website since 2020

LinkClicky
https://linkclicky.com
Finally a plugin with a field where we can write the affiliation program URL!
It seems that it costs 2300$/year

Let's Review
It's a review block, not link management

AAWP
https://getaawp.com
Only for Amazon, not to manage custom links

Am I looking for a UFO?

I worked on 500+ websites in 20 years, and according to my experience, the requirements here are not unreasonable

The goal is just to centralize affiliate links in one place, without having to maintain a duplicate Google Sheet list for the extra infos, and to be able to insert a card with title+image+desc+button anywhere in the website with a block

Thank you for your suggestions!

0 Comments
2024/05/18
08:55 UTC

1

Best WP plugin for creating a dynamic 'compare' table?

hey guys, does anyone have recommendations on what plugin to use for the following. I am looking to make a site that users can use to compare product features side by side. they would select 2 or 3 products and based on this selection input the table would populate with all the features. any recs really appreciated!

0 Comments
2024/05/18
09:55 UTC

1

Menu button is not opening.

Hey all I’ve built a site and on the header menu the “RESERVE” tab custom link won’t open. I have checked off the open in a new tab setting but it still won’t work. If I were to right click and manual select open it will open. The “ORDER” button works fine. Any helpful tips? Here is the website

0 Comments
2024/05/18
09:51 UTC

0

Pages or Posts?

I'm starting a site based on sports stats so I will have lots of pages with lots of stats in tables. My question is, would I be better to use Pages or Posts for this? Thanks.

7 Comments
2024/05/18
08:57 UTC

0

How do I publish my website?

I have a hosting and a domain from Godaddy. I have installed WordPress on my cpanel hosting and uploaded the website I previously made on WordPress in a local environment.

The problem I am running into now is that I don't know how to add my domain and publish my website.

2 Comments
2024/05/18
07:16 UTC

0

Elementor For you ?

Hi everyone,
I would like to create simples and esthetics websites for little clients in France, what do you think about Elementor and what my process should look like to quickly create an optimized site with elementor (probably using templates 🤷🏽)
THKS !

1 Comment
2024/05/18
07:15 UTC

1

Twig and Timber for Wordpress

Hi, I have some basic knowledge about wordpress development and I wanted to improve it more, is it worth to learn twig and timber for wordpress development? Any pros and cons? What about your guys suggestions ?

1 Comment
2024/05/18
04:31 UTC

2

Nested tabs in mobile view are garbage

The PC view is fine, but with mobile view they lose color and all the nested tabs are displayed in a very unintuitive and ugly way. I have no idea how to find or use code to fix this issue. www.crackyourcodependency.com

1 Comment
2024/05/18
04:23 UTC

0

Transferring my Wordpress domain to GoDaddy. How do I unlock the domain and how do I ask Wordpress for the authorization code for the transfer?

Any help will be much appreciated.

11 Comments
2024/05/18
04:02 UTC

0

Cleanest and fastest WooCommerce Theme based on Gutenberg Blocks?

Hello fellow devs I am looking for a theme you've worked on and loved to build a woocommerce site. I usually use a theme called bootscore which is based on bootstrap I dont use Gutenberg blocks at all I just write raw html page templates using bootstrap but lately I stumbled upon a Guternberg based theme called Lorenty it's based on underscores and was amazed by the cleanliness and the speed and was wondering if you happen to know and worked on something similar for Woocommerce? Thanks so much.

0 Comments
2024/05/18
03:33 UTC

1

Why can backup plugins run while the site is live?

Hi,

I have been using UpdraftPlus for a while now. I noticed that the website is always live while the plugin is doing backup, what would happen if a user made a change on the live site or database? How do plugins like this work? Is there any backup plugin that would put the site into maintenance mode while backing up?

Thanks

6 Comments
2024/05/18
03:27 UTC

2

Regular Cache Plugin vs Redis Object Cache ?

Hi, What is the difference between the "Redis Object Cache plugin" and the "Regular cache plugins" like WP Super cache, LiteSpeed cache, WP Rocket? How are they Different and Do I need Both of them?

10 Comments
2024/05/18
02:14 UTC

1

Will my WP site work well without a public IPv4?

Hi WP folks, can you help me with this? I'm considering to purchase a hosting plan from a company. Let's say a plan without IPv4 is cheaper than a plan with both IPv4 + IPv6. So I'm wondering is there any problem with my WP site if I use a hosting plan with just IPv6?

Thank you in advanced!

1 Comment
2024/05/18
01:42 UTC

0

Any recommendations for a plugin that adds pre-made layouts?

Hi there, I'm looking for some pre-made layouts so I can quickly create sections for my pages. I'm looking for nav bars, headers, cta, gallery, etc.

Anyone know some decent ones that are free? Thanks.

6 Comments
2024/05/18
01:34 UTC

0

Best Kadence Blocks theme. (WooCommerce)

Hi. I am planning to use Kadence Blocks for WooCommerce. What theme should I use?

A Kadence theme?

Blocksy?

Astra?

Or is there a better alternative?

And why?

Thanks!

13 Comments
2024/05/18
01:29 UTC

1

Sudo Password for SSH to set up WP CLI

Hi all, I hope this is the right thread for this: I want to connect to my server via ssh and I'm stuck where I want to move wp cli to the local folder (according to https://github.com/wp-cli/wp-cli) via

chmod +x wp-cli.phar

sudo mv wp-cli.phar /usr/local/bin/wp

Now the problem is that I can't figure out my sudo password. I tried my user password for my mac, the ssh password, and the hosting password. I always thought Sudo stands for super user do, so my password I use to log into my computer should be fine?!

Thanks for any help 🙏

3 Comments
2024/05/18
00:56 UTC

2

Nee WP site not loading previous content

I have downloaded the content of a current website using FileZilla, to make some changes and then upload those changes.

I created a new site and DB through XAMPP, I copied the previous content in the new folder, and in the Admin Dashboard I can see our folders and themes we are using, but when I select a theme of ours, is not loading anything and I realized that post, comments and all the content is not there, so, how can I access to our content to make those changes?

4 Comments
2024/05/18
00:39 UTC

1

Double tax for the same city - Woocommerce

Hello, guys. Has anyone had this problem and found a solution?

I have a website that collects GST and RST. For GST, I collect tax on products and shipping; for RST, I collect tax on products alone. I have set it up and compounded it. RST has a priority of 1, and GST has a priority of 2, but I noticed that the GST also collects tax from the RST. Is there a way to go around this? I don’t want GST to collect tax from RST. Please let me know if there is a way to go about this. Thanks

0 Comments
2024/05/18
00:29 UTC

10

Where can I find a WP dev?

I've been developing Wordpress sites for more than ten years at this point, and have about 10 active clients. The problem is, I am moving away from dev, and recently got a job in an adjacent, but different industry. My clients haven't disappeared though- they still want stuff! I cannot just walk away from them, but the few folks I know who work w/ Wordpress are too junior to take over.

I am considering options: 1- find a person who can subcontract for me - I will manage the requests, and pass them along. I don't love this, because I have too much to do as it is, and don't really want the extra work.

2- find the right person to take over everything. It's probably about 10 - 20 hours per week. If it's a good fit it would be a good option.

3- continue to limp along and die an early death. Tempting but probably not ideal.

What the hell am I supposed to do? I've put all the feelers out and haven't found a qualified dev to even broach the conversation with.

Sites are either legacy or block builder. Was starting to think about the FSE route when I got a great offer to do other stuff and leave freelancing behind. Sites utilize ACF heavily, and limited other plugins. Have a large project in the works and another large one brewing off to the side. About 5-10 ongoing clients that may need a good bit of work, or no work at all in a given month. The folks I work for are all good ppl, so I am trying to be as careful about this transition as possible!

I am not necessarily looking for candidates here, just more of a request for help- where do I find these folks!? Thanks!

edit: I figured out where to find these folks... here! RIP my inbox.

19 Comments
2024/05/17
22:23 UTC

1

Vertical Side Header Formatting / Width

Hello,

Currently designing a website with a vertical side header.

I'm not sure why the "content" behind the header on the left-hand side of the screen is not fitting to the full width of the screen. Despite changing the values from 100% to 1600px and even changing the page layout with no luck. With the Z-Index of the Header set to 999.

I am using the Astra theme with Elementor Pro.

Elementor Front End View (Seems To Be Normal)

Website View (Width Messed Up)

0 Comments
2024/05/17
21:48 UTC

Back To Top