mark l chaves
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: embeding JavascriptHello @jaygr3y,
Just to clarify that I’m not implying that you add my code snippet directly to any WordPress PHP template files.
Since you said you are using the Insert Headers and Footers plugin, I am suggesting to move your code into the footer section of the plugin. I’ve already stated this in my CodePen that I posted earlier ;-).
If you decide to manually enqueue that script yourself (must be comfortable with coding PHP), then please use the enqueue method that @bcworkz kindly pointed out.
Here’s a usage example of enqueuing CSS, a JS library, and inline JS: https://gist.github.com/marklchaves/1c616eb28382b813232c23e0f29d164a
Cheers 🙂
- This reply was modified 5 years, 8 months ago by mark l chaves. Reason: Typos
Forum: Everything else WordPress
In reply to: Increasing font size in taglineHi @gracebraedon,
Apologies for the type. I missed the closing comment
*/.Here’s the exact code with no comments.
.page-header-title.clr { font-size: 3.5rem; }The
font-sizeCSS property needs a set of units. So, I can’t just give you a number. I’m usingremsince it’s resposive. Feel free to change to any other valid CSS unit.I posted a live demo on Codepen where you can play around with any size/units that you want.
Enjoy 🙂
- This reply was modified 5 years, 8 months ago by mark l chaves. Reason: Typo
Forum: Developing with WordPress
In reply to: Removing sidebar widgets rom everypage.Hello @antiqueverma,
Have you asked the theme authors? They would know the best way to do that for their theme.
If they’re are available or don’t support the theme anymore, you should consider moving to a well supported theme.
In the meantime, if you post the link to one of the pages you need to remove the sidebar, I can look to see if you can remove/hide with custom CSS.
Thanks!
Forum: Developing with WordPress
In reply to: Add username to URlHello @gregorita12,
I don’t recommend using a username (login name) in a URL like that because it can be considered personally identifiable information. Meaning it can violate privacy laws.
For example, if your site is using Google Analytics, those URLs would be stored on Google’s servers which would violate Google privacy terms.
If you’re creating some sort of membership page, I would look at some of the well-established plugins that do that for you.
Please do a search on WordPress membership plugins.
Good luck!
Forum: Everything else WordPress
In reply to: Increasing font size in taglineHello @gracebraedon,
I assume the text under your hero image is the tag line? I hope 😉
Here’s the CSS for making that bigger.
/* Make the tagline bigger. */ .page-header-title.clr { font-size: 3.5rem; /* Change number (size) as needed. }Cheers!
P.s. You previous code attempts might be correct, just in the wrong spot. Read how to add CSS to WordPress here.
Forum: Developing with WordPress
In reply to: embeding JavascriptHi @jaygr3y,
I recommend adding
<script src="https://cinkciarz.pl/widget/cinkciarz.widget.js"></script>to your footer so that your divs are declared before the JavaScript library runs. This will avoid any JavaSript errors.
Putting this line of code in the footer will also help avoid slowing down your page due to waiting for the cinkciarz.widget.js library to load.
Then, where ever you want the widget to show up on your page, insert a code snippet (or custom HTML) block or component (whatever your theme calls it) first. Then copy/paste your divs into that HTML/snippet element.
Here’s a simple straight-up HTML mock demo for you on CodePen as an example.
Does that make sense? If not, ask.
Thanks! 🙂
Forum: Developing with WordPress
In reply to: CSS first transition doesn’t workMy pleasure @antonop4u 🙂
Take care!
Forum: Fixing WordPress
In reply to: Title image and text issueHi @studiorepublik,
Great! Glad to know that it worked for you.
You might have noticed that I had a typo in the last sentence in my reply. It should say
“smaller than 768px wide”
instead.
About the coffee, it’s the thought that counts. 🙂
Cheers!
mark
Forum: Developing with WordPress
In reply to: CSS first transition doesn’t workHi @antonop4u,
Not exactly sure what the issue is. Instead of trying to debug your code, I modified it to use a CSS keyframes at rule for the transition.
For example, I assigned this class to your popup-win.
/* Fade in Once for Three Seconds */ .fade-in-1 { animation: 3s 1 fadeIn; /* Do the Fade. */ }Which in turns uses this at rule.
/* The fading in part. Reused above. */ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }Full code and live demo on CodePen.
Shout if you have any questions.
Thanks!
Forum: Fixing WordPress
In reply to: Title image and text issueHello @studiorepublik,
Can you please try this custom CSS?
@media screen and (max-width: 767.998px) { .custom-title-class { background-size: 15rem; /* Adjust as needed. */ } }This media query will resize your logo image overlay for small devices (anything smaller than 178px wide).
Thanks!
- This reply was modified 5 years, 8 months ago by mark l chaves. Reason: Added missing closing right paren
Forum: Developing with WordPress
In reply to: Uncaught ReferenceError: Masonry is not definedHello @hifumi,
Sorry. I should have been more specific for the long-term fix.
I wouldn’t alter the index.php or footer.php files. These are core WordPress files that can be overwritten any time WordPress is updated.
The better approach is to use the code samples I provided in your child theme’s functions.php.
Please read up on WordPress template files, child themes, and wp_add_inine_script (to specify to load the Masonry library first before your inline).
BTW, the code I shared with you earlier already has a check to display only on certain pages. You should alter this array to add/remove for your specific pages.
if( is_page( array( 'about-us', 'contact', 'home' ) ) ) {If you didn’t realise this earlier, I recommend brushing up on your PHP.
Happy coding 😉
Hello @vanvlietwebdesign,
Here’s a page that lists the domains for white listing MonsterInsights and Google Analytics.
https://www.monsterinsights.com/docs/domains-that-must-be-accessible-for-tracking/
Cheers,
mark
Forum: Developing with WordPress
In reply to: Uncaught ReferenceError: Masonry is not definedHello @hifumi,
index.php is the main WordPress template file. So, your JS code is being called in every page that uses/inherits from index.php. This is mostly likely why you’re seeing the Reference error.
The quick fix is to modify your JS to test for Masonry first or wrap it in a try/catch.
I’ve got code samples of this in CodePen.
The long term fix is insert your inline JS only for the page you need it using the WordPress hook API.
Here’s an example.
<?php /* Add inline JS in the footer for specific pages. */ function add_my_js_script_to_wp_footer() { if( is_page( array( 'about-us', 'contact', 'home' ) ) ) { ?> <script> // Masonry JS goes here. </script> <?php } // if } add_action('wp_footer', 'add_my_js_script_to_wp_footer');However, this inline might be loaded before Masonry lib is loaded. So, you’ll see the JS error once again. That means you’ll need to use something like this when you enqueue Masonry:
wp_add_inline_script('MASONRY_HANDLE_GOES_HERE', $the_script_source_above_stuffed_in_a_variable, 'before');Please read up on wp_add_inine_script if this is the case.
Thanks!
- This reply was modified 5 years, 9 months ago by mark l chaves. Reason: Typo
Hi @imagineds,
Do you have a custom login URL? If so, try disabling it first. Then, rerun the setup wizard. When the connection is successful, reenable your custom login URL.
Thanks!
Hey Everyone,
If you have an active custom login URL, it will interrupt the connection process between Google Analytics and MonsterInsight.
Just like @carganet mentions, try temporary disabling any custom login URL plugin (or any code that does a login redirect) to let the connection process run its full course. When it’s done, enable your custom login/redirect code.
Thanks!