mark l chaves
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Filter issueHi @twd,
I recommend you run the code yourself so learn what it’s doing. You can also Duck Duck Go or Google
var_dumpfunction.https://www.php.net/manual/en/function.var-dump.php
var_dumpis useful for testing and debugging! So, it’s necessary for testing and proofing.Once you prove the code works, you can remove the
var_dumpcall. You should really be testing all this code yourself as proof.Thanks!
- This reply was modified 6 years, 2 months ago by mark l chaves. Reason: Clarification
Forum: Developing with WordPress
In reply to: Filter issueHi @twd,
Your code would throw a warning or error depending on which PHP version used.
I suggest you run both my examples and your code as a proof to yourself what will work and what won’t. That’s the beauty of coding–like mathematics you can always test your answer 😉
Thanks!
P.s. Learn more about the
definedfunction here https://www.php.net/manual/en/function.defined.phpForum: Developing with WordPress
In reply to: Filter issueHi @twd,
Give something like this a try.
define('ICL_LANGUAGE_CODE', 'something'); $classes[] = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : false; var_dump($classes); // Dumps 'something'// define('ICL_LANGUAGE_CODE', 'something'); $classes[] = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : false; var_dump($classes); // Dumps falseForum: Fixing WordPress
In reply to: Text blocks – Quotes: Mobile viewIt looks like you are in the middle of trying things out.
The first time I inspected your code I saw that your blockquotes has a ridiculously wide left and right padding for mobile, e.g., 110px. I would change that to maybe half that like 55px.
Your CSS would like something like this if you are still using those pink style quotes.
/* Decrease blockquote side padding for small devices. */ media screen and (max-width: 500px) { blockquote { padding-left: 55px; /* Use !important as needed. */ padding-right: 55px; /* Use !important as needed. */ } }How to add custom CSS to WordPress.
Good luck!
Hi @tu586,
The easiest way to find out what theme your site is on if you have wp-admin access is Appearance > Themes.
If you don’t have access, bring up the site in a Firefox or Chrome > Right Click > View Source > Search for “themes/”.
I think you are on something called anco. Which I don’t see in the themes directory. That should throw up some flags for you.
BTW, if you hang around long enough, you’ll notice that finger-pointing between WordPress, themes, and plugins is very common. It’s best if you hire a developer or learn how to code yourself to figure out what’s really going on.
Good luck!
Forum: Reviews
In reply to: [Hide and Seek Header] Best in Class | Works Like a Charm!Hi @jetxpert,
I’m thrilled you think so. I appreciate your feedback and your guidance during the development of the Hide and Seek Header!
A huge thanks to you too 😉
mark
Hi,
Ya, you can probably run a filter if you want to remove dates. Or, whip-up CSS like you’ve tried. Let’s see what the moderators say–if they have a great hook for that. This is WordPress. You can filter just about anything. 😉
But, I think your bigger issue is Yoast. It’s setting your dateModified and datePublished meta just like a good little SEO plugin should do.
<script type="application/ld+json" class="yoast-schema-graph yoast-schema-graph--main" > { "@context": "https://schema.org", "@graph": [ { "@type": "WebSite", "@id": "https://testfellow.com/#website", "url": "https://testfellow.com/", "name": "testfellow", "inLanguage": "en-US", "description": "Online MCQs Test Preparation for Competitive Exams", "potentialAction": [ { "@type": "SearchAction", "target": "https://testfellow.com/?s={search_term_string}", "query-input": "required name=search_term_string" } ] }, { "@type": "WebPage", "@id": "https://testfellow.com/#webpage", "url": "https://testfellow.com/", "name": "Online MCQs Test Preparation for Competitive Exams like NTS,PPSC", "isPartOf": { "@id": "https://testfellow.com/#website" }, "inLanguage": "en-US", "datePublished": "2018-10-13T11:20:13+00:00", "dateModified": "2020-03-25T13:34:13+00:00", "description": "testfellow.com is an online quiz website which contains solved MCQs questions for the preparation of competitive exams, or Jobs Test like NTS, PPSC, FPSC", "potentialAction": [ { "@type": "ReadAction", "target": ["https://testfellow.com/"] } ] } ] } </script> <!-- / Yoast SEO plugin. -->Maybe turn Yoast off and remove all visible dates from all your posts? I think Googlebot is pretty smart. If it smells like a blog, it’s going to look for a date.
https://searchengineland.com/google-explains-how-dates-within-search-results-snippets-work-313742
Good luck!
- This reply was modified 6 years, 2 months ago by mark l chaves. Reason: Reformatted code snippet
When was the last time you submitted your page for indexing?
Have you viewed how Googlebot will see your page? See the “View the rendered page” section here.
Forum: Fixing WordPress
In reply to: site speed slowHi @surbhishringi,
Your page size is about 3.4 MB. Mainly due to your images. This is the common culprit. Try to get the page size down to 1 MB or less.
You can start by optimising your images and using a WebP service.
I cover WordPress performance in more detail on Quora for another theme. But, you can look at the items that aren’t theme-specific.
Good luck!
Oh. And, I agree with @fierevere. Your page has a lot of bloat. Most likely from plugins. Your DOM is much larger than average (2,866) and your block rendering scripts are high (14.2s). I would address these after you optimise your images.
- This reply was modified 6 years, 3 months ago by mark l chaves.
Forum: Fixing WordPress
In reply to: Not able to change the background color on mobile-menuHi @ninaelina,
There’s an inline CSS rule that’s setting that slide-out menu bg colour.
#slide-out-widget-area { background-color: #27CCC0 !important; /* Try to override this. */ }See if you can change that inline or add another override rule to your custom CSS. Don’t think the latter will work, but you can always try.
Here’s the font-size CSS.
#slide-out-widget-area .inner .off-canvas-menu-container li a { font-size: 36px; /* Change this. */ }Good luck!
Hi @tu586,
@fierevere’s answer is correct. You can override the default social preview image (e.g. WordPress feature image) with Yoast Premium.
Then, you can remove your feature image. Or, keep your feature image but disable it from displaying on your page depending on your theme.
If you don’t want to use Yoast Premium, you can write the OG markup yourself. Then inject the markup yourself using your theme (if supported) or an insert header/footer plugin.
Good luck!
Forum: Themes and Templates
In reply to: [Astra] Home page header photo cuts off part of photoHi @rachellecdavis,
> They said to try a custom header and see if that solves the problem.
I’m not exactly what is meant by “try a custom header”? Sorry. Whether you use a custom header or not, you’ll still need to apply art direction images. How many will art direction images will depend on your original image.
I did one job recently for a new client where I needed 8 images. Their requirement was tough because specified a specific height for a couple of the breakpoints. And, they wanted it to look really smooth. It took me about 2.5 hours to code it up.I have another CodePen that’s more simple. This one uses only two images (they’re different images, but you should get the idea).
https://codepen.io/marklchaves/full/eaaXXW
> Any pointers on that? Their tutorial didn’t actually address photos in the custom header so I’m still not sure how to make it look right.
No, sorry. I still don’t know what is meant by a custom header.
> Also, I want that text on there still…the Astra theme already has title boxes in the header photo so you can just type whatever text you want…if I do a custom Elementor header or the art direction option it looks like I need that text in the actual photo file?
Not sure. If you specify a background image, you should be able to overlay HTML text elements on top of it. I would never build a hero image with flattened text in the image. This method is anti-responsive.
I address this anti-pattern here https://www.quora.com/Is-there-a-program-that-inserts-text-over-images
Lastly–just to share, I recently posted a tutorial showing how I built a beautiful full-width hero using GeneratePress and Gutenberg. No plugins or premium add-ons.
https://dev.to/marklchaves/creating-a-full-width-hero-in-generatepress-free-version-1ki9
I hope your head isn’t spinning too much right about now 😉
Shout if you have any questions. You can Slack me anytime too, if you want to close this thread.
Forum: Fixing WordPress
In reply to: How to Auto Show Current Year and Current Title?Hi @chcw,
Instead, maybe try
© <script>document.write(new Date().getFullYear())</script> XYZfor the current year.
This is what I usually do for my client sites. Live demo on CodePen just above the footer bar.
Forum: Fixing WordPress
In reply to: Table text align in mobile phoneThat would be Gutenberg aka the block editor. Great. I gave you a link to the how-to above.
Please consider closing this thread, if you have nothing further to add here.
Thanks!
Forum: Fixing WordPress
In reply to: Table text align in mobile phoneHi @rozard,
Agreed. Web dev can get complicated.
You never said what pagebuilder you’re using. If you are using Gutenberg, try using its columns block.
Read more here
https://wptavern.com/coblocks-adds-row-and-columns-page-building-blocks-for-gutenberg
Or, hire a web developer. 😉
Good luck!