Before you ask please READ THIS

Text above media in single works, do not display page title

in FatMoon Posts: 293
Hi there
I still love your theme but in displaying my works (portfolio > single work) I'd like to have my text above the media (and below the page title) instead of having (in my case bricks album) the text below. Also I'd rather use my own titles instead of displaying the page title (when inactivating title bar eveything slides up and layout is ugly). And when using borders for the layout the works nav creates a gap whicht I'd like not to have. Can you help?
Thanks, Pascal
text-above-media.jpg
900 x 682 - 190K
text-above-media-part-2.jpg
900 x 629 - 89K

Comments

  • AirAir
    Posts: 10,970
    Hi there:-)

    You are asking here many questions but lets try to handle them somehow.
    FLYART said: Also I'd rather use my own titles instead of displaying the page title (when inactivating title bar eveything slides up and layout is ugly)
    You have option to disable title bar in each work in "Title bar settings". You can also disable it for all Works in Customizing ▸ Works settings ▸ Single work - title bar

    FLYART said: And when using borders for the layout the works nav creates a gap whicht I'd like not to have.
    Borders cover whole page layout - that is how they work. I don't understand your issue here. You can always switch off border layout in theme settings -> http://apollo13.eu/docs/fatmoon/#!/general_layout

    FLYART said: I'd like to have my text above the media (and below the page title) instead of having (in my case bricks album) the text below
    I don't know what result will it give but you can try such thing:
    Go to fatmoon\single-work.php line ~135 and cut out this code:
    <?php a13fatmoon_single_work_text_content($content); ?>

    Paste it in same file but line ~23 just below
    	a13fatmoon_title_bar();
    ?>
    
    With kind regards.
  • Posts: 293
    Hello and thank you for your fast reply

    You said: You have option to disable title bar in each work in "Title bar settings". You can also disable it for all Works in Customizing ▸ Works settings ▸ Single work - title bar
    > Yes but as written before this means that the whole page slides toward the top. I'd just like not to display the title but keept the top padding as it is so far

    You said: Borders cover whole page layout - that is how they work. I don't understand your issue here. You can always switch off border layout in theme settings -> http://apollo13.eu/docs/fatmoon/#!/general_layout
    Yes but I'd like to have borders in my content and have the work nav full width

    For the text above the media. Thanks for you code. Is there a way to code this into child theme. Else I am going to loose my layout with every update.

    Thanks a lot
    Pascal
  • AirAir
    Posts: 10,970
    FLYART said: For the text above the media. Thanks for you code. Is there a way to code this into child theme. Else I am going to loose my layout with every update.
    Yes, just copy changed file to child theme- this is what child theme were specially designed for.
    FLYART said: Yes but I'd like to have borders in my content and have the work nav full width
    That is custom design wish if I understand you right. However you can disable side borders if you like. You can choose which borders should be added to layout.
    FLYART said: Yes but as written before this means that the whole page slides toward the top. I'd just like not to display the title but keept the top padding as it is so far
    So title bar, but no title? You can hide it with custom CSS:

    .single-work .page-title{
    display: none;
    }
    With kind regards.
  • Posts: 293
    Thanks for your help! I will try this out today!
  • Posts: 293
    Hi again
    I just tried out the php change (as this is the most important for me) but it just cuts out the text but doesn't place it above the media.. did I do something wrong?
    Bildschirmfoto 2016-08-30 um 11.31.06.png
    592 x 349 - 72K
    Bildschirmfoto 2016-08-30 um 11.33.13.png
    1360 x 749 - 442K
    Bildschirmfoto 2016-08-30 um 11.33.09.png
    1358 x 676 - 965K
  • AirAir
    Posts: 10,970
    It is my mistake here. You will have to also cut out this code from line ~36
    $content         = apply_filters( 'the_content', get_the_content() );
    and paste it under line 21, so whole change should look like this
    
    	a13fatmoon_title_bar();
    	$content         = apply_filters( 'the_content', get_the_content() );
    ?>
    <?php a13fatmoon_single_work_text_content($content); ?>
    
    With kind regards.

  • Posts: 293
    Hi
    Thnks .. now it works.. but it does seem to affect the settings for title bar? Wether I disable or change settings it doesn't affect anything (see screenshots)
    Bildschirmfoto 2016-08-30 um 15.00.00.png
    1512 x 1267 - 224K
    Bildschirmfoto 2016-08-30 um 14.58.16.png
    1468 x 857 - 102K
  • AirAir
    Posts: 10,970
    Check what settings for title bar you have in that work you are previewing. If not "Global" then changing in customizer won't change anything.
  • Posts: 293
    My mistake.. thank you so much!
  • AirAir
    Posts: 10,970
    Since version 1.1.0 above code is outdated. So you will have to take new copy of single-work.php from main theme, copy it to child theme, and make such changes in it

    Remove line ~36:
    $content = apply_filters( 'the_content', get_the_content() );

    Remove line ~135:
    <?php apollo13framework_single_work_text_content($content); ?>

    Under line ~21 paste above removed lines, so whole change would look like:
    
    	apollo13framework_title_bar();
    	$content         = apply_filters( 'the_content', get_the_content() );
    ?>
    <?php apollo13framework_single_work_text_content($content); ?>
    
    With kind regards.
  • Posts: 293
    Great! Thank you works like a charm!
    Pascal
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!