Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter li-chong

    (@li-chong)

    Solution found. For the record, if someone else is having the same trouble:

    Deactivate Custom CSS module.

    Obviously, someone using a child theme doesn’t need use Custom CSS module.

    Lot of thanks, Anders!

    Thread Starter li-chong

    (@li-chong)

    I’ve found the problem.

    Something in Jetpack is loading the css of the parent twice.

    Your code works.

    Thanks!!

    Now i must to figure what is wrong on Jetpack…

    • This reply was modified 7 years, 3 months ago by li-chong.
    Thread Starter li-chong

    (@li-chong)

    Thanks for your answer!

    That code doesn’t worked.

    I’ve used

    function enqueue_theme_styles() {
      wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
      wp_enqueue_style( 'child-style', get_stylesheet_directory_uri(). '/style.css', array('parent-style') );
    }
    add_action( 'wp_enqueue_scripts', 'enqueue_theme_styles', PHP_INT_MAX );

    instead, but again, i get the parent css loaded twice; once before the child and the second after the child, overwriting styles.

    I’ve readed that the solution will be de-enqueue the parent css, then enqueue the parent and then the child, but i don’t know if that will be correct with your theme future plans.

    I will be keep looking for the solution, if you get an idea, let me know to research.

    Thanks again!

    EDIT: Pasted the wrong code. Now fixed.

    • This reply was modified 7 years, 3 months ago by li-chong.
    Thread Starter li-chong

    (@li-chong)

    Lots of thanks for your help and time. I was three days on stackoverflow giving rounds and rounds without answer.

    Thread Starter li-chong

    (@li-chong)

    WOW

    It seems it’s working!!!

    You’re really awesome.

    Lots of thanks!!

    Thread Starter li-chong

    (@li-chong)

    I don’t need pagination, it’s only to show some posts in the home page.

    Well, renamed the query and it outputs no posts.

    The query_dump is:

    object(WP_Query)#3930 (46) { ["query"]=> array(2) { ["post_type"]=> string(4) "post" ["tax_query"]=> array(2) { ["relation"]=> string(3) "AND" [0]=> array(3) { ["taxonomy"]=> string(9) "ubicacion" ["field"]=> string(4) "slug" ["terms"]=> array(1) { [0]=> string(14) "ruperto-concha" } } } } ["query_vars"]=> array(64) { ["post_type"]=> string(4) "post" ["tax_query"]=> array(2) { ["relation"]=> string(3) "AND" [0]=> array(3) { ["taxonomy"]=> string(9) "ubicacion" ["field"]=> string(4) "slug" ["terms"]=> array(1) { [0]=> string(14) "ruperto-concha" } } } ["error"]=> string(0) "" ["m"]=> string(0) "" ["p"]=> int(0) ["post_parent"]=> string(0) "" ["subpost"]=> string(0) "" ["subpost_id"]=> string(0) "" ["attachment"]=> string(0) "" ["attachment_id"]=> int(0) ["name"]=> string(0) "" ["static"]=> string(0) "" ["pagename"]=> string(0) "" ["page_id"]=> int(0) ["second"]=> string(0) "" ["minute"]=> string(0) "" ["hour"]=> string(0) "" ["day"]=> int(0) ["monthnum"]=> int(0) ["year"]=> int(0) ["w"]=> int(0) ["category_name"]=> string(0) "" ["tag"]=> string(0) "" ["cat"]=> string(0) "" ["tag_id"]=> string(0) "" ["author"]=> string(0) "" ["author_name"]=> string(0) "" ["feed"]=> string(0) "" ["tb"]=> string(0) "" ["paged"]=> int(0) ["comments_popup"]=> string(0) "" ["meta_key"]=> string(0) "" ["meta_value"]=> string(0) "" ["preview"]=> string(0) "" ["s"]=> string(0) "" ["sentence"]=> string(0) "" ["fields"]=> string(0) "" ["menu_order"]=> string(0) "" ["category__in"]=> array(0) { } ["category__not_in"]=> array(0) { } ["category__and"]=> array(0) { } ["post__in"]=> array(0) { } ["post__not_in"]=> array(0) { } ["tag__in"]=> array(0) { } ["tag__not_in"]=> array(0) { } ["tag__and"]=> array(0) { } ["tag_slug__in"]=> array(0) { } ["tag_slug__and"]=> array(0) { } ["post_parent__in"]=> array(0) { } ["post_parent__not_in"]=> array(0) { } ["author__in"]=> array(0) { } ["author__not_in"]=> array(0) { } ["ignore_sticky_posts"]=> bool(false) ["suppress_filters"]=> bool(false) ["cache_results"]=> bool(true) ["update_post_term_cache"]=> bool(true) ["update_post_meta_cache"]=> bool(true) ["posts_per_page"]=> int(10) ["nopaging"]=> bool(false) ["comments_per_page"]=> string(2) "50" ["no_found_rows"]=> bool(false) ["taxonomy"]=> string(9) "ubicacion" ["term"]=> string(14) "ruperto-concha" ["order"]=> string(4) "DESC" } ["tax_query"]=> object(WP_Tax_Query)#3840 (2) { ["queries"]=> array(1) { [0]=> array(5) { ["taxonomy"]=> string(9) "ubicacion" ["terms"]=> array(1) { [0]=> string(14) "ruperto-concha" } ["include_children"]=> bool(true) ["field"]=> string(4) "slug" ["operator"]=> string(2) "IN" } } ["relation"]=> string(3) "AND" } ["meta_query"]=> object(WP_Meta_Query)#3934 (2) { ["queries"]=> array(0) { } ["relation"]=> NULL } ["date_query"]=> bool(false) ["request"]=> string(255) "SELECT SQL_CALC_FOUND_ROWS duk_posts.ID FROM duk_posts WHERE 1=1 AND 0 = 1 AND duk_posts.post_type = 'post' AND (duk_posts.post_status = 'publish' OR duk_posts.post_status = 'private') GROUP BY duk_posts.ID ORDER BY duk_posts.post_date DESC LIMIT 0, 10" ["posts"]=> array(0) { } ["post_count"]=> int(0) ["current_post"]=> int(-1) ["in_the_loop"]=> bool(false) ["comment_count"]=> int(0) ["current_comment"]=> int(-1) ["found_posts"]=> int(0) ["max_num_pages"]=> int(0) ["max_num_comment_pages"]=> int(0) ["is_single"]=> bool(false) ["is_preview"]=> bool(false) ["is_page"]=> bool(false) ["is_archive"]=> bool(true) ["is_date"]=> bool(false) ["is_year"]=> bool(false) ["is_month"]=> bool(false) ["is_day"]=> bool(false) ["is_time"]=> bool(false) ["is_author"]=> bool(false) ["is_category"]=> bool(false) ["is_tag"]=> bool(false) ["is_tax"]=> bool(true) ["is_search"]=> bool(false) ["is_feed"]=> bool(false) ["is_comment_feed"]=> bool(false) ["is_trackback"]=> bool(false) ["is_home"]=> bool(false) ["is_404"]=> bool(false) ["is_comments_popup"]=> bool(false) ["is_paged"]=> bool(false) ["is_admin"]=> bool(false) ["is_attachment"]=> bool(false) ["is_singular"]=> bool(false) ["is_robots"]=> bool(false) ["is_posts_page"]=> bool(false) ["is_post_type_archive"]=> bool(false) ["query_vars_hash"]=> string(32) "59845273dbb869415cd226475ac701fc" ["query_vars_changed"]=> bool(false) ["thumbnails_cached"]=> bool(false) ["stopwords":"WP_Query":private]=> NULL }

    The code tested is:

    <div class="contenidoportada1 left">
    
    		<?php if (have_posts()) : ?>
    <?php
     $args = array(
        'post_type' => 'post',
        'tax_query' => array(
            'relation' => 'AND',
            array(
                'taxonomy' => 'ubicacion',
                'field' => 'slug',
                'terms' => array( 'ruperto-concha'),
            ),
    
        )
     );
     $wp_query = new WP_Query( $args );
     ?>
    <?php var_dump($wp_query) ?>
    
    		<div class="posts">
    
    				    	<?php while (have_posts()) : the_post(); ?>
    
    					<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    Thread Starter li-chong

    (@li-chong)

    This is output

    WOW

    Thread Starter li-chong

    (@li-chong)

    Theme is hemingway.

    This is output

    https://pastebin.com/EicsFh7n

    This is the code.

    <?php get_header(); ?>
    
    <div class="wrapper section-inner">
    
    	<div class="contenidoportada1 left">
    
    		<?php if (have_posts()) : ?>
    <?php
     $args = array(
        'post_type' => 'post',
        'tax_query' => array(
            'relation' => 'OR',
            array(
                'taxonomy' => 'ubicacion',
                'field' => 'slug',
                'terms' => array( 'ruperto-concha', 'estallido', 'vineta', 'vitrina', 'letrero', 'plenoempleo', 'primero' ),
                        'operator' => 'NOT IN'
            ),
            array(
                'taxonomy' => 'category',
                'field' => 'slug',
                'terms' => array( 'las-informasiones' ),
                'operator' => 'NOT IN'
            )
        )
     );
     $query = new WP_Query( $args );
     ?>
    
    		<div class="posts">
    
    				    	<?php while (have_posts()) : the_post(); ?>
    
    					<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

    This is the code to generate the custom post taxonomy:

    function register_taxonomy_ubicacion() {
    
        $labels = array(
            'name' => _x( 'Ubicaciones', 'ubicacion' ),
            'singular_name' => _x( 'Ubicación', 'ubicacion' ),
            'search_items' => _x( 'Hurgar en ubicaciones', 'ubicacion' ),
            'popular_items' => _x( ' Ubicaciones más usadas', 'ubicacion' ),
            'all_items' => _x( 'Todos', 'ubicacion' ),
            'parent_item' => _x( 'Parent Ubicación', 'ubicacion' ),
            'parent_item_colon' => _x( 'Parent Ubicación:', 'ubicacion' ),
            'edit_item' => _x( 'Editar', 'ubicacion' ),
            'update_item' => _x( 'Actualizar Ubicación', 'ubicacion' ),
            'add_new_item' => _x( 'A?adir Ubicación', 'ubicacion' ),
            'new_item_name' => _x( 'Nueva Ubicación', 'ubicacion' ),
            'separate_items_with_commas' => _x( 'separelas con comas', 'ubicacion' ),
            'add_or_remove_items' => _x( 'A?adir o remover ubicación', 'ubicacion' ),
            'choose_from_most_used' => _x( 'Escoger de las más usadas', 'ubicacion' ),
            'menu_name' => _x( 'Ubicaciones', 'ubicacion' ),
        );
    
        $args = array(
            'labels' => $labels,
            'public' => true,
            'show_in_nav_menus' => true,
            'show_ui' => true,
            'show_tagcloud' => false,
            'show_admin_column' => true,
            'hierarchical' => false,
            'rewrite' => true,
            'query_var' => true
        );
    
        register_taxonomy( 'ubicacion', array('post'), $args );
    }

    Thread Starter li-chong

    (@li-chong)

    <?php
     $args = array(
        'post_type' => 'post',
        'tax_query' => array(
            'relation' => 'OR',
            array(
                'taxonomy' => 'category',
                'field' => 'slug',
                'terms' => array( 'desechos' ),
                'operator' => 'NOT IN'
            )
        )
     );
     $query = new WP_Query( $args );
     ?>

    Not work.

    <?php
     $args = array(
        'post_type' => 'post',
        'tax_query' => array(
            'relation' => 'OR',
            array(
                'taxonomy' => 'ubicacion',
                'field' => 'slug',
                'terms' => array( 'ruperto-concha', 'estallido', 'vineta', 'vitrina', 'letrero', 'plenoempleo', 'primero' ),
                        'operator' => 'NOT IN'
            ),
         )
     );
     $query = new WP_Query( $args );
     ?>

    Not work.

    <?php query_posts('cat=-3'); ?>

    It works, but it doesn’t what i need.

    This is really weird.

    Thread Starter li-chong

    (@li-chong)

    Same result.

    Thread Starter li-chong

    (@li-chong)

    More info:

    If you can’t understood what i need, i need to do a custom query.

    So, Where i put the custom query on the loop of Hemingway.

    That’s all.
    Thanks for your time.

    Go to css and look for this rule:

    .post-title {
    font-size: 2.5em;
    font-weight: 700;
    line-height: 120%;
    margin-bottom: 15px;
    font-family: ‘Lato’, sans-serif;

    -ms-word-break: break-all;
    word-break: break-word;

    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
    }

    Changing the value in “font-size: 2.5em;” should work.

Viewing 12 replies - 1 through 12 (of 12 total)