Rastislav Lamos
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Hi guys, need help centring header menu in Spacious“Hi JMWPhotography,
edit your child theme’s
style.css
or use a Simple Custom CSS plugin for the following CSS modifications:#header-text-nav-wrap { padding-left: 0; } #header-left-section { float: none; } #header-right-section { float: none; } .main-navigation { float: none; } .menu-header-menu-container { text-align: center; } .menunav-menu { display: inline-block; }
Forum: Fixing WordPress
In reply to: Sidebar ad will not show, no matter what I do!Hello kayten1,
have you checked the JavaScript console (e.g. in Chrome the Developer Tools)? I’m seeing some error there, although, to be honest, I’m not sure whether it is related to your problem or not. Usually, all JS errors are bad and can block other JS code from being executed, so you should try to fix this one.
Hi Medran,
I’ve stumbled upon probably the same issue on WooCommerce GitHub pages. The “solution” proposed there is to turn off WP_DEBUG, so PHP notices won’t show. However, I can see you are getting a PHP Warning. It is being reported to come from the same line so maybe these two problems are connected somehow.
The message about the
pluggable.php
file is just that the headers have already been sent from the functionwp_redirect
. The problem definitely doesn’t lie there as it’s a WordPress Core function.Forum: Fixing WordPress
In reply to: forgot password on wordpress not workingHello micheleeyamin,
Do you mean clicking here (screenshot)?
Forum: Fixing WordPress
In reply to: I keep getting this error messageCan you copy and paste the warning message from a different theme (optimizer for example)?
Forum: Fixing WordPress
In reply to: Set page layout to boxed (small)Hello vivendi,
not all themes have multiple layouts (template) types, so you might be out of luck. The option to choose a different template is located in the Page Attributes box when editing a page (screenshot).
You might also try writing at Layers support forums or at the support forums of that WooCommerce theme.
Forum: Fixing WordPress
In reply to: Prepopulated Username Field on login?Hello AlexanderJones,
unfortunately, I know of no such plugin which could do that. However, if your only concern is that only pre-registered users can access the site, well, if a random, not registered visitor tries to login into your site, he won’t know of any pre-registered usernames so he won’t be able to log in. Only the people who know their username/password are able to log in.
Forum: Fixing WordPress
In reply to: I keep getting this error messageHello TygaClothing,
You mentioned that it occurs on any theme, but from the error message, it seems like it has something to do with the pglider theme you are using. Can you try to switch to a different theme and if the warning displays again paste it here?
Forum: Fixing WordPress
In reply to: Non WWW to WWWHello,
if it’s generally working fine, there might be a problem with links which are hard-coded (specified manually) and not controlled by site_url or home (url). In that case, try using Velvet Blues Update URLs plugin. It goes through your database and replaces all occurrences of the old url with the new one.
Forum: Hacks
In reply to: Grab posts from recently created categoryHello codeguerrilla,
we can do this in two steps:
- Get the last created category ID
- Get posts from this category
Step 1.
We use the get_terms function.
$latest_category_ids = get_terms( 'category', // taxonomy name, in our case 'category' array( 'orderby' => 'id', // newest records in DB have the highest ID number 'order' => 'DESC', // get the latest -> descending ordering 'number' => 1, // get only the last one 'fields' => 'ids' // get the latest category ID field only, faster a bit :D ) ); // get_terms returns an array even if there is just a single item in it $latest_category_id = $latest_category_ids[0];
Step 2.
We use the get_posts function to retrieve some posts from the DB.
$args = array( 'posts_per_page' => 5, // how many of posts do you want? 'category' => $latest_category_id, // the latest category ID 'post_type' => 'post' //get only posts, not pages etc ); $posts_array = get_posts( $args );
Forum: Hacks
In reply to: Archive SetupHello baileev2,
have a look at these articles:
Forum: Hacks
In reply to: 10, 2 50, 2 driving me nuts!!!Your question is not clear. I assume
add_login_logout_to_menu', 50, 2 );
actually means eitheradd_filter('add_login_logout_to_menu', 50, 2 );
or
add_action('add_login_logout_to_menu', 50, 2 );
Then those parameters represent the priority and number of accepted arguments, respectively. Read more at add_action() WordPress Codex
Forum: Hacks
In reply to: Passing Multidimensional arrays and Associative arrays to plugin shortcodesExactly what I meant. Alright then,
json_encode
is probably better than manually parsing strings and stuff. ??Forum: Hacks
In reply to: Passing Multidimensional arrays and Associative arrays to plugin shortcodesThey would only enter an ID or name of the stored configuration so JS would then know what to request. The downside is that the configurations will have to be created in PHP/DB beforehand. If those people are not technical, an administrative screen for that purpose would be also necessary.
Forum: Hacks
In reply to: Passing Multidimensional arrays and Associative arrays to plugin shortcodesI understand you now. Well, I got one more idea to share. What about using admin-ajax and getting the chart data from WordPress with AJAX requests after the page has been loaded? It would be a bit slower (additional request, etc) but a bit nicer (doesn’t have to pass data through post/page). You would store the data in PHP/DB and encode them into JSON when the AJAX request arrives.