Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • Hi Devin,
    thanks for your reply. How wordpress handles this issue is very annoying. Have you never thought about a workaround?
    As you can see, I have implemented a sidebar menu for the portfolio (http://goo.gl/8Mu5Rl). It works with a function requesting the ancestors up to the top and then again listing the child elements. For each portfolio entry I added the id of the container page to the database by hand.
    I tried using this function in combination with a filter described by wordpress here: How to add a parent class for menu item this is the code:

    add_filter( 'wp_nav_menu_objects', 'add_menu_parent_class' );
    function add_menu_parent_class( $items ) {
    	
    	$parents = array();
    	foreach ( $items as $item ) {
    		if ( $item->menu_item_parent && $item->menu_item_parent > 0 ) {
    			$parents[] = $item->menu_item_parent;
    		}
    	}
    	
    	foreach ( $items as $item ) {
    		if ( in_array( $item->ID, $parents ) ) {
    			$item->classes[] = 'menu-parent-item'; 
    		}
    	}
    	
    	return $items;    
    }

    I tried to change it a little bit and to compare the retrieved items with my topmost parent page ID, which is the page that contains the portfolio entries, but it seems this is comparing apples and oranges.

    I try to adapt my wordpress theme to my needs but have only little knowledge of wordpress and php as well. So before searching for a solution for hours and hours maybe you could give me a hint where to search or just say leave it because it’s digging too deep into the core of wordpress.

    Regards

    in reply to: Problems with slider since wp update 3.6 #137177

    Hi Ismael,

    thanks for the hint with the cufon elements. It was not a plugin. I had made a change to the header.php. For some reason I added the id “#wrapper_featured_area” to the variable $applyCustomFontTo. I fixed it, removed your recommended style definition and everything works fine again.

    Thanks for your help.

    Crazygirl

    Hi Devin,

    ok, by reading your post a second time, I realised that my problem got nothing to do with avisio but with some core functions. I searched the internet and found a solution here:

    The code one has to add to the functions.php goes like this:

    Code:
    remove_filter(‘get_the_excerpt’, ‘wp_trim_excerpt’);
    add_filter(‘get_the_excerpt’, ‘custom_trim_excerpt’);

    function custom_trim_excerpt($text = ”)
    {
    $raw_excerpt = $text;
    if ( ” == $text ) {
    $text = get_the_content(”);

    //$text = strip_shortcodes( $text );

    $text = apply_filters(‘the_content’, $text);
    $text = str_replace(‘]]>’, ‘]]>’, $text);
    $excerpt_length = apply_filters(‘excerpt_length’, 55);
    $excerpt_more = apply_filters(‘excerpt_more’, ‘ ‘ . ‘[...]‘);
    $text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
    }
    return apply_filters(‘wp_trim_excerpt’, $text, $raw_excerpt);
    }
    add_filter(‘the_excerpt’, ‘do_shortcode’);

    It works fine but even if it works it might no be good to use it. My knowledge about programming wordpress is very little. So do you think this is an appropriate solution?

    regards

    Unfortunately this didn’t help.

    regards

    Hello Devin,

    nice to know how it works. I realised myself, that links are removed in the widgets. But by using a normal link with the anchor tag, the tag is being removed while the text between opening and closing tag is kept. In my case everything is removed. RB internal links plugin is using a shortcode that goes like [intlink id="464" type="post"]link_to_internal_post[/intlink] and other internal link plugin work similar.

    Handling internal links so that you don’t need to revise them every time you change the permalink structure is crucial for SEO.

    It shouldn’t be too difficult to filter shortcodes the same way as anchor tags or am I mistaken?

    Regards crazygirl

    Well, I suppose, changing the database input is not a question of editing the theme but the wordpress core and not easy at all. Otherwise you would have mentioned it. In this case I will leave everything as it is and keep fumbling in the database myself.

    Thanks for adding my request to Kriesi’s list and thanks for your patience.

    crazygirl

    Quote:
    I was asking if you could attach a video so that the Latest Video widget would contain it because I need to see the code, otherwise I would have to create all this on my home installation.

    Ok, I added the “featured image” and as I did so, I remembered, I did it before and that in the database I added the post_parent to each portfolio entry and with that I could create the same side menu which appears on the video overview page ( http://goo.gl/xUQ1k).

    My aim is to show the visitor all available videos after he clicked one. So this would be my second choice solution to show the visitor the titles of the other videos in the sidebar menu.

    First choice would still be the solution I asked you for.

    Quote:
    Would it be ok with you if the Latest Video links in the widget are clicked on any page, they would open a lightbox right on that page and play the videos?

    No, I would prefer the overview page to open first and after that the lightbox, so that one can click through all available videos within the lightbox.

    If this is too difficult, maybe it is easy for you to change the database input for newly created portfolio entries in the way that the category is automatically added to the field post_parent, so I could stick to solution no. 2 without adding the category by hand.

    Regards

    crazygirl

    ok, for eliminating the “read more” button, I found a solution myself by editing the template_portfolio.php. On line 193 I changed

    .

    to

    Code:
    if ($overview_post_id!=123) {
    echo ““.__(‘Read more’,'avisio’).”“; }

    Quote:
    But what would you like it to play? The link points to a portfolio item page that needs to have a video that is associated with that portfolio item. Right now you have no video associated with that portfolio item

    I did associate a video with that portfolio item. In the backend I entered a video link at the ” Full Size Pic/Video Input field”. The page I sent you the link ( http://goo.gl/xUQ1k) for shows the preview images of every portfolio item and by clicking on it the associated video opens in the lightbox.

    Unfortunately I don’t understand the rest of your answer. Everything you write after “Reference” seems to be the answer to my request but appears to me quite hieroglyphic.

    Regards

    crazygirl

    This link goes to the overview page with the videos http://goo.gl/xUQ1k.

    If you scoll down the page to the footer, you will find a sidebar widget called “latest videos”. If you click on one of the links beneath, you will see it leads to an almost empty page, respectively the portfolio-entry. Instead I want them to lead to the page where you are at the moment and to open the equivalent video automatically.

    As to your reply concerning the “read more” button: of course I can comment out the mentioned code but I need it for the other categories.

    Hope you understand what i mean.

    Regards

    in reply to: Avisio Portfolio Video Preview #93891

    Hi, Devin, thanks for your reply and your offer to help with the regular images. As I mentioned before, I don’t worry about the automatic preview for regular images because it’s not a big thing filling 2 input fields with the link to the already uploaded photos.

    Creating a new image as preview for the linked videos, thats a big thing but alas I have to live with it.

    So we can mark this thread as resolved.

    Regards

Viewing 10 posts - 1 through 10 (of 10 total)