goldhat
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: wp_editorI don’t know of an alternative to wp_editor that returns the output. There probably isn’t one because the editor is a lot of different stuff, JS files get loaded to support it, it’s probably a mixture of templates and JS to render as well. Anyway the solution I’d use is PHP output buffering with ob_start(), ob_get_contents(), ob_end_clean(). What this does is allow you to store the output rather than have it print/echo out immediately. It’s a valuable tool to know as well because it’s used all the time in template output, when template files are loaded often the file is required/included but the code is stored with output buffering and printed later.
ob_start(); wp_editor( $settings ); $editor = ob_get_contents(); ob_end_clean();At this point you have all the code stored in the variable $editor, print it when/where you need it. I haven’t actually tried this with wp_editor() but in principle it should work unless there is some complication involving the javascript.
For reference and more details see answer at https://stackoverflow.com/questions/4401949/whats-the-use-of-ob-start-in-php
Forum: Fixing WordPress
In reply to: How to build this structure?ACF is great I work with it everyday and it’s highly stable, well-supported. It definitely provides a good base for the custom fields, and the relationship between posts. It will be largely up to you to render the data on the front-end, using custom post templates and the ACF field output functions, almost everything can be loaded with get_field() and you’ll need to check the ACF docs on how to render things like images which are returned as arrays.
Forum: Fixing WordPress
In reply to: Can I do this?I’d suggest searching for a “Store Locator” plugin I think there are many of them and they tend to work the way you describe. That example is a nice map but I think that is a fairly customized Google Maps and frankly if a novice to building webpages, customizing a google map might be a bit out of reach unless your really up for a challenge and some JS work. That being said, some of the free store locator plugins might have options for different Google Map themes that pretty good… it’s the selecting each individual state that seems unlikely to find in a free plugin.
Forum: Fixing WordPress
In reply to: Trying to put Page in full widthYour theme is using bootstrap, and personally I think that’s great because I love bootstrap but by default .column has property max-width: 1200px. It seems like if we shrink the screen your site is full-width if you go under 1200px so that’s the only thing blocking it. Combined with margin-right: auto; margin-left: auto; your .column wrapper is constraining to 1200px max.
Sidenote: for some reason your .container div is inside .col-md-12 which is backwards, the correct order is .container > .row > .col-md-12 (see the Bootstrap docs for grid usage for examples). This is not exactly causing the width issue though, but it could cause other problems.
Once you get the bootstrap order fixed, target the specific .container div and try overwriting that max-width property with 100%:
`
#website_boxed .container {
max-width: 100%;
}
`That or some variation should work, if you don’t have the element #website_boxed on other pages you could probably use one of the body classes… I’m not sure if you’re trying to selectively target it or alter is everywhere. I’d avoid targeting .container globally because you want to be able to use that for nested grid layouts, and there may even be plugins or other parts of your theme that use it already.
- This reply was modified 9 years ago by goldhat.
Forum: Fixing WordPress
In reply to: How to make twenty-seventeen theme mobile friendly?This question is too vague you’re asking about a general concept (mobile-friendliness) instead of focusing on what the specific issue is. The only significant flaw I see in testing the main page was that the title disappears from view.
The theme is as other mentioned mobile-friendly, in fact highly optimized for mobile. If you want to add a specific mobile feature, you need to communicate exactly what that feature is.
As you do custom styling and change sizes, test the mobile view right away so you can avoid “breaking” mobile support.
Forum: Everything else WordPress
In reply to: Questions are held for moderationI’ll just chime in that sometimes other forums like StackOverFlow can provide a faster reply in part because they are “gamed” to reward correct answer, points system for activity etc. Because I see you’re a developer yourself, so I understand the situation a bit if you’re in the middle of a project and facing an issue then you can’t wait days to continue your work without disappointing a client. But there is that golden rule don’t let your emergency become a plugin or theme developers emergency. Because they put their time into building a plugin, released it for free, they’ll help when and if they can. Of course some plugin/themes are much better supported than others, some have companies and teams behind them, some are abandoned, so if you’re choosing between a couple of different plugins that might work for a project it’s worth taking a peak into the support forums and just check what is the average response time and do issues usually get resolved. It’s also one of the best ways to measure plugin quality, because a plugin can have a high rating even if certain issues are unresolved.
Forum: Everything else WordPress
In reply to: My Plugin not found on WordPress DirectorySeems like a very harsh accusation by @jdembowski (are you trying to game the search?) when all the developer asked was why the keyword searches were not working. His keyword list seems reasonably relevant to the plugin topic. It is an interesting topic because knowing how the search works is important, just as it’s important with search engines. I’m sure it would not be a great thing if developers started doing some kind of SEO (or gaming the system) but knowing what factors weigh more heavily in the search could help give developers direction on where to focus.
I’ll share that with my newest plugin (QuizMaster) it appears in the quiz category, and under some searches. There are about 5-pages of results, and at least in the categorization they are ranked by installs. So what the moderators are telling you @dazzlersoft makes a lot of sense, focus on getting your installs up starting with at least using the plugin on your own site. Then perhaps invite some people you know to use it, at least to try it out… try to build some awareness via your own site or social media to get those first 10-20 installs. Notice that the count of installs is stepped, I’m not sure what the first step is, but there is a 20+ step and plugins with that many installs seem to show up. Of course if you’re in a busy category you’ll need a lot more to get to the first page or top ranking.
It would be interesting to see a blog post or a documentation for developers section that discusses plugin/theme searches, ranking weights, what is and isn’t factored in, and it would be a good place to put any restrictions related to gaming the search as a reference.
Forum: Fixing WordPress
In reply to: WordPress database error: [Not unique table/aliasLong time no replies! Just found this today because I have the same or similar error on a project. The cause is implied in the error message, the same table is being joined twice. Or the same alias (for the table name) is used twice. It’s hard to read these long sql statements but if you suspect a certain table is duplicated, search the statement for it and find out where it’s being used. When you find a “double join” or duplicate join, figure out a solution. Can’t tell you exactly how to solve it, still researching myself, try this stack overflow: http://stackoverflow.com/questions/4267929/whats-the-best-way-to-join-on-the-same-table-twice
In my own project the reason for the double-join is because we have a system where we’re creating the query in a loop, and it creates an array of joins. In some cases, the joins are for the same table. We might be able to fix it with using a different alias… still researching.
Hope this helps, 9-months later hopefully you solved it already.
Forum: Plugins
In reply to: [Wp-Pro-Quiz] Url of individual questionYes, we work with WP Pro Quiz a lot and built an add-on called WP Pro Quiz Completed that displays all historical quiz stats to the quiz taker. We’re not allowed to share any links here or say anything promotional, so if you want to discuss further please contact via my profile which has our website link.
The way I see building this feature as an addon (without touching the WP Pro Quiz files) is to make a shortcode like [wpproquiz_question]. If you include a question ID like [wpproquiz_question id=6] then it shows that question. Otherwise it tries to load the question from a get param so you could link to the page example.com/question/8 and that would load question with ID 8. And I suppose if you visit example.com/question/ it would just say a warning message “No Question ID Found”. It’s tough to support a slug in an addon without hacking the core files because WP Pro Quiz doesn’t have a hook like “question_saved” that we could tap into in order to generate a slug.
Forum: Plugins
In reply to: [Wp-Pro-Quiz] open answer to question?Marlene, when you add a question use the answer type “Free choice”. This will present the quiz taker with a simple TextArea they can enter the answer. There is normally “scoring” by listing correct answer strings. You can get around that by just entering “anything” as the correct answer.
How this will look to the user, I’m not so sure… meaning they will see their “score” at the end, they will have gotten this kind of question “wrong” no matter what you ask them. I’m presuming you don’t actually want to score their answer, you just want to collect the information?
What is needed in WP Pro Quiz is probably a “don’t include in scoring” option, which would be better for assessments and questionnaires.
Forum: Plugins
In reply to: [Wp-Pro-Quiz] Url of individual questionBrian, because WP Pro Quiz uses custom database tables (not wordpress posts) for it’s questions, the only way to get the questions is to load them. There is no slug, or single view or anything that would come automatically if the developer was using WP posts. So the short answer is, unless you code it, there is no way to view a single question.
Also the code for displaying a question is a mile long because there are so many different answer types, and normally questions are only displayed when loaded into a quiz first. To extend and rewrite the view classes to enable displaying a single question will be quite a bit of work.
Forum: Plugins
In reply to: [Wp-Pro-Quiz] Multiple Questions in Single PageThere is a quiz mode “show in single page”, is that what you want? Then there are a few settings for that. But I think it’s all or nothing, meaning if you choose single page then they all display on 1 page. Sounds to me like you want 2 or 3 questions on a page, but still have navigation to other pages in the quiz?
Forum: Plugins
In reply to: [Wp-Pro-Quiz] Mixed values for graduationMichiel, for showing different messages based on scores see the “graduations” on the quiz edit page. You can setup various graduations, for example 50%, 70%, 90%.
I’m not sure what you meant about “and combinations”, but the graduation feature is only triggered by different scores.
Forum: Plugins
In reply to: [Wp-Pro-Quiz] Matrix Sorting answers queryCan you post a screenshot, I’m having trouble picturing this. Might run a test later with that question type though.
I know you’re trying to be clear by saying “original” but I can’t imagine what that means exactly, I mean “original answer was wrong”? Makes it sounds we took the question twice… the answer is either right/wrong… right?
Forum: Plugins
In reply to: [Wp-Pro-Quiz] WP-pro-quizWhat do you mean by “allowable variable” and can you explain something about the context? It sort of sounds like your asking what the user taking the quiz can enter? But I don’t know what you mean by “allowable variable”. What you can setup as wrong answers, also varies based on answer type.