Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/10/2020 in Posts

  1. If I get specific questions about WordPress, WordPress plugins and/or other services, I will (sometimes, not always) ask the client (or client to be), something like: I understand that you have the need for [general tool description, i.e. SEO editing tools ]. What part(s) of [specific tool name, i.e. Yoast SEO] do you find most useful, and would like to use? Maybe a custom solution would fit your needs better, and save you time on a daily basis. Also, we could look at what could be done automatically when it comes to [short tool description, i.e. SEO] if we look at a custom solution.
    4 points
  2. After trying other CMS, I finally decided to use Processwire, because it provides exactly what I needed for this project and even more (I'm still discovering some features). The project needed a Multilanguage site, and Processwire provided this feature very smoothly. I did not want to use any framework, so the website is made up with just HTML and CSS. I decided to implement Google AMP, so the page will load faster and for future mobile possibilities. This project is still under development. https://www.alval.cl/
    4 points
  3. Just to go against the grain a bit: Those modules are way, way overkill for 99% of sites. Just looking at the screenshot in the Seo Maestro thread, all those options would confuse most of my clients. Who really wants or needs to manually edit the change frequency of a single page? Some of those options should also be generated automatically (Locale, based on the current language) or set globally (Site Name, for example). I get that you can control which fields to show and that it's kind of a framework which you can use for all kinds of sites. But in my experience, showing five screens of SEO settings on every page is the best way to get clients/editors to be scared of them and never use them. Three fields - title, description, preview image - are all you need most of the time. KISS. I would use external tools for this. There are many tools that are much better at this stuff than Yoast, and they look at the page as a whole, not just the body content. For example, at work we have at some points used the following tools among others, in no particular order: Ryte, Seobility, Semrush, Sistrix. And many more ...
    2 points
  4. Hi! I'm using ProcessWire's ability to recognize custom Page classes, and I have added some very useful methods to my DefaultPage class. I just tried using one of the methods on a Repeater field item and got the error saying, "Method RepeaterPage::meta_description does not exist or is not callable in this context". Makes sense! My method is attached to DefaultPage, not RepeaterPage. That surfaces two questions: How do I extend RepeaterPage? By creating a DefaultRepeaterPage.php file in the /site/classes directory? What is the proper way to abstract methods that I want to use for both DefaultPage and RepeaterPage, so I don't have to repeat the same code in both classes? I think I understand how to do it if they both extended the same parent class, but I don't see how that can be the case here. Thank you in advance!
    1 point
  5. Not sure if "the most proper" but one way I can think of is creating a module that adds the required methods/properties through hooks and just reuse the same method for both hooks.
    1 point
  6. LazyCron operates on an elapsed time interval, but you may want it to operate at specified times. Assuming your website is going to be visited sufficiently frequently (either by real users or by a Cron job), you can do this by editing the file /assets/cache/LazyCron.cache. This file contains 21 timestamps – one for each of the LazyCron specified intervals (e.g. “everyMinute”). The timestamp denotes when that interval was last triggered. To make the trigger happen at the required time, change the timestamp in the matching row to be when the previous trigger should have occurred. To make this easier, I have done an Excel spreadsheet (“Lazycron_fill.xlsx”) to simplify the process – just enter the required benchmark timings and copy the result into the LazyCron.cache file. Lazycron_fill.xlsx
    1 point
  7. I figured it out; it was my .htaccess file. I hadn't copied it across properly, so the mod-rewrite wasn't active. I'd also made modifications to the on-site-file which didn't work in the dev-url.
    1 point
  8. Thanks you guy for this module! If you are willing to accept pull-requests, I will send one which give ability to translate a file (eg: docx) into a CKEditor field and another one which will support my incoming field/module EditorJS. And some suggestions. About the issue #2 (formality param), as you can know which language is or not supported, you could hardcode the six unsupported languages only. Exactly what I was going to suggest (#15). We are lazy here ?
    1 point
  9. Try the following, which will ensure you get an timestamp and not a formatted date string. $item->getUnformatted('date_start');
    1 point
  10. Maybe try the basic format first <?=date('%A, %e. %B %Y', $item->date_start)?>
    1 point
  11. Yes, this is easiest to do if you apply the sorting as the page is saved. So you won't see the sorting immediately after the images are uploaded, but will see the sorting after the page is saved and Page Edit reloads. In the examples below you would add the hook code to /site/ready.php The sort settings for child pages prevents the editor from making any other sort order apart from the one specified. So if you want something like that for images, where the newest images are sorted first, it's very simple: $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); $pages = $event->object; if($page->template == 'your_template') { if($page->isChanged('your_images_field')) { // Sort the images from newest to oldest $page->your_images_field->sort('-created'); } } }); But if you want to sort newly uploaded images first once the page is saved, but still let your editors customise the sort order after that, then you can use this hook: $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); $pages = $event->object; if($page->template == 'your_template') { if($page->isChanged('your_images_field')) { // Get the old version of the page, without the current changes $old_page = $pages->getById($page->id, [ 'cache' => false, 'getFromCache' => false, 'getOne' => true, ]); // Get the names of the existing images on the old page $existing_image_names = $old_page->getFormatted('your_images_field')->implode('|', 'basename'); // Get the newly added images $new_images = $page->your_images_field->find("basename!=$existing_image_names"); // Prepend the new images to the start of the Pageimages WireArray foreach($new_images as $new_image) { $page->your_images_field->prepend($new_image); } } } });
    1 point
  12. To be fair I believe we're on the same page here, except for one detail: those modules — Seo Maestro and Markup Metadata — are actually two very different solutions. In fact what you're describing is exactly why we use Markup Metadata by default in our projects: there's no GUI, and a big part of the markup is based on globally defined values or values from (pre-existing) page fields. It's just a markup module for handling the repetitive task of rendering a standard set of metadata elements, correctly and consistently, from project to project. That being said, in my experience some people prefer a more complex approach, either because they actually need it or because they think they do — and if a client was specifically requesting feature set similar to that of Yoast, a solution such as Seo Maestro might be just what you need to convince them that they don't need to go with WordPress just for that ?
    1 point
×
×
  • Create New...