morollian
Forum Replies Created
-
Forum: Themes and Templates
In reply to: how to remove sidebar on custom front page ??I’ve realized it is not width that is set to 66.874 rem, but max-width, so in order to force width to full screen you need a little change, try this:
function fullwidth_body() { if (is_home()): echo "<script type='text/javascript'>$('.site').css('max-width','100%');</script>"; endif; } add_action('wp_footer','fullwidth_body');
Of course if your theme supports it, or you have the custom css plugin I told you, you can enter the code below in your backend custom CSS panel and it will work as well:
.home .site { max-width:100%; }
Hope it helps, let me know if it worked, otherwise I would need to see some of your code…
Forum: Themes and Templates
In reply to: how to remove sidebar on custom front page ??The solution I’ve posted is just to be used on a child theme or a custom theme, if this is not your case do not modify your themes files (the canges would be lost when you update your theme).
Try adding this CSS – to custom CSS if the theme has it or add via a custom CSS plugin:
.home .site { width:100%; }
Forum: Fixing WordPress
In reply to: Home Menu Hide?Of course Is better to do a child theme (actually is the only thing that people should do), but I didn’t know that Allex wasnt using a custom theme… Anyway your aproach is much easier..
I would keep that in mind WPyogi ??
Forum: Fixing WordPress
In reply to: Home Menu Hide?Try changing thes line:
echo "<script type='text/javascript'>$('.menu').css('display','none');</script>";
for this one:
echo "<script type='text/javascript'>$('.nav-wrapper').css('display','none');</script>";
Forum: Fixing WordPress
In reply to: Home Menu Hide?I guess the ideal solution would be to use the conditional tag is_home() in the template file header.php (or the template file your theme is using to display the header) to tell wordpress to display the menu in every page but home.
If you are not into theme developing, I would recomend doing it with jQuery+CSS. Just paste the following code at the end of your funcitons.php flie, is not the perfect solution, but it will work (assuming that your menu has the class .menu, otherwise I would need to see your code, or at least a link to your website, to change it by the proper CSS class):
function hide_menu() { if (is_home()): echo "<script type='text/javascript'>$('.menu').css('display','none');</script>"; endif; } add_action('wp_footer','hide_menu');
Hope it helps!
Forum: Themes and Templates
In reply to: how to remove sidebar on custom front page ??As I can see in your page, your #page div has de class .site. In your css file it’s width is set to 67’5 rem.
I would change it using a simple jQuery script hooked to the wp_footer, try adding this code to your functions.php file:
function fullwidth_body() { if (is_home()): echo "<script type='text/javascript'>$('.site').css('width','100%');</script>"; endif; } add_action('wp_footer','fullwidth_body');
Forum: Fixing WordPress
In reply to: WP3.6 custom fields dropdown with strange behaviour after updateSometimes when you need just specific fields to display in the backend it’s easier to use meta_boxes (codex reference). But I understand that was not an option for some reason…
Anyway, didn’t the jquery solution by cizko worked for you? It can be a litte tricky to mess with the database, but if you find yourself with no other option, allways remember to backup first!
Forum: Fixing WordPress
In reply to: WP3.6 custom fields dropdown with strange behaviour after updateGreat workaround cizko!
Daffydd57, about those values you where missing in the dropdown:
Wordpress, by default, will only list up to 30 custom fields. Sometimes that is not enough. In those cases I recomend you to try this plugin https://www.ads-software.com/plugins/list-more-custom-field-names/ by Scott Reilly.This plugin increases the limit to 200 custom field key names.
It’s light, easy to use and understand, and it gets the job done.Forum: Fixing WordPress
In reply to: single.php only showing the latest postObviously! I feel dumb now… Is right there
<?php query_posts('post_type=catalogue&posts_per_page=1');
As you said, wordpress usually does exactly as it’s told…
I removed the query_posts line and it works just fine..
Thanks a lot WPRanger!
Forum: Plugins
In reply to: [Polylang] Problem getting the post metaThank you for answering so quick!
I’m not getting any errors, and the code works in the main language. I’m using this code in the main Loop.
What surprises me the most is that using
<?php the_meta()?>
instead, it echoes all the values, which means that in some way Polylang is actually synchronizing the custom fields, but when trying to get them separately using their key, it just won’t work…Finnally I won’t need to sych them for this project, but I keep working on it for testing purposes.
Forum: Fixing WordPress
In reply to: Using the_meta() in a single-{slug}I solved it using <?php the_meta(); ?> instead, and styling the
<ul>
and
<li>
elements that this function returns and echoes.The CSS class that WP gives to this elements are:
.post-meta (for the
<ul>
element)
.post-meta-key (for the
<li>
elements).That worked great for me,
You can find more info here in the codex
Forum: Plugins
In reply to: Single-posttype.phphi girll,
First of all add this to your functions.php file:
function my_custom_init() { $labels = array( 'name' => 'your_post_type_name', 'singular_name' => 'your_post_type_name(in singular)', 'add_new' => 'New your_post_type_name', 'add_new_item' => 'New your_post_type_name', 'edit_item' => 'Edit your_post_type_name', 'new_item' => 'New your_post_type_name', 'all_items' => 'All your_post_type_name', 'view_item' => 'View your_post_type_name', 'search_items' => 'Search your_post_type_name', 'not_found' => 'No your_post_type_name where found', 'not_found_in_trash' => 'No your_post_type_name where found in the trash', 'parent_item_colon' => '', 'menu_name' => 'No your_post_type_name where found' ); $args= array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'your_post_type_name' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => 5, //this is the position on your dashboard menu, 5 means under the Post item. 'taxonomies' => array ('post_tag'), 'supports' => array( 'title', 'editor', 'author', 'thumbnail' ) //this ads which features does your post type suports ); register_post_type( 'your_post_type_name', $args ); } add_action( 'init', 'my_custom_init' ); //this is an action hook, it says to WP that this function must be executed at 'init'
This will make your post type apear on your admin dashboard.
Then you create a file named single-{your_post_type_name}.php in your template folder.
ie: if your post type name is Book the file should be named single-book.php.And that would be all. Hope it works for you!
You should also hava a look to the codex, it’s usually really helfull: post types
Forum: Plugins
In reply to: [Knews Multilingual Newsletters] Resizing imagesThanks a lot!
Now it works great, I didn’t know height and width atributes where a requirement, now it’s all working great.Now im working to make the stmp work with 1and1, If I find a way I’ll let you know, but that’s another issue…
Thanks fot heplping!
Regards,
Forum: Plugins
In reply to: [Knews Multilingual Newsletters] Resizing imagesSending!
Forum: Plugins
In reply to: [Knews Multilingual Newsletters] Resizing imagesI’ve tried with images bigger than the originals in the template, and it still doesn’t work.
For example, in the heading of my template there is an image, placed using this code:
‘<tr><td align=”center”><img class=”editable” src=”images/finestres_verdes.jpg”/></td></tr>’
The image is 172×400 pixels, and I’m trying to place one wich is also JPG and its 1024×768 px.
I have also tryed with an image wich has the exact same size, but it doesn’t work.
I don’t know what I’m doing wrong.
Thanks for helping!