Forum Replies Created

Viewing 15 replies - 91 through 105 (of 113 total)
  • Could you share your code in which way you get YARPP block in your content? Php handler and JS.

    Thank you in advance!

    I propose to add option to use external templates (like yarpp).
    I’ve faced with how to do customisation of outputs and it’s not convenient to write my own function which completely duplicates plugin function except few lines of code.

    It would be great if you will add this functionality.

    Thank you in advance Ajay!

    My site contetn wont load correctly when I loged in to wordpress in Internet Explorer 11.

    Thread Starter Slams

    (@slams)

    The funny thing is that post is not paginated. You can enter an random number and you got the same content that you have on main page. This is strange wordpress bug.

    Also, I’ve just discovered, if I uncheck “Canonical URL’s”, WordPress set correct canonical URL’s to maint page of the post.

    And Thank you for the function. I will try it.

    Thread Starter Slams

    (@slams)

    Peter,

    Unfortunantely I don’t know how to redirect back to the main page of the post ??

    But, I noticed that many wordpress users don’t know that thay have pagination and dublication problems. 99% of websites from the search affected with this post pagination dublication. Imagine that somebody will want to use black seo to remove their competitor from SERP. They just need to notify search engines about this pages.

    Old 1.6.* version of the AIO Seo have had a correct rel=”canonical” to main page of the post.

    P.S. If you know how to code /*number*/ to original post redirector or where I can find it, please, post it here.

    Thank you in advance!

    Have the same issue. I’m always editing plugin after update to achieve Recipe markup to work.

    Thread Starter Slams

    (@slams)

    It’s boring that my code has been removed ??

    Yes, the problem persists.

    https://pastebin.com/pmJ9i79q <- CPT and Tax code

    Pictures:

    CPT-onomies Disabled
    Selected parent category – /vtorie-blyuda/
    Image 1
    echo $GLOBALS[‘wp_query’]->request;:

    SELECT SQL_CALC_FOUND_ROWS  wpcook_posts.ID FROM wpcook_posts  INNER JOIN wpcook_term_relationships ON (wpcook_posts.ID = wpcook_term_relationships.object_id) WHERE 1=1  AND ( wpcook_term_relationships.term_taxonomy_id IN (2444,2455,2456,2457,2458,2459,2460) ) AND wpcook_posts.post_type = 'recipe' AND (wpcook_posts.post_status = 'publish' OR wpcook_posts.post_status = 'private') GROUP BY wpcook_posts.ID ORDER BY wpcook_posts.post_date DESC LIMIT 0, 12

    CPT-onomies Enabled
    Selected parent category – /vtorie-blyuda/
    There are no posts assigned to this category
    Image 2
    echo $GLOBALS[‘wp_query’]->request;:
    No query shown

    CPT-onomies Enables with post assigned
    Selected parent category – /vtorie-blyuda/
    1 post assigned to parent category.
    Image 3
    echo $GLOBALS[‘wp_query’]->request; :

    SELECT SQL_CALC_FOUND_ROWS  wpcook_posts.ID FROM wpcook_posts  INNER JOIN wpcook_term_relationships ON (wpcook_posts.ID = wpcook_term_relationships.object_id) INNER JOIN wpcook_term_relationships AS cpt_onomy_tt1 ON (wpcook_posts.ID = cpt_onomy_tt1.object_id) WHERE 1=1  AND ( wpcook_term_relationships.term_taxonomy_id IN (2444,2455,2456,2457,2458,2459,2460) ) AND wpcook_posts.post_type = 'recipe' AND (wpcook_posts.post_status = 'publish' OR wpcook_posts.post_status = 'private') AND ( cpt_onomy_tt1.term_taxonomy_id IN (2444,2465,2466,2467,2468,2469) ) GROUP BY wpcook_posts.ID ORDER BY wpcook_posts.post_date DESC LIMIT 0, 12

    In all cases, loading taxonomy-recipe_type.php that you can find in my previous post.

    Thank you for your help again!

    Thread Starter Slams

    (@slams)

    My taxonomy-recipe_type.php

    <?php get_header(); ?>
    
    	<div id="title-wrapper-cat">
    
    		<header id="title-cat">
    
    			<div class="title-text archive">
    				<?php if (have_posts()) : ?>
    
    				<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?>
    					 <h1 class="page-title"><?php echo $term->name; ?></h1>
    
    	</div>
    
    		</header>
    
    	</div>
    
    	<div id="crumbs-wrapper">
    
    		<?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?>
    
    	</div>
    
    	<div id="wrapper">
    
    		<div id="main">
    
    		<section class="post-block archive more-button">
    
    			<?php 
    
    			while (have_posts()) : the_post();?>
    
    				<article class="post-item-grid">
    
    					<?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) { /* if post has a thumbnail */ ?>
    						<div class="grid-photo"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Постоянная ссылка: <?php the_title(); ?>"><?php the_post_thumbnail('grid-thumb'); ?><span><?php echo get_post_meta($post->ID, "foodpress_cooking_time", true); ?></span></a></div>
    					<?php } ?>
    					<header>
    					<h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Постоянная ссылка: <?php the_title(); ?>"><span><?php the_title(); ?><i></i></span></a></h2></header>
    
    					<div class="post-item-grid-meta">
    						<span>Рубрики:
                            <?php
    							$key = 0;
    							 foreach(get_the_terms($post->ID, 'recipe_type') as $category) {
    								if ($key>0) echo ', ';
    								 echo '<a class="category" href="'.get_term_link($category->slug, 'recipe_type').'" title="Просмотреть все записи в рубрике ?'.$category->name.'?">'.$category->name.'</a>';
    								$key++;
    							 }
    						?>
    						</span>
    					</div>
    
    				</article>
    			<pre>
    				<?php 
    
    				print_r($GLOBALS['wp_query']);
     ?>
     </pre>
    		<?php endwhile; ?>
    		</section>
    
            <div class="more-recieps" onclick="$('div.moreposts').slideUp();">Еще рецепты</div>
    
    		<?php kriesi_pagination(); ?>
    	<?php endif; ?>
    
    	</div>
    
        <?php
    
    ?>
    
    		<!-- END MAIN -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Thread Starter Slams

    (@slams)

    URL: https://site.name/recepty/vtorie-blyuda/
    /recepty/ <- main archive for “recept” CTP
    /vtorie-blyuda/ <- parent category

    When CPT-onomies disabled:

    [ 913 lines of code moderated, that’s just way too much. For that many lines of code please use pastebin.com instead. ]

    I hope this will be useful for you. Tell me if you need more information.
    Thank you again for help!

    Thank you for explanation Rachel!

    I’ve rewrote this code using get_posts and get_post function. Everything work well but now it’s interesting which function is better for performance or it does not matter?

    I call this list of ingredients function by ajax and also use custom fields for each ingredient post.

    Thank you in advance again!

    Good day,

    I have hierarhical custom post type Ingredients which looks like

    Alcohol
    –Vodka
    –Sambuka
    Eggs
    –Chicken eggs
    –Crocodile eggs

    and so on.

    Ingrediens is marked up like taxonomy for cpt Recipe.

    I’m trying to get list of

    $ingredients_by_parent = get_terms( 'ingredients','orderby=name&parent=12229&hide_empty=0' );
    
                   foreach ($ingredients_by_parent as $ingredient)
                       {
                       echo '<li><a href="#" rel="'.$ingredient->term_id.'">'.$ingredient->name.'</a></li>';
    
                       }

    parent=12229 – Alcohol ID

    But I get all list of ingredients with parents. When I set hide_empty to 1, I get just 2 ingredient.

    This code worked fine when ingredients was as custom type taxonomy, but, because of I need to add several meta-boxes to ingredients I have to register ingredienta as custom post.

    Thank you for your great plugin and thank you in advance for help!

    Thank you for your time. I’ll try to use textarea

    <input type="text" value="<a href='https://delo-vcusa.ru/recepti/desertyi/shokoladny-e-bliny-s-tvorogom-sladkie-rolly-iz-blinchikov-s-persikami/'>Шоколадные блины с творогом. Сладкие роллы из блинчиков с персиками</a>" onclick="javascript:this.select()" readonly="" style="width: 100%;">

    Hmm, probably issue in & g t; and & l t; but I don’t know why < and > have been interpreted such way.

    <input type="text" value="<a href='<?php echo get_permalink(); ?>'><?php echo get_the_title();?></a>" onclick="javascript:this.select()" readonly style="width: 100%;" />

    In this way I’ve got a broken output:
    <input type="text" value="<a href=" .="" "="">

    Thank you for help!

    Thread Starter Slams

    (@slams)

    >> The option %%page%% already exists;
    Yes, it was, but where I should it put on?

    When I put it on home page title, My Title will be “MyBlogname – page 1 of 300”
    Second page “MyBlogname – page 2 of 300”

    But I want to: first page “MyBlogname”
    second page Second page “MyBlogname – page 2”

    Must be not only $page varibale but extended option for paged sites.

    >> the request words one is not that interesting in my opinion;

    Whithout this variable, how can I add to title 404 title oprion wrong phrase. Just like there https://wowgeek.ru/123123 ?

    >>try the development version, i think your titles aren’t working as well as they should.

    Do you understand what does I meant? Perhaps I can send to you screenshot with my options and the result?

    Thank you in advance.

Viewing 15 replies - 91 through 105 (of 113 total)