Rastislav Lamos
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Where to find settings?After looking into the source code of the plugin, that constant is defined at the top of it, so it might be fine to define it in your
functions.php
file.For example:
define('PMPRO_LPV_LIMIT', 100);
Forum: Fixing WordPress
In reply to: Center Text on Homeapge ImagesAlright, I came up with a more complex CSS. After you apply it, it will look like this (chrome):
Screenshot.two-columns .homepage_pane { width: 33% !important; } h3.post-title { width: 100%; } h3.post-title a { margin: 0; } .homepage_pane { text-align: center; } .homepage_pane > a { display: block; } .homepage_pane img { float: none; } .clearfix:before { display: none; }
If it is not what you wanted, let me know ?? Happy New Year!
Forum: Fixing WordPress
In reply to: Center Text on Homeapge ImagesWell, you can center the text which is wrapped in the
<a>
easily by making it being displayed as block but then other things start to break (there are no longer 3 columns on each line). This is the code for it:h3.post-title a { text-align: center; margin-left: 0; }
I’m not familiar with all your css so if you know how to fix this next issue, good. I’m going to try to come up with something too.
Forum: Fixing WordPress
In reply to: Center Text on Homeapge ImagesIt would be nice if you could provide a screenshot with an arrow pointing to the text you want to be centered. Otherwise I would have to guess.
Forum: Fixing WordPress
In reply to: Child Theme TroubleshootingReading from the Child Themes Codex, we get this information:
[…] your child theme can override any file in the parent theme: simply include a file of the same name in the child theme directory, and it will override the equivalent file in the parent theme directory when your site loads. For instance, if you want to change the PHP code for the site header, you can include a header.php in your child theme’s directory, and that file will be used instead of the parent theme’s header.php.
Extra care must be taken when modifying
functions.php
file. If you create a newfunctions.php
in your Child Theme’s directory, it won’t override thefunctions.php
from the Parent Theme, but loads in addition to it — and that’s a good thing. Child Theme’sfunctions.php
is loaded before Parent Theme’sfunctions.php
so you even can override functions in the Parent Theme’sfunctions.php
. However, functions located in that file must be firstly prepared to be overridden by a function with the same name from Child Theme’sfunctions.php
.It is usually done by wrapping the function in an if clause such as:
// functions.php — Parent Theme if ( ! function_exists( 'my_function' ) ) : function my_function() { } endif; // my_function
That means that the function
my_function()
should only be defined if it has not been defined earlier (for example, in Child Theme’sfunctions.php
as they are loaded before)Forum: Fixing WordPress
In reply to: internal site search doesn't workHow is it not working? When I’m trying to use the searchbar at the top right corner of your site, it finds articles.
Forum: Hacks
In reply to: Query return codesAssuming you mean using WP_Query class to query posts for example, the best way of getting this information is either reading WP_Query Codex and/or looking into the source code of WordPress (file
wp-includes/query.php
or query.php on WordPress SVN repo).For example, function
query_posts()
returns array of posts when successful or an empty array if there are no queried posts (as far as I can see from the source code).Forum: Hacks
In reply to: Change WP language in a PHP loopAfter a bit of googling I stumbled upon an interesting topic about this:
Forum: Fixing WordPress
In reply to: copyright dateOh yes, you are right. I always forget about using Child Themes.
Forum: Fixing WordPress
In reply to: Having troubles removing a menuGlad it helped you ??
Rasto
Forum: Fixing WordPress
In reply to: copyright dateYou can open and edit
footer.php
located in your theme’s directory. It should be located there.Forum: Fixing WordPress
In reply to: Having troubles removing a menuThat’s what I needed! Have you noticed the class
single-tickets
in the<body>
‘s classes? That’s very helpful. As far as I can see, that class is added to the <body> only when viewing a single ticket’s details. The only thing we need to do is to add this piece of css at the bottom of yourstyle.css
file:.single-tickets #main-nav { display: none; }
Give it a try and let me know the result.
Forum: Fixing WordPress
In reply to: Having troubles removing a menuIf it is WordPress, it should be some kind of Page, how else would the resulting HTML be generated? ??
I understand that it’s not a single page. That was just an example how you can conditionally do stuff. We need to identify from where it is being generated.
Can you give me the ticket’s page
<body>
as a code snippet here? Not from the code but from the generated HTML. Just that one line (<body class="bla bla" [...]>
)Forum: Fixing WordPress
In reply to: Problem with images displaying (thumbnails)It is grabbing that old URL from somewhere. Look at the theme’s options and all the places where this could be set.
Forum: Everything else WordPress
In reply to: Server configuration of WordPressThree instances of that caliber (2000 visits per day) running on 1 GB of RAM is quite a lot IMO (with all the other things). HHVM likes to cache a lot of stuff and it takes some RAM. I don’t have a comparison between PHP 5.6 vs HHVM 3.4 RAM usage at my disposal.
I’m using a local provider (vpsfree.cz, Czech Republic and Slovakia) which gives me 4 GB of RAM by default so I have plenty of it (= that’s why I’m not much concerned with it).
The best thing you can do is test it yourself and see if it is worth it.
All in all, I think that until PHP 7 doesn’t arrive, HHVM is the best option we have.