Andreiu Viorel
asked 6 years ago

I wan’t to add a “Advertisment” below ” Tags” . It is posibble?
 
I Have a screen
 

 
 

Andreiu Viorel
replied 6 years ago
Kutluhan Akkoyun
replied 6 years ago

Yes you can. Is that place a sidebar right ?

2 Answers
Kido D
answered 6 years ago

Hi Andreiu,

To resolve this issue, please open up the functions.php file in themes/dw-focus folder, find the code below (around line 446):

 <?php endif; // End if $tags_list ?>

.. and change it into this:

 <?php endif; // End if $tags_list ?>
<div class="ads-action">
<a href="#"><img src="http://placehold.it/160x160"></a>
</div>

Hope this helps!

Andreiu Viorel
replied 6 years ago

HELLO ADMIN AGAIN. I came across another problem. I want to add to the Related Post to appear in place of 3 posts to be 6 by SinglePost.php but when I changed the 3 to 6 and i saved I look like this . I HAVE screen http://i58.tinypic.com/2iadfyo.jpg . How can I align them

Dominic Staff
replied 6 years ago

I have checked your site, I think you have resolved this issue.

Andreiu Viorel
replied 6 years ago

Possible that you have not understood what I want. The related post now is with three topics. I want you to show the six topics. I tried this by single.php on line 28 but it looks like the image shown above. How can I align them?

Kido D
answered 6 years ago

Hi Andreiu,
To resolve the issue in Related Post, please go to Dashboard / Appearances / Customize / General Settings, and add the code below to Header Code:

<style>
.single .site-content .related-post .hentry:nth-child(3n+1) {
margin-left: 0;
clear: left;
}
</style>

Hope this helps!

Andreiu Viorel
replied 5 years ago

She’s work. Thank you.

Related Post by Category it’s possiblie?

Now related post is by “tags” I think

I have the code by tags here :

< ?php $orig_post = $post;
global $post;
$tags = wp_get_post_tags($post->ID);
if ($tags) {
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args=array(
'tag__in' => $tag_ids,
'post__not_in' => array($post->ID),
'posts_per_page'=>5, // Number of related posts that will be shown.
'caller_get_posts'=>1
);
$my_query = new wp_query( $args );
if( $my_query->have_posts() ) {

echo '

';
}
}
$post = $orig_post;
wp_reset_query(); ?>

I HAVE THE CODE BY CATEGORY HERE:

< ?php $orig_post = $post;
global $post;
$categories = get_the_category($post->ID);
if ($categories) {
$category_ids = array();
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;

$args=array(
'category__in' => $category_ids,
'post__not_in' => array($post->ID),
'posts_per_page'=> 2, // Number of related posts that will be shown.
'caller_get_posts'=>1
);

$my_query = new wp_query( $args );
if( $my_query->have_posts() ) {
echo '

';
}
}
$post = $orig_post;
wp_reset_query(); ?>

I WAN’T TO ADD in single.php code by “category” ..how is posibble?

Powered by DW Question & Answer Pro